winrt: Fix tst_qcoreapplication
On winrt, the default application version is determined by its manifest file. The template's default version is 1.0.0.0. Additionally addRemoveLibPaths should not fail if libraryPaths only contains currentDir. Change-Id: Ifdd517f1bfe2fdf641f3d728ebe1fa144df1a8ca Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>bb10
parent
cf969f0be3
commit
7e7bc031e9
|
|
@ -155,7 +155,9 @@ void tst_QCoreApplication::qAppName()
|
|||
|
||||
void tst_QCoreApplication::qAppVersion()
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
#if defined(Q_OS_WINRT)
|
||||
const char appVersion[] = "1.0.0.0";
|
||||
#elif defined(Q_OS_WIN)
|
||||
const char appVersion[] = "1.2.3.4";
|
||||
#elif defined(Q_OS_DARWIN) || defined(Q_OS_ANDROID)
|
||||
const char appVersion[] = "1.2.3";
|
||||
|
|
@ -946,9 +948,12 @@ void tst_QCoreApplication::addRemoveLibPaths()
|
|||
char *argv[] = { const_cast<char*>(QTest::currentAppName()) };
|
||||
TestApplication app(argc, argv);
|
||||
|
||||
// Check that modifications stay alive across the creation of an application.
|
||||
QVERIFY(QCoreApplication::libraryPaths().contains(currentDir));
|
||||
QVERIFY(!QCoreApplication::libraryPaths().contains(paths[0]));
|
||||
// If libraryPaths only contains currentDir, neither will be in libraryPaths now.
|
||||
if (paths.length() != 1 && currentDir != paths[0]) {
|
||||
// Check that modifications stay alive across the creation of an application.
|
||||
QVERIFY(QCoreApplication::libraryPaths().contains(currentDir));
|
||||
QVERIFY(!QCoreApplication::libraryPaths().contains(paths[0]));
|
||||
}
|
||||
|
||||
QStringList replace;
|
||||
replace << currentDir << paths[0];
|
||||
|
|
|
|||
Loading…
Reference in New Issue