unittests: Pass a safely modifiable arg to QCoreApplication

This also silents C++11 warning about deprecated conversion.
This commit is contained in:
Samir Aguiar
2015-03-10 10:18:56 +01:00
parent 9fa8e24bfd
commit d4215052dd

View File

@@ -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;
}