Diffusion KDb 20fb7f0d2631

Take all args to kdbfeaturestest before the driver

Authored by jfita on Apr 25 2020, 8:54 PM.

Description

Take all args to kdbfeaturestest before the driver

Summary:
kdbfeaturetest gave the following error when trying to test buffered
cursors:

> .//kdbfeaturestest --buffered-cursors --test cursors sqlite /tmp/cursor.test
DRIVERS:  ("org.kde.kdb.postgresql", "org.kde.kdb.sqlite")
org.kde.kdb.core: loading "org.kde.kdb.--buffered-cursors"
KDbResult: CODE=10 MESSAGE="Could not find database driver \"org.kde.kdb.--buffered-cursors\"." SERVER_ERROR_CODE=0
main: "cursors" test: ERROR

kdbfeaturetest’s main tries to remove all arguments from args[] before
using the first remaining string as the driver’s name, but the code that
removes --buffered-cursors and --query-parameters was below the one for
the driver. Therefore, it assumed that either of the two, since they
where still in args, was the driver’s name.

I just moved the two calls to take those parameters above the driver.

FIXED-IN:3.2.1

Reviewers: staniek, piggz

Subscribers: Kexi-Devel-list

Tags: KDb

Differential Revision: https://phabricator.kde.org/D29184

Details