mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
unittests: Pass a safely modifiable arg to QCoreApplication
This also silents C++11 warning about deprecated conversion.
This commit is contained in:
@@ -15,12 +15,14 @@ TestImport::TestImport()
|
||||
// The app needs to be initialized for the utf8 test
|
||||
// to work
|
||||
argcount = 1;
|
||||
args[0] = "sqlb-unittests";
|
||||
args[0] = new char[20];
|
||||
strcpy(args[0], "sqlb-unittests");
|
||||
app = new QCoreApplication(argcount, args);
|
||||
}
|
||||
|
||||
TestImport::~TestImport()
|
||||
{
|
||||
delete[] args[0];
|
||||
delete app;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user