mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-07 20:40:00 -05:00
tests: fix QCoreApplication parameters
The argument count (first parameter) is a reference, and thus must be kept alive for the whole lifetime of the QCoreApplication instance, as also the Qt apidocs say. Also properly create a "string array" for the actual args, instead of badly casting a string to that. This fixes sporadic crashes in this test.
This commit is contained in:
@@ -13,6 +13,8 @@ public:
|
||||
~TestImport();
|
||||
|
||||
private:
|
||||
int argcount;
|
||||
char *args[1]; // the size must match what 'argcount' is set to
|
||||
QCoreApplication* app;
|
||||
|
||||
private slots:
|
||||
|
||||
Reference in New Issue
Block a user