From 45b0f1be686cfba8dcecb9be5c875cae59c69276 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Fri, 5 Jun 2020 09:24:37 +0200 Subject: Remove winrt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø --- tests/auto/corelib/global/global.pro | 2 +- .../corelib/global/qgetputenv/tst_qgetputenv.cpp | 4 +- tests/auto/corelib/global/qlogging/CMakeLists.txt | 26 +++++---- tests/auto/corelib/global/qlogging/qlogging.pro | 6 +-- tests/auto/corelib/global/qlogging/test/test.pro | 6 +-- tests/auto/corelib/io/.prev_CMakeLists.txt | 4 +- tests/auto/corelib/io/CMakeLists.txt | 4 +- tests/auto/corelib/io/io.pro | 3 -- tests/auto/corelib/io/largefile/tst_largefile.cpp | 2 +- tests/auto/corelib/io/qdir/tst_qdir.cpp | 40 ++++---------- .../corelib/io/qdiriterator/tst_qdiriterator.cpp | 7 +-- tests/auto/corelib/io/qfile/.prev_CMakeLists.txt | 6 +-- tests/auto/corelib/io/qfile/CMakeLists.txt | 6 +-- tests/auto/corelib/io/qfile/qfile.pro | 4 +- tests/auto/corelib/io/qfile/test.pro | 2 +- tests/auto/corelib/io/qfile/tst_qfile.cpp | 40 ++++---------- tests/auto/corelib/io/qfileinfo/CMakeLists.txt | 2 +- tests/auto/corelib/io/qfileinfo/qfileinfo.pro | 2 +- tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 63 ++++++++-------------- .../corelib/io/qfileselector/tst_qfileselector.cpp | 2 +- .../qfilesystemwatcher/tst_qfilesystemwatcher.cpp | 6 +-- tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp | 6 --- tests/auto/corelib/io/qlockfile/CMakeLists.txt | 2 +- tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp | 8 +-- tests/auto/corelib/io/qlockfile/tst_qlockfile.pro | 2 +- tests/auto/corelib/io/qsettings/tst_qsettings.cpp | 45 +++++----------- .../io/qstandardpaths/tst_qstandardpaths.cpp | 17 +++--- .../corelib/io/qstorageinfo/tst_qstorageinfo.cpp | 4 -- .../corelib/io/qtemporarydir/tst_qtemporarydir.cpp | 4 +- .../io/qtemporaryfile/tst_qtemporaryfile.cpp | 4 +- tests/auto/corelib/io/qurl/tst_qurl.cpp | 2 - tests/auto/corelib/kernel/.prev_CMakeLists.txt | 23 ++++---- tests/auto/corelib/kernel/CMakeLists.txt | 20 +++---- tests/auto/corelib/kernel/kernel.pro | 2 +- .../qcoreapplication/tst_qcoreapplication.cpp | 7 +-- .../auto/corelib/kernel/qeventloop/CMakeLists.txt | 2 +- .../auto/corelib/kernel/qeventloop/qeventloop.pro | 2 +- .../corelib/kernel/qmetatype/.prev_CMakeLists.txt | 8 +-- tests/auto/corelib/kernel/qmetatype/CMakeLists.txt | 8 +-- tests/auto/corelib/kernel/qmetatype/qmetatype.pro | 7 +-- tests/auto/corelib/kernel/qobject/CMakeLists.txt | 14 +---- tests/auto/corelib/kernel/qobject/qobject.pro | 4 +- tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 3 -- .../kernel/qsharedmemory/.prev_CMakeLists.txt | 23 ++++++++ .../corelib/kernel/qsharedmemory/CMakeLists.txt | 14 ++--- .../corelib/kernel/qsharedmemory/qsharedmemory.pro | 4 +- .../kernel/qsocketnotifier/tst_qsocketnotifier.cpp | 17 ------ .../corelib/kernel/qtranslator/tst_qtranslator.cpp | 6 +-- .../plugin/qfactoryloader/plugin1/CMakeLists.txt | 6 --- .../plugin/qfactoryloader/plugin1/plugin1.pro | 1 - .../plugin/qfactoryloader/plugin2/CMakeLists.txt | 6 --- .../plugin/qfactoryloader/plugin2/plugin2.pro | 1 - tests/auto/corelib/plugin/qfactoryloader/winrt.pri | 9 ---- .../auto/corelib/plugin/qlibrary/tst_qlibrary.cpp | 8 ++- .../plugin/qpluginloader/lib/.prev_CMakeLists.txt | 6 --- .../plugin/qpluginloader/lib/CMakeLists.txt | 6 --- .../auto/corelib/plugin/qpluginloader/lib/lib.pro | 1 - .../plugin/qpluginloader/theplugin/CMakeLists.txt | 9 ---- .../plugin/qpluginloader/theplugin/theplugin.pro | 1 - tests/auto/corelib/plugin/qpluginloader/winrt.pri | 9 ---- .../corelib/serialization/qtextstream/BLACKLIST | 1 - tests/auto/corelib/text/qlocale/CMakeLists.txt | 4 +- tests/auto/corelib/text/qlocale/qlocale.pro | 4 +- .../auto/corelib/text/qlocale/test/CMakeLists.txt | 2 +- tests/auto/corelib/text/qlocale/test/test.pro | 2 +- tests/auto/corelib/text/qlocale/tst_qlocale.cpp | 6 +-- .../qregularexpression/tst_qregularexpression.cpp | 4 -- .../thread/qreadwritelock/tst_qreadwritelock.cpp | 6 +-- tests/auto/corelib/thread/qthread/tst_qthread.cpp | 10 ++-- .../corelib/thread/qthreadstorage/CMakeLists.txt | 2 +- .../thread/qthreadstorage/qthreadstorage.pro | 2 +- .../corelib/thread/qthreadstorage/test/test.pro | 6 +-- .../thread/qthreadstorage/tst_qthreadstorage.cpp | 12 ----- .../auto/corelib/time/qdatetime/tst_qdatetime.cpp | 3 -- 74 files changed, 198 insertions(+), 424 deletions(-) create mode 100644 tests/auto/corelib/kernel/qsharedmemory/.prev_CMakeLists.txt delete mode 100644 tests/auto/corelib/plugin/qfactoryloader/winrt.pri delete mode 100644 tests/auto/corelib/plugin/qpluginloader/winrt.pri (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/global/global.pro b/tests/auto/corelib/global/global.pro index 0f77d191ee..0b37bf63cf 100644 --- a/tests/auto/corelib/global/global.pro +++ b/tests/auto/corelib/global/global.pro @@ -13,5 +13,5 @@ SUBDIRS=\ qglobalstatic \ qhooks -win32:!winrt: SUBDIRS += \ +win32: SUBDIRS += \ qwinregistry diff --git a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp index 544cb1bf07..8cc66c6477 100644 --- a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp +++ b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp @@ -135,9 +135,7 @@ void tst_QGetPutEnv::encoding() static const wchar_t rawvalue[] = { 'a', 0x00E1, 0x03B1, 0x0430, 0 }; QString value = QString::fromWCharArray(rawvalue); -#if defined(Q_OS_WINRT) - QSKIP("Test cannot be run on this platform"); -#elif defined(Q_OS_WIN) +#if defined(Q_OS_WIN) const wchar_t wvarName[] = L"should_not_exist"; _wputenv_s(wvarName, rawvalue); #else diff --git a/tests/auto/corelib/global/qlogging/CMakeLists.txt b/tests/auto/corelib/global/qlogging/CMakeLists.txt index 7c74656215..ce9235f91e 100644 --- a/tests/auto/corelib/global/qlogging/CMakeLists.txt +++ b/tests/auto/corelib/global/qlogging/CMakeLists.txt @@ -1,19 +1,17 @@ -if(NOT WINRT) - add_qt_executable(qlogging_helper - NO_INSTALL # special case - OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case - SOURCES app/main.cpp - DEFINES QT_MESSAGELOGCONTEXT - LIBRARIES Qt::Core) +add_qt_executable(qlogging_helper + NO_INSTALL # special case + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + SOURCES app/main.cpp + DEFINES QT_MESSAGELOGCONTEXT + LIBRARIES Qt::Core) - #special case begin - # Fixes required for the backtrace stack to be correct - if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" AND NOT MINGW) - target_link_options(qlogging_helper PRIVATE -rdynamic) - endif() - set_target_properties(qlogging_helper PROPERTIES CXX_VISIBILITY_PRESET default) - # special case end +#special case begin +# Fixes required for the backtrace stack to be correct +if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" AND NOT MINGW) + target_link_options(qlogging_helper PRIVATE -rdynamic) endif() +set_target_properties(qlogging_helper PROPERTIES CXX_VISIBILITY_PRESET default) +# special case end add_qt_test(tst_qlogging SOURCES tst_qlogging.cpp DEFINES diff --git a/tests/auto/corelib/global/qlogging/qlogging.pro b/tests/auto/corelib/global/qlogging/qlogging.pro index bbe75297d5..c81e257a2d 100644 --- a/tests/auto/corelib/global/qlogging/qlogging.pro +++ b/tests/auto/corelib/global/qlogging/qlogging.pro @@ -1,8 +1,6 @@ TEMPLATE = subdirs -!winrt { - test.depends = app - SUBDIRS += app -} +test.depends = app +SUBDIRS += app SUBDIRS += test diff --git a/tests/auto/corelib/global/qlogging/test/test.pro b/tests/auto/corelib/global/qlogging/test/test.pro index 81445247e0..c6c5950ff1 100644 --- a/tests/auto/corelib/global/qlogging/test/test.pro +++ b/tests/auto/corelib/global/qlogging/test/test.pro @@ -4,14 +4,14 @@ qtConfig(c++14): CONFIG += c++14 debug_and_release { CONFIG(debug, debug|release) { TARGET = ../../debug/tst_qlogging - !android:!winrt: TEST_HELPER_INSTALLS = ../debug/helper + !android: TEST_HELPER_INSTALLS = ../debug/helper } else { TARGET = ../../release/tst_qlogging - !android:!winrt: TEST_HELPER_INSTALLS = ../release/helper + !android: TEST_HELPER_INSTALLS = ../release/helper } } else { TARGET = ../tst_qlogging - !android:!winrt: TEST_HELPER_INSTALLS = ../helper + !android: TEST_HELPER_INSTALLS = ../helper } QT = core testlib diff --git a/tests/auto/corelib/io/.prev_CMakeLists.txt b/tests/auto/corelib/io/.prev_CMakeLists.txt index 5baf4c35de..b9d2954156 100644 --- a/tests/auto/corelib/io/.prev_CMakeLists.txt +++ b/tests/auto/corelib/io/.prev_CMakeLists.txt @@ -18,6 +18,7 @@ add_subdirectory(qloggingcategory) add_subdirectory(qnodebug) add_subdirectory(qsavefile) add_subdirectory(qstandardpaths) +add_subdirectory(qstorageinfo) add_subdirectory(qtemporarydir) add_subdirectory(qtemporaryfile) add_subdirectory(qurlquery) @@ -51,6 +52,3 @@ endif() if(QT_FEATURE_settings AND TARGET Qt::Gui) add_subdirectory(qsettings) endif() -if(NOT WINRT) - add_subdirectory(qstorageinfo) -endif() diff --git a/tests/auto/corelib/io/CMakeLists.txt b/tests/auto/corelib/io/CMakeLists.txt index 9ec9da18c9..18fc2bf375 100644 --- a/tests/auto/corelib/io/CMakeLists.txt +++ b/tests/auto/corelib/io/CMakeLists.txt @@ -18,6 +18,7 @@ add_subdirectory(qloggingcategory) add_subdirectory(qnodebug) add_subdirectory(qsavefile) add_subdirectory(qstandardpaths) +add_subdirectory(qstorageinfo) add_subdirectory(qtemporarydir) add_subdirectory(qtemporaryfile) add_subdirectory(qurlquery) @@ -51,6 +52,3 @@ endif() if(QT_FEATURE_settings AND TARGET Qt::Gui) add_subdirectory(qsettings) endif() -if(NOT WINRT) - add_subdirectory(qstorageinfo) -endif() diff --git a/tests/auto/corelib/io/io.pro b/tests/auto/corelib/io/io.pro index eee2c0e30d..84a4cf0dab 100644 --- a/tests/auto/corelib/io/io.pro +++ b/tests/auto/corelib/io/io.pro @@ -68,9 +68,6 @@ win32:!qtConfig(private_tests): SUBDIRS -= \ !qtConfig(settings): SUBDIRS -= \ qsettings -winrt: SUBDIRS -= \ - qstorageinfo - android: SUBDIRS -= \ qprocess \ qdir \ diff --git a/tests/auto/corelib/io/largefile/tst_largefile.cpp b/tests/auto/corelib/io/largefile/tst_largefile.cpp index e6d2f10c16..33d7ea1da3 100644 --- a/tests/auto/corelib/io/largefile/tst_largefile.cpp +++ b/tests/auto/corelib/io/largefile/tst_largefile.cpp @@ -62,7 +62,7 @@ public: , fd_(-1) , stream_(0) { - #if defined(QT_LARGEFILE_SUPPORT) && !defined(Q_OS_MAC) && !defined(Q_OS_WINRT) + #if defined(QT_LARGEFILE_SUPPORT) && !defined(Q_OS_MAC) maxSizeBits = 36; // 64 GiB #elif defined(Q_OS_MAC) // HFS+ does not support sparse files, so we limit file size for the test diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp index 5462a63fab..56b19bc4c0 100644 --- a/tests/auto/corelib/io/qdir/tst_qdir.cpp +++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp @@ -51,7 +51,7 @@ # include #endif -#if defined(Q_OS_VXWORKS) || defined(Q_OS_WINRT) +#if defined(Q_OS_VXWORKS) #define Q_NO_SYMLINKS #endif @@ -587,7 +587,7 @@ void tst_QDir::exists_data() QTest::newRow("simple dir") << (m_dataPath + "/resources") << true; QTest::newRow("simple dir with slash") << (m_dataPath + "/resources/") << true; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName(); QTest::newRow("unc 1") << uncRoot << true; QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true; @@ -599,7 +599,7 @@ void tst_QDir::exists_data() QTest::newRow("unc 8") << uncRoot + "/asharethatshouldnotexist" << false; QTest::newRow("unc 9") << "//ahostthatshouldnotexist" << false; #endif -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT)) +#if defined (Q_OS_WIN) QTest::newRow("This drive should exist") << "C:/" << true; // find a non-existing drive and check if it does not exist #ifdef QT_BUILD_INTERNAL @@ -977,7 +977,7 @@ void tst_QDir::entryListSimple_data() QTest::newRow("simple dir") << (m_dataPath + "/resources") << 2; QTest::newRow("simple dir with slash") << (m_dataPath + "/resources/") << 2; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName(); QTest::newRow("unc 1") << uncRoot << 2; QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << 2; @@ -1248,7 +1248,7 @@ tst_QDir::cleanPath_data() #else QTest::newRow("data10") << "/:/" << "/:"; #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QTest::newRow("data11") << "//foo//bar" << "//foo/bar"; #endif QTest::newRow("data12") << "ab/a/" << "ab/a"; // Path item with length of 2 @@ -1260,11 +1260,7 @@ tst_QDir::cleanPath_data() QTest::newRow("data14") << "c://foo" << "c:/foo"; // Drive letters and unc path in one string -#if defined(Q_OS_WINRT) - const QString root = QDir::rootPath(); // has trailing slash - QTest::newRow("root-up") << (root + "path/..") << root; - QTest::newRow("above-root") << (root + "..") << (root + ".."); -#elif defined(Q_OS_WIN) +#if defined(Q_OS_WIN) QTest::newRow("data15") << "//c:/foo" << "//c:/foo"; QTest::newRow("drive-up") << "A:/path/.." << "A:/"; QTest::newRow("drive-above-root") << "A:/.." << "A:/.."; @@ -1387,7 +1383,7 @@ void tst_QDir::absoluteFilePath_data() QTest::addColumn("fileName"); QTest::addColumn("expectedFilePath"); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QTest::newRow("UNC-rel") << "//machine/share" << "dir" << "//machine/share/dir"; QTest::newRow("UNC-abs") << "//machine/share/path/to/blah" << "/dir" << "//machine/share/dir"; QTest::newRow("UNC-UNC") << "//machine/share/path/to/blah" << "//host/share/path" << "//host/share/path"; @@ -1425,7 +1421,7 @@ void tst_QDir::absolutePath_data() QTest::addColumn("expectedPath"); QTest::newRow("0") << "/machine/share/dir1" << "/machine/share/dir1"; -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT)) +#if defined(Q_OS_WIN) QTest::newRow("1") << "\\machine\\share\\dir1" << "/machine/share/dir1"; QTest::newRow("2") << "//machine/share/dir1" << "//machine/share/dir1"; QTest::newRow("3") << "\\\\machine\\share\\dir1" << "//machine/share/dir1"; @@ -1493,12 +1489,10 @@ void tst_QDir::relativeFilePath_data() QTest::newRow("27") << "C:" << "D:/" << "D:/"; QTest::newRow("28") << "C:/" << "D:" << "D:"; QTest::newRow("29") << "C:/" << "D:/" << "D:/"; -#ifndef Q_OS_WINRT QTest::newRow("30") << "C:/foo/bar" << "//anotherHost/foo/bar" << "//anotherHost/foo/bar"; QTest::newRow("31") << "//anotherHost/foo" << "//anotherHost/foo/bar" << "bar"; QTest::newRow("32") << "//anotherHost/foo" << "bar" << "bar"; QTest::newRow("33") << "//anotherHost/foo" << "C:/foo/bar" << "C:/foo/bar"; -#endif // !Q_OS_WINRT #endif QTest::newRow("resource0") << ":/prefix" << "foo.bar" << "foo.bar"; @@ -1692,11 +1686,7 @@ void tst_QDir::homePath() qputenv("HOME", envHome); #elif defined(Q_OS_WIN) - if (strHome.length() > 3 // root dir = "c:/"; "//" is not really valid... -#if defined(Q_OS_WINRT) - && strHome.length() > QDir::rootPath().length() -#endif - ) + if (strHome.length() > 3) // root dir = "c:/"; "//" is not really valid... QVERIFY(!strHome.endsWith('/')); #endif @@ -2149,9 +2139,6 @@ void tst_QDir::drives() QVERIFY(list.count() >= 1); //system QLatin1Char systemdrive('c'); #endif -#if defined(Q_OS_WINRT) - QSKIP("WinRT has no concept of drives"); -#endif #if defined(Q_OS_WIN) QVERIFY(list.count() <= 26); bool foundsystem = false; @@ -2208,9 +2195,7 @@ void tst_QDir::equalityOperator_data() << true; //need a path in the root directory that is unlikely to be a symbolic link. -#if defined (Q_OS_WINRT) - QString pathinroot(QDir::rootPath() + QLatin1String("assets/..")); -#elif defined (Q_OS_WIN) +#if defined (Q_OS_WIN) QString pathinroot("c:/windows/.."); #elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) QString pathinroot("/system/.."); @@ -2341,8 +2326,6 @@ void tst_QDir::cdBelowRoot_data() QTest::newRow("android") << "/" << "system" << "/system"; #elif defined(Q_OS_UNIX) QTest::newRow("unix") << "/" << "tmp" << "/tmp"; -#elif defined(Q_OS_WINRT) - QTest::newRow("winrt") << QDir::rootPath() << QDir::rootPath() << QDir::rootPath(); #else // Windows+CE const QString systemDrive = QString::fromLocal8Bit(qgetenv("SystemDrive")) + QLatin1Char('/'); const QString systemRoot = QString::fromLocal8Bit(qgetenv("SystemRoot")); @@ -2369,9 +2352,6 @@ void tst_QDir::cdBelowRoot() #ifdef Q_OS_UNIX if (::getuid() == 0) QSKIP("Running this test as root doesn't make sense"); -#endif -#ifdef Q_OS_WINRT - QSKIP("WinRT has no concept of system root"); #endif QDir dir(targetPath); QVERIFY2(!dir.cd("../.."), qPrintable(dir.absolutePath())); diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp index 00e1c74d07..24e6128b4d 100644 --- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp +++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp @@ -37,7 +37,7 @@ #include -#if defined(Q_OS_VXWORKS) || defined(Q_OS_WINRT) +#if defined(Q_OS_VXWORKS) #define Q_NO_SYMLINKS #endif @@ -220,11 +220,6 @@ void tst_QDirIterator::cleanupTestCase() Q_FOREACH(QString dirName, createdDirectories) currentDir.rmdir(dirName); - -#ifdef Q_OS_WINRT - QDir::setCurrent(QCoreApplication::applicationDirPath()); -#endif // Q_OS_WINRT - } void tst_QDirIterator::iterateRelativeDirectory_data() diff --git a/tests/auto/corelib/io/qfile/.prev_CMakeLists.txt b/tests/auto/corelib/io/qfile/.prev_CMakeLists.txt index cf329d37b7..196a0c056f 100644 --- a/tests/auto/corelib/io/qfile/.prev_CMakeLists.txt +++ b/tests/auto/corelib/io/qfile/.prev_CMakeLists.txt @@ -79,11 +79,9 @@ extend_target(tst_qfile CONDITION CONFIG___contains___builtin_testdata BUILTIN_TESTDATA ) -extend_target(tst_qfile CONDITION WIN32 AND NOT WINRT +extend_target(tst_qfile CONDITION WIN32 PUBLIC_LIBRARIES ole32 uuid ) -if(NOT WINRT) - add_subdirectory(stdinprocess) -endif() +add_subdirectory(stdinprocess) diff --git a/tests/auto/corelib/io/qfile/CMakeLists.txt b/tests/auto/corelib/io/qfile/CMakeLists.txt index 6bfb3fe8fd..bfea2c7f49 100644 --- a/tests/auto/corelib/io/qfile/CMakeLists.txt +++ b/tests/auto/corelib/io/qfile/CMakeLists.txt @@ -79,11 +79,9 @@ extend_target(tst_qfile CONDITION CONFIG___contains___builtin_testdata BUILTIN_TESTDATA ) -extend_target(tst_qfile CONDITION WIN32 AND NOT WINRT +extend_target(tst_qfile CONDITION WIN32 PUBLIC_LIBRARIES ole32 uuid ) -if(NOT WINRT) - add_subdirectory(stdinprocess) -endif() +add_subdirectory(stdinprocess) diff --git a/tests/auto/corelib/io/qfile/qfile.pro b/tests/auto/corelib/io/qfile/qfile.pro index 91c5c15f66..1b434a2a74 100644 --- a/tests/auto/corelib/io/qfile/qfile.pro +++ b/tests/auto/corelib/io/qfile/qfile.pro @@ -1,3 +1,3 @@ TEMPLATE = subdirs -SUBDIRS = test.pro -!winrt: SUBDIRS += stdinprocess +SUBDIRS = test.pro \ + stdinprocess diff --git a/tests/auto/corelib/io/qfile/test.pro b/tests/auto/corelib/io/qfile/test.pro index 47b778bc33..7841973a65 100644 --- a/tests/auto/corelib/io/qfile/test.pro +++ b/tests/auto/corelib/io/qfile/test.pro @@ -23,6 +23,6 @@ TESTDATA += \ Makefile forCopying.txt forRenaming.txt \ resources/file1.ext1 -win32:!winrt: QMAKE_USE += ole32 uuid +win32: QMAKE_USE += ole32 uuid CONFIG += c++17 diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index d2a83757d2..9416796c6c 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -189,19 +189,17 @@ private slots: void copyRemovesTemporaryFile() const; void copyShouldntOverwrite(); void copyFallback(); -#ifndef Q_OS_WINRT void link(); void linkToDir(); void absolutePathLinkToRelativePath(); void readBrokenLink(); -#endif void readTextFile_data(); void readTextFile(); void readTextFile2(); void writeTextFile_data(); void writeTextFile(); /* void largeFileSupport(); */ -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) void largeUncFileSupport(); #endif void flush(); @@ -550,7 +548,7 @@ void tst_QFile::exists() file.remove(); QVERIFY(!file.exists()); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) const QString uncPath = "//" + QtNetworkSettings::winServerName() + "/testshare/readme.txt"; QFile unc(uncPath); QVERIFY2(unc.exists(), msgFileDoesNotExist(uncPath).constData()); @@ -606,7 +604,7 @@ void tst_QFile::open_data() << int(QIODevice::ReadOnly) << false << QFile::OpenError; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) //opening devices requires administrative privileges (and elevation). HANDLE hTest = CreateFile(_T("\\\\.\\PhysicalDrive0"), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); if (hTest != INVALID_HANDLE_VALUE) { @@ -637,7 +635,7 @@ void tst_QFile::open() QSKIP("Running this test as root doesn't make sense"); #endif -#if defined(Q_OS_WIN32) || defined(Q_OS_WINRT) +#if defined(Q_OS_WIN32) QEXPECT_FAIL("noreadfile", "Windows does not currently support non-readable files.", Abort); #endif if (filename.isEmpty()) @@ -689,7 +687,7 @@ void tst_QFile::size_data() QTest::addColumn("size"); QTest::newRow( "exist01" ) << m_testFile << (qint64)245; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) // Only test UNC on Windows./ QTest::newRow("unc") << "//" + QString(QtNetworkSettings::winServerName() + "/testshare/test.pri") << (qint64)34; #endif @@ -1173,7 +1171,7 @@ void tst_QFile::ungetChar() QCOMPARE(buf[2], '4'); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QString driveLetters() { wchar_t volumeName[MAX_PATH]; @@ -1210,9 +1208,7 @@ void tst_QFile::invalidFile_data() #if !defined(Q_OS_WIN) QTest::newRow( "x11" ) << QString( "qwe//" ); #else -#if !defined(Q_OS_WINRT) QTest::newRow( "colon2" ) << invalidDriveLetter() + QString::fromLatin1(":ail:invalid"); -#endif QTest::newRow( "colon3" ) << QString( ":failinvalid" ); QTest::newRow( "forwardslash" ) << QString( "fail/invalid" ); QTest::newRow( "asterisk" ) << QString( "fail*invalid" ); @@ -1351,7 +1347,7 @@ void tst_QFile::permissions() QFile::remove(file); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) if (qt_ntfs_permission_lookup) QEXPECT_FAIL("readonly", "QTBUG-25630", Abort); #endif @@ -1497,7 +1493,7 @@ void tst_QFile::copyFallback() #include #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) static QString getWorkingDirectoryForLink(const QString &linkFileName) { bool neededCoInit = false; @@ -1536,7 +1532,6 @@ static QString getWorkingDirectoryForLink(const QString &linkFileName) } #endif -#ifndef Q_OS_WINRT void tst_QFile::link() { QFile::remove("myLink.lnk"); @@ -1611,7 +1606,6 @@ void tst_QFile::readBrokenLink() QVERIFY(QFile::link("ole/..", "myLink2.lnk")); QCOMPARE(QFileInfo("myLink2.lnk").symLinkTarget(), QDir::currentPath()); } -#endif // Q_OS_WINRT void tst_QFile::readTextFile_data() { @@ -1696,7 +1690,7 @@ void tst_QFile::writeTextFile() QCOMPARE(file.readAll(), out); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) // Helper for executing QFile::open() with warning in QTRY_VERIFY(), which evaluates the condition // multiple times static bool qFileOpen(QFile &file, QIODevice::OpenMode ioFlags) @@ -2427,7 +2421,7 @@ void tst_QFile::writeLargeDataBlock_data() QTest::newRow("localfile-Fd") << "./largeblockfile.txt" << (int)OpenFd; QTest::newRow("localfile-Stream") << "./largeblockfile.txt" << (int)OpenStream; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !defined(QT_NO_NETWORK) +#if defined(Q_OS_WIN) && !defined(QT_NO_NETWORK) // Some semi-randomness to avoid collisions. QTest::newRow("unc file") << QString("//" + QtNetworkSettings::winServerName() + "/TESTSHAREWRITABLE/largefile-%1-%2.txt") @@ -2787,7 +2781,7 @@ void tst_QFile::appendAndRead() void tst_QFile::miscWithUncPathAsCurrentDir() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QString current = QDir::currentPath(); const QString path = QLatin1String("//") + QtNetworkSettings::winServerName() + QLatin1String("/testshare"); @@ -2876,12 +2870,8 @@ void tst_QFile::nativeHandleLeaks() } #ifdef Q_OS_WIN -# ifndef Q_OS_WINRT handle1 = ::CreateFileA("qt_file.tmp", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); -# else - handle1 = ::CreateFile2(L"qt_file.tmp", GENERIC_READ, 0, OPEN_ALWAYS, NULL); -# endif QVERIFY( INVALID_HANDLE_VALUE != handle1 ); QVERIFY( ::CloseHandle(handle1) ); #endif @@ -2895,12 +2885,8 @@ void tst_QFile::nativeHandleLeaks() } #ifdef Q_OS_WIN -# ifndef Q_OS_WINRT handle2 = ::CreateFileA("qt_file.tmp", GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); -# else - handle2 = ::CreateFile2(L"qt_file.tmp", GENERIC_READ, 0, OPEN_ALWAYS, NULL); -# endif QVERIFY( INVALID_HANDLE_VALUE != handle2 ); QVERIFY( ::CloseHandle(handle2) ); #endif @@ -3720,10 +3706,6 @@ void tst_QFile::moveToTrash() QFETCH(bool, create); QFETCH(bool, result); -#if defined(Q_OS_WINRT) - QSKIP("WinRT does not have a trash", SkipAll); -#endif - auto ensureFile = [](const QString &source, bool create) { if (QFileInfo::exists(source) || !create) return; diff --git a/tests/auto/corelib/io/qfileinfo/CMakeLists.txt b/tests/auto/corelib/io/qfileinfo/CMakeLists.txt index a6cf3a38f1..05a14d4e1a 100644 --- a/tests/auto/corelib/io/qfileinfo/CMakeLists.txt +++ b/tests/auto/corelib/io/qfileinfo/CMakeLists.txt @@ -40,7 +40,7 @@ add_qt_resource(tst_qfileinfo "testdata" ## Scopes: ##################################################################### -extend_target(tst_qfileinfo CONDITION WIN32 AND NOT WINRT +extend_target(tst_qfileinfo CONDITION WIN32 PUBLIC_LIBRARIES advapi32 netapi32 diff --git a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro index af764f3679..7c0e6f1537 100644 --- a/tests/auto/corelib/io/qfileinfo/qfileinfo.pro +++ b/tests/auto/corelib/io/qfileinfo/qfileinfo.pro @@ -5,7 +5,7 @@ SOURCES = tst_qfileinfo.cpp RESOURCES += qfileinfo.qrc \ testdata.qrc -win32:!winrt: QMAKE_USE += advapi32 netapi32 +win32: QMAKE_USE += advapi32 netapi32 # for std::filesystem tests qtConfig(c++17): CONFIG += c++17 diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index c5dafb1a29..ce41e49985 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -48,11 +48,9 @@ #endif #ifdef Q_OS_WIN #include -#if !defined(Q_OS_WINRT) #include #include #endif -#endif #include #include #if defined(Q_OS_WIN) @@ -61,7 +59,7 @@ #include #include "../../../../shared/filesystem.h" -#if defined(Q_OS_VXWORKS) || defined(Q_OS_WINRT) +#if defined(Q_OS_VXWORKS) #define Q_NO_SYMLINKS #endif @@ -69,9 +67,7 @@ QT_BEGIN_NAMESPACE extern Q_CORE_EXPORT int qt_ntfs_permission_lookup; QT_END_NAMESPACE -# ifndef Q_OS_WINRT bool IsUserAdmin(); -# endif #endif inline bool qIsLikelyToBeFat(const QString &path) @@ -96,7 +92,7 @@ inline bool qIsLikelyToBeNfs(const QString &path) #endif } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) # ifndef SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE // MinGW # define SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE (0x2) # endif @@ -126,7 +122,7 @@ static QByteArray msgInsufficientPrivileges(const QString &errorMessage) { return "Insufficient privileges (" + errorMessage.toLocal8Bit() + ')'; } -#endif // Q_OS_WIN && !Q_OS_WINRT +#endif // Q_OS_WIN static QString seedAndTemplate() { @@ -261,7 +257,7 @@ private slots: void refresh(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) void ntfsJunctionPointsAndSymlinks_data(); void ntfsJunctionPointsAndSymlinks(); void brokenShortcut(); @@ -278,9 +274,7 @@ private slots: void detachingOperations(); -#if !defined(Q_OS_WINRT) void owner(); -#endif void group(); void invalidState_data(); @@ -421,12 +415,12 @@ void tst_QFileInfo::isDir_data() QTest::newRow("broken link") << "brokenlink.lnk" << false; -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT)) +#if defined(Q_OS_WIN) QTest::newRow("drive 1") << "c:" << true; QTest::newRow("drive 2") << "c:/" << true; //QTest::newRow("drive 2") << "t:s" << false; #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName(); QTest::newRow("unc 1") << uncRoot << true; QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true; @@ -463,13 +457,13 @@ void tst_QFileInfo::isRoot_data() QTest::newRow("simple dir") << m_resourcesDir << false; QTest::newRow("simple dir with slash") << (m_resourcesDir + QLatin1Char('/')) << false; -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT)) +#if defined(Q_OS_WIN) QTest::newRow("drive 1") << "c:" << false; QTest::newRow("drive 2") << "c:/" << true; QTest::newRow("drive 3") << "p:/" << false; #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName(); QTest::newRow("unc 1") << uncRoot << true; QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true; @@ -507,18 +501,13 @@ void tst_QFileInfo::exists_data() QTest::newRow("data8") << (m_resourcesDir + "/*.ext1") << false; QTest::newRow("data9") << (m_resourcesDir + "/file?.ext1") << false; QTest::newRow("data10") << "." << true; - - // Skip for the WinRT case, as GetFileAttributesEx removes _any_ - // trailing whitespace and "." is a valid entry as seen in data10 -#ifndef Q_OS_WINRT QTest::newRow("data11") << ". " << false; -#endif QTest::newRow("empty") << "" << false; QTest::newRow("simple dir") << m_resourcesDir << true; QTest::newRow("simple dir with slash") << (m_resourcesDir + QLatin1Char('/')) << true; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) const QString uncRoot = QStringLiteral("//") + QtNetworkSettings::winServerName(); QTest::newRow("unc 1") << uncRoot << true; QTest::newRow("unc 2") << uncRoot + QLatin1Char('/') << true; @@ -553,7 +542,7 @@ void tst_QFileInfo::absolutePath_data() QTest::addColumn("filename"); QString drivePrefix; -#if (defined(Q_OS_WIN) && !defined(Q_OS_WINRT)) +#if defined(Q_OS_WIN) drivePrefix = QDir::currentPath().left(2); QString nonCurrentDrivePrefix = drivePrefix.left(1).compare("X", Qt::CaseInsensitive) == 0 ? QString("Y:") : QString("X:"); @@ -563,8 +552,6 @@ void tst_QFileInfo::absolutePath_data() QTest::newRow(":my.dll") << nonCurrentDrivePrefix + "my.dll" << nonCurrentDrivePrefix + "/" << "my.dll"; -#elif defined(Q_OS_WINRT) - drivePrefix = QDir::currentPath().left(2); #endif QTest::newRow("0") << "/machine/share/dir1/" << drivePrefix + "/machine/share/dir1" << ""; QTest::newRow("1") << "/machine/share/dir1" << drivePrefix + "/machine/share" << "dir1"; @@ -572,7 +559,7 @@ void tst_QFileInfo::absolutePath_data() QTest::newRow("3") << "/usr/local/bin/" << drivePrefix + "/usr/local/bin" << ""; QTest::newRow("/test") << "/test" << drivePrefix + "/" << "test"; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QTest::newRow("c:\\autoexec.bat") << "c:\\autoexec.bat" << "C:/" << "autoexec.bat"; QTest::newRow("c:autoexec.bat") << QDir::currentPath().left(2) + "autoexec.bat" << QDir::currentPath() @@ -748,7 +735,7 @@ void tst_QFileInfo::canonicalFilePath() } #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) { QString errorMessage; const QString linkTarget = QStringLiteral("res"); @@ -846,7 +833,7 @@ void tst_QFileInfo::dir_data() QTest::newRow("absFilePath") << QDir::currentPath() + "/tmp.txt" << false << QDir::currentPath(); QTest::newRow("absFilePathAbsPath") << QDir::currentPath() + "/tmp.txt" << true << QDir::currentPath(); QTest::newRow("resource1") << ":/tst_qfileinfo/resources/file1.ext1" << true << ":/tst_qfileinfo/resources"; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QTest::newRow("driveWithSlash") << "C:/file1.ext1.ext2" << true << "C:/"; QTest::newRow("driveWithoutSlash") << QDir::currentPath().left(2) + "file1.ext1.ext2" << false << QDir::currentPath().left(2); #endif @@ -1037,7 +1024,7 @@ void tst_QFileInfo::size() void tst_QFileInfo::systemFiles() { -#if !defined(Q_OS_WIN) || defined(Q_OS_WINRT) +#if !defined(Q_OS_WIN) QSKIP("This is a Windows only test"); #endif QFileInfo fi("c:\\pagefile.sys"); @@ -1240,7 +1227,7 @@ void tst_QFileInfo::fileTimes() QCOMPARE(fileInfo.birthTime(), birthTime); // mustn't have changed QVERIFY(readTime.isValid()); -#if defined(Q_OS_WINRT) || defined(Q_OS_QNX) || (defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)) +#if defined(Q_OS_QNX) || (defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)) noAccessTime = true; #elif defined(Q_OS_WIN) //In Vista the last-access timestamp is not updated when the file is accessed/touched (by default). @@ -1361,7 +1348,7 @@ void tst_QFileInfo::isShortcut_data() << regularFile.fileName() << false; QTest::newRow("directory") << QDir::currentPath() << false; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) // windows shortcuts QVERIFY(regularFile.link("link.lnk")); QTest::newRow("shortcut") @@ -1397,7 +1384,6 @@ void tst_QFileInfo::isSymbolicLink_data() #ifndef Q_NO_SYMLINKS #if defined(Q_OS_WIN) -#if !defined(Q_OS_WINRT) QString errorMessage; const DWORD creationResult = createSymbolicLink("symlink", m_sourceFile, &errorMessage); if (creationResult == ERROR_PRIVILEGE_NOT_HELD) { @@ -1407,7 +1393,6 @@ void tst_QFileInfo::isSymbolicLink_data() QTest::newRow("NTFS-symlink") << "symlink" << true; } -#endif // !Q_OS_WINRT #else // Unix: QVERIFY(regularFile.link("symlink.lnk")); QTest::newRow("symlink.lnk") @@ -1450,7 +1435,7 @@ void tst_QFileInfo::link_data() file2.open(QIODevice::WriteOnly); QTest::newRow("existent file") << m_sourceFile << false << false << ""; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) // windows shortcuts QVERIFY(file1.link("link.lnk")); QTest::newRow("link.lnk") @@ -1463,7 +1448,6 @@ void tst_QFileInfo::link_data() #ifndef Q_NO_SYMLINKS #if defined(Q_OS_WIN) -#if !defined(Q_OS_WINRT) QString errorMessage; DWORD creationResult = createSymbolicLink("link", m_sourceFile, &errorMessage); if (creationResult == ERROR_PRIVILEGE_NOT_HELD) { @@ -1482,7 +1466,6 @@ void tst_QFileInfo::link_data() QTest::newRow("broken link") << "brokenlink" << false << true << QFileInfo("dummyfile").absoluteFilePath(); } -#endif // !Q_OS_WINRT #else // Unix: QVERIFY(file1.link("link")); QTest::newRow("link") @@ -1662,7 +1645,7 @@ void tst_QFileInfo::refresh() QCOMPARE(info2.size(), info.size()); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) struct NtfsTestResource { @@ -1872,13 +1855,13 @@ void tst_QFileInfo::isWritable() QVERIFY(QFileInfo("tempfile.txt").isWritable()); tempfile.remove(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QFileInfo fi("c:\\pagefile.sys"); QVERIFY2(fi.exists(), msgDoesNotExist(fi.absoluteFilePath()).constData()); QVERIFY(!fi.isWritable()); #endif -#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined (Q_OS_WIN) QScopedValueRollback ntfsMode(qt_ntfs_permission_lookup); qt_ntfs_permission_lookup = 1; QFileInfo fi2(QFile::decodeName(qgetenv("SystemRoot") + "/system.ini")); @@ -2059,7 +2042,7 @@ void tst_QFileInfo::detachingOperations() QVERIFY(!info1.caching()); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) bool IsUserAdmin() { BOOL b; @@ -2081,9 +2064,8 @@ bool IsUserAdmin() return b != FALSE; } -#endif // Q_OS_WIN && !Q_OS_WINRT +#endif // Q_OS_WIN -#ifndef Q_OS_WINRT void tst_QFileInfo::owner() { QString userName; @@ -2145,7 +2127,6 @@ void tst_QFileInfo::owner() qt_ntfs_permission_lookup = 0; #endif } -#endif // !Q_OS_WINRT void tst_QFileInfo::group() { diff --git a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp index bac7a69e0f..efdfc071a3 100644 --- a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp +++ b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp @@ -96,7 +96,7 @@ void tst_QFileSelector::basicTest_data() expectedPlatform2File = QString(":/platforms/test2"); #else QString distributionName; -# if (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || defined(Q_OS_FREEBSD) || defined(Q_OS_WINRT) +# if (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || defined(Q_OS_FREEBSD) distributionName = QSysInfo::productType(); # endif foreach (const QString &selector, QFileSelectorPrivate::platformSelectors()) { diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index 7d88601e54..4f07581587 100644 --- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp +++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp @@ -34,7 +34,7 @@ #include #include #include -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) #include #endif @@ -82,7 +82,7 @@ private slots: void signalsEmittedAfterFileMoved(); void watchUnicodeCharacters(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) void watchDirectoryAttributeChanges(); #endif @@ -819,7 +819,7 @@ void tst_QFileSystemWatcher::watchUnicodeCharacters() QTRY_COMPARE(changedSpy.count(), 1); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) void tst_QFileSystemWatcher::watchDirectoryAttributeChanges() { QTemporaryDir temporaryDirectory(m_tempDirPattern); diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp index da5327594c..10214f2996 100644 --- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp +++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp @@ -104,9 +104,6 @@ void tst_QIODevice::getSetCheck() //---------------------------------------------------------------------------------- void tst_QIODevice::constructing_QTcpSocket() { -#if defined(Q_OS_WINRT) - QSKIP("Synchronous socket calls are broken on winrt. See QTBUG-40922"); -#endif if (!QtNetworkSettings::verifyTestNetworkSettings()) QSKIP("No network test server available"); @@ -263,9 +260,6 @@ void tst_QIODevice::unget() buffer.ungetChar('Q'); QCOMPARE(buffer.readLine(buf, 3), qint64(1)); -#if defined(Q_OS_WINRT) - QSKIP("Synchronous socket calls are broken on winrt. See QTBUG-40922"); -#endif for (int i = 0; i < 2; ++i) { QTcpSocket socket; QIODevice *dev; diff --git a/tests/auto/corelib/io/qlockfile/CMakeLists.txt b/tests/auto/corelib/io/qlockfile/CMakeLists.txt index a41c442b58..d422ae9d24 100644 --- a/tests/auto/corelib/io/qlockfile/CMakeLists.txt +++ b/tests/auto/corelib/io/qlockfile/CMakeLists.txt @@ -15,7 +15,7 @@ add_qt_test(tst_qlockfile ## Scopes: ##################################################################### -extend_target(tst_qlockfile CONDITION WIN32 AND NOT WINRT +extend_target(tst_qlockfile CONDITION WIN32 PUBLIC_LIBRARIES advapi32 ) diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp index 1d79d0dd1f..42bdf3eabf 100644 --- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp +++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp @@ -35,7 +35,7 @@ #if defined(Q_OS_UNIX) && !defined(Q_OS_VXWORKS) #include #include -#elif defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#elif defined(Q_OS_WIN) # include #endif @@ -289,7 +289,7 @@ void tst_QLockFile::staleLockFromCrashedProcessReusedPid() { #if !QT_CONFIG(process) QSKIP("This test requires QProcess support"); -#elif defined(Q_OS_WINRT) || defined(QT_PLATFORM_UIKIT) +#elif defined(QT_PLATFORM_UIKIT) QSKIP("We cannot retrieve information about other processes on this platform."); #else const QString fileName = dir.path() + "/staleLockFromCrashedProcessReusedPid"; @@ -463,7 +463,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(ProcessProperties) static inline ProcessProperties processProperties() { ProcessProperties result; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) HANDLE processToken = NULL; if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &processToken)) { DWORD elevation; // struct containing a DWORD, not present in some MinGW headers. @@ -492,7 +492,7 @@ void tst_QLockFile::noPermissionsWindows() { // Windows: Do the permissions test in a system directory in which // files cannot be created. -#if !defined(Q_OS_WIN) || defined(Q_OS_WINRT) +#if !defined(Q_OS_WIN) QSKIP("This test is for desktop Windows only"); #endif #ifdef Q_OS_WIN diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro b/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro index e33e22b36f..8ac76b0317 100644 --- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro +++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.pro @@ -3,4 +3,4 @@ TARGET = tst_qlockfile SOURCES += tst_qlockfile.cpp QT = core-private testlib concurrent -win32:!winrt: QMAKE_USE += advapi32 +win32: QMAKE_USE += advapi32 diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp index cef03c4591..d5f2da06d2 100644 --- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp +++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp @@ -56,9 +56,7 @@ #if defined(Q_OS_WIN) #include -#ifndef Q_OS_WINRT -# include -#endif +#include #else #include #endif @@ -77,7 +75,7 @@ QT_FORWARD_DECLARE_CLASS(QSettings) static inline bool canWriteNativeSystemSettings() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) HKEY key; const LONG result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software", 0, KEY_WRITE, &key); if (result == ERROR_SUCCESS) @@ -159,7 +157,7 @@ private slots: #if !defined(Q_OS_WIN) && !defined(QT_QSETTINGS_ALWAYS_CASE_SENSITIVE_AND_FORGET_ORIGINAL_KEY_ORDER) void dontReorderIniKeysNeedlessly(); #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) void consistentRegistryStorage(); #endif @@ -214,12 +212,7 @@ void tst_QSettings::getSetCheck() static QString settingsPath(const char *path = nullptr) { // Temporary path for files that are specified explicitly in the constructor. -#ifndef Q_OS_WINRT static const QString tempPath = QDir::tempPath() + QLatin1String("/tst_QSettings"); -#else - static const QString tempPath = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) - + QLatin1String("/tst_QSettings"); -#endif return path && *path ? tempPath + QLatin1Char('/') + QLatin1String(path) : tempPath; } @@ -324,7 +317,7 @@ void tst_QSettings::cleanupTestFiles() if (settingsDir.exists()) QVERIFY(settingsDir.removeRecursively()); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QSettings("HKEY_CURRENT_USER\\Software\\software.org", QSettings::NativeFormat).clear(); QSettings("HKEY_CURRENT_USER\\Software\\other.software.org", QSettings::NativeFormat).clear(); QSettings("HKEY_CURRENT_USER\\Software\\foo", QSettings::NativeFormat).clear(); @@ -339,7 +332,7 @@ void tst_QSettings::cleanupTestFiles() QSettings("HKEY_LOCAL_MACHINE\\Software\\bat", QSettings::NativeFormat).clear(); QSettings("HKEY_LOCAL_MACHINE\\Software\\baz", QSettings::NativeFormat).clear(); } -#elif defined(Q_OS_DARWIN) || defined(Q_OS_WINRT) +#elif defined(Q_OS_DARWIN) QSettings(QSettings::UserScope, "software.org", "KillerAPP").clear(); QSettings(QSettings::SystemScope, "software.org", "KillerAPP").clear(); QSettings(QSettings::UserScope, "other.software.org", "KillerAPP").clear(); @@ -352,12 +345,7 @@ void tst_QSettings::cleanupTestFiles() const QString foo(QLatin1String("foo")); -#if defined(Q_OS_WINRT) - QSettings(foo, QSettings::NativeFormat).clear(); - QFile fooFile(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + QLatin1Char('/') + foo); -#else QFile fooFile(foo); -#endif if (fooFile.exists()) QVERIFY2(fooFile.remove(), qPrintable(fooFile.errorString())); } @@ -540,7 +528,7 @@ void tst_QSettings::ctor() } else { caseSensitive = pathconf(settings5.fileName().toLatin1().constData(), _PC_CASE_SENSITIVE); } -#elif defined(Q_OS_WIN32) || defined(Q_OS_WINRT) +#elif defined(Q_OS_WIN32) caseSensitive = false; #endif if (caseSensitive) @@ -614,8 +602,8 @@ void tst_QSettings::ctor() QCoreApplication::instance()->setOrganizationName(""); QCoreApplication::instance()->setApplicationName(""); QSettings settings; -#if defined(Q_OS_MAC) || defined(Q_OS_WINRT) - QEXPECT_FAIL("native", "Default settings on Mac/WinRT are valid, despite organization domain, name, and app name being null", Continue); +#if defined(Q_OS_MAC) + QEXPECT_FAIL("native", "Default settings on Mac are valid, despite organization domain, name, and app name being null", Continue); #endif QCOMPARE(settings.status(), QSettings::AccessError); QCoreApplication::instance()->setOrganizationName("software.org"); @@ -629,8 +617,8 @@ void tst_QSettings::ctor() } QSettings settings(format, QSettings::UserScope, "", ""); -#if defined(Q_OS_MAC) || defined(Q_OS_WINRT) - QEXPECT_FAIL("native", "Default settings on Mac/WinRT are valid, despite organization domain, name, and app name being null", Continue); +#if defined(Q_OS_MAC) + QEXPECT_FAIL("native", "Default settings on Mac are valid, despite organization domain, name, and app name being null", Continue); #endif QCOMPARE(settings.status(), QSettings::AccessError); QSettings settings2(format, QSettings::UserScope, "software.org", "KillerAPP"); @@ -1724,14 +1712,9 @@ void tst_QSettings::sync() // Now "some other app" will change other.software.org.ini QString userConfDir = settingsPath("__user__") + QDir::separator(); -#if !defined(Q_OS_WINRT) unlink((userConfDir + "other.software.org.ini").toLatin1()); rename((userConfDir + "software.org.ini").toLatin1(), (userConfDir + "other.software.org.ini").toLatin1()); -#else - QFile::remove(userConfDir + "other.software.org.ini"); - QFile::rename(userConfDir + "software.org.ini" , userConfDir + "other.software.org.ini"); -#endif settings2.sync(); @@ -2265,7 +2248,7 @@ void tst_QSettings::testRegistryShortRootNames() void tst_QSettings::testRegistry32And64Bit() { -#if !defined (Q_OS_WIN) || defined(Q_OS_WINRT) +#if !defined (Q_OS_WIN) QSKIP("This test is specific to the Windows registry.", SkipAll); #else @@ -2346,7 +2329,7 @@ void tst_QSettings::fromFile() QString path = "foo"; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) if (format == QSettings::NativeFormat) path = "\\HKEY_CURRENT_USER\\Software\\foo"; #endif @@ -3491,7 +3474,7 @@ void tst_QSettings::rainersSyncBugOnMac() { QFETCH(QSettings::Format, format); -#if defined(Q_OS_DARWIN) || defined(Q_OS_WINRT) +#if defined(Q_OS_DARWIN) if (format == QSettings::NativeFormat) QSKIP("Apple OSes do not support direct reads from and writes to .plist files, due to caching and background syncing. See QTBUG-34899."); #endif @@ -3526,7 +3509,7 @@ void tst_QSettings::recursionBug() } } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) static DWORD readKeyType(HKEY handle, QStringView rSubKey) { diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index d0fbdb7a2a..cba7dfe9fc 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -33,7 +33,7 @@ #include #include #include -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) # include #endif @@ -131,7 +131,7 @@ static const char * const enumNames[MaxStandardLocation + 1 - int(QStandardPaths void tst_qstandardpaths::initTestCase() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) // Disable WOW64 redirection, see testFindExecutable() if (QSysInfo::buildCpuArchitecture() != QSysInfo::currentCpuArchitecture()) { void *oldMode; @@ -140,7 +140,7 @@ void tst_qstandardpaths::initTestCase() qErrnoWarning("Wow64DisableWow64FsRedirection() failed"); QVERIFY(disabledDisableWow64FsRedirection); } -#endif // Q_OS_WIN && !Q_OS_WINRT +#endif // Q_OS_WIN QVERIFY2(m_localConfigTempDir.isValid(), qPrintable(m_localConfigTempDir.errorString())); QVERIFY2(m_globalConfigTempDir.isValid(), qPrintable(m_globalConfigTempDir.errorString())); QVERIFY2(m_localAppTempDir.isValid(), qPrintable(m_localAppTempDir.errorString())); @@ -308,9 +308,9 @@ void tst_qstandardpaths::testDataLocation() { // On all platforms, DataLocation should be GenericDataLocation / organization name / app name // This allows one app to access the data of another app. - // Android and WinRT are an exception to this case, owing to the fact that + // Android is an exception to this case, owing to the fact that // applications are sandboxed. -#if !defined(Q_OS_ANDROID) && !defined(Q_OS_WINRT) +#if !defined(Q_OS_ANDROID) const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation), base + "/tst_qstandardpaths"); QCoreApplication::instance()->setOrganizationName("Qt"); @@ -339,7 +339,7 @@ void tst_qstandardpaths::testAppConfigLocation() { // On all platforms where applications are not sandboxed, // AppConfigLocation should be GenericConfigLocation / organization name / app name -#if !defined(Q_OS_ANDROID) && !defined(Q_OS_WINRT) +#if !defined(Q_OS_ANDROID) const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation); QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation), base + "/tst_qstandardpaths"); QCoreApplication::setOrganizationName("Qt"); @@ -381,7 +381,6 @@ void tst_qstandardpaths::testFindExecutable_data() QTest::addColumn("needle"); QTest::addColumn("expected"); #ifdef Q_OS_WIN -# ifndef Q_OS_WINRT const QFileInfo cmdFi = QFileInfo(QDir::cleanPath(QString::fromLocal8Bit(qgetenv("COMSPEC")))); const QString cmdPath = cmdFi.absoluteFilePath(); @@ -406,7 +405,6 @@ void tst_qstandardpaths::testFindExecutable_data() QTest::newRow("win8-logo-nosuffix") << QString() << logo << logoPath; } -# endif // Q_OS_WINRT #else const QFileInfo shFi = findSh(); Q_ASSERT(shFi.exists()); @@ -448,8 +446,6 @@ void tst_qstandardpaths::testFindExecutable() void tst_qstandardpaths::testFindExecutableLinkToDirectory() { - // WinRT has no link support -#ifndef Q_OS_WINRT // link to directory const QString target = QDir::tempPath() + QDir::separator() + QLatin1String("link.lnk"); QFile::remove(target); @@ -457,7 +453,6 @@ void tst_qstandardpaths::testFindExecutableLinkToDirectory() QVERIFY(appFile.link(target)); QVERIFY(QStandardPaths::findExecutable(target).isEmpty()); QFile::remove(target); -#endif } void tst_qstandardpaths::testRuntimeDirectory() diff --git a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp index fe63cecccd..7dd76a2be1 100644 --- a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp +++ b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp @@ -40,14 +40,12 @@ private slots: void defaultValues(); void dump(); void operatorEqual(); -#ifndef Q_OS_WINRT void operatorNotEqual(); void root(); void currentStorage(); void storageList(); void tempFile(); void caching(); -#endif }; void tst_QStorageInfo::defaultValues() @@ -113,7 +111,6 @@ void tst_QStorageInfo::operatorEqual() } } -#ifndef Q_OS_WINRT void tst_QStorageInfo::operatorNotEqual() { QStorageInfo storage1 = QStorageInfo::root(); @@ -230,7 +227,6 @@ void tst_QStorageInfo::caching() } QVERIFY(free != storage2.bytesFree()); } -#endif QTEST_MAIN(tst_QStorageInfo) diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp index b4fa0b41fe..40582eba1b 100644 --- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp +++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp @@ -332,7 +332,7 @@ void tst_QTemporaryDir::nonWritableCurrentDir() void tst_QTemporaryDir::openOnRootDrives() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) unsigned int lastErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS); #endif // If it's possible to create a file in the root directory, it @@ -346,7 +346,7 @@ void tst_QTemporaryDir::openOnRootDrives() QVERIFY(dir.isValid()); } } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) SetErrorMode(lastErrorMode); #endif } diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp index bfa9f1d744..59ded3b0c4 100644 --- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp +++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp @@ -504,7 +504,7 @@ void tst_QTemporaryFile::resize() void tst_QTemporaryFile::openOnRootDrives() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) unsigned int lastErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS); #endif // If it's possible to create a file in the root directory, it @@ -521,7 +521,7 @@ void tst_QTemporaryFile::openOnRootDrives() QCOMPARE(fi.absoluteDir(), driveInfo.filePath()); } } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) SetErrorMode(lastErrorMode); #endif } diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index 5a04d194a5..26b740ae20 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -3169,12 +3169,10 @@ void tst_QUrl::fromUserInputWithCwd_data() QTest::newRow(QByteArray(fileName) + "-in-dot") << fileName << QStringLiteral(".") << url << url; } -#ifndef Q_OS_WINRT // WinRT cannot cd outside current / sandbox QDir parent(base); QVERIFY(parent.cdUp()); QUrl parentUrl = QUrl::fromLocalFile(parent.path()); QTest::newRow("dotdot") << ".." << base << parentUrl << parentUrl; -#endif QTest::newRow("nonexisting") << "nonexisting" << base << QUrl("http://nonexisting") << QUrl::fromLocalFile(base + "/nonexisting"); QTest::newRow("short-url") << "example.org" << base << QUrl("http://example.org") << QUrl::fromLocalFile(base + "/example.org"); diff --git a/tests/auto/corelib/kernel/.prev_CMakeLists.txt b/tests/auto/corelib/kernel/.prev_CMakeLists.txt index 515720e282..39438deb5b 100644 --- a/tests/auto/corelib/kernel/.prev_CMakeLists.txt +++ b/tests/auto/corelib/kernel/.prev_CMakeLists.txt @@ -4,9 +4,6 @@ add_subdirectory(qcoreapplication) add_subdirectory(qdeadlinetimer) add_subdirectory(qelapsedtimer) add_subdirectory(qeventdispatcher) -if(TARGET Qt::Network) - add_subdirectory(qeventloop) -endif() add_subdirectory(qmath) add_subdirectory(qmetaobject) add_subdirectory(qmetaobjectbuilder) @@ -14,27 +11,33 @@ add_subdirectory(qmetamethod) add_subdirectory(qmetaproperty) add_subdirectory(qmetatype) add_subdirectory(qmetaenum) +add_subdirectory(qpointer) +add_subdirectory(qsignalblocker) +add_subdirectory(qsignalmapper) +add_subdirectory(qtimer) +add_subdirectory(qtranslator) +add_subdirectory(qvariant) +if(TARGET Qt::Network) + add_subdirectory(qeventloop) +endif() if(TARGET Qt::Gui) add_subdirectory(qmimedata) endif() if(TARGET Qt::Network AND NOT ANDROID AND NOT UIKIT) add_subdirectory(qobject) endif() -add_subdirectory(qpointer) if(QT_FEATURE_private_tests AND NOT ANDROID AND NOT UIKIT) add_subdirectory(qsharedmemory) endif() -add_subdirectory(qsignalblocker) -add_subdirectory(qsignalmapper) if(QT_FEATURE_private_tests AND TARGET Qt::Network) add_subdirectory(qsocketnotifier) endif() if(QT_FEATURE_systemsemaphore AND NOT ANDROID AND NOT UIKIT) add_subdirectory(qsystemsemaphore) endif() -add_subdirectory(qtimer) -add_subdirectory(qtranslator) -add_subdirectory(qvariant) -if(win32_x_ AND NOT WINRT) +if(win32_x_) add_subdirectory(qwineventnotifier) endif() +if(QT_FEATURE_private_tests) + add_subdirectory(qproperty) +endif() diff --git a/tests/auto/corelib/kernel/CMakeLists.txt b/tests/auto/corelib/kernel/CMakeLists.txt index f4f7b32bf3..b6a301a618 100644 --- a/tests/auto/corelib/kernel/CMakeLists.txt +++ b/tests/auto/corelib/kernel/CMakeLists.txt @@ -4,9 +4,6 @@ add_subdirectory(qdeadlinetimer) add_subdirectory(qelapsedtimer) add_subdirectory(qeventdispatcher) -if(TARGET Qt::Network) - add_subdirectory(qeventloop) -endif() add_subdirectory(qmath) add_subdirectory(qmetaobject) add_subdirectory(qmetaobjectbuilder) @@ -14,28 +11,31 @@ add_subdirectory(qmetamethod) add_subdirectory(qmetaproperty) add_subdirectory(qmetatype) add_subdirectory(qmetaenum) +add_subdirectory(qpointer) +add_subdirectory(qsignalblocker) +add_subdirectory(qsignalmapper) +# add_subdirectory(qtimer) # special case +add_subdirectory(qtranslator) +add_subdirectory(qvariant) +if(TARGET Qt::Network) + add_subdirectory(qeventloop) +endif() if(TARGET Qt::Gui) add_subdirectory(qmimedata) endif() if(TARGET Qt::Network AND NOT ANDROID AND NOT UIKIT) # add_subdirectory(qobject) # special case endif() -add_subdirectory(qpointer) if(QT_FEATURE_private_tests AND NOT ANDROID AND NOT UIKIT) add_subdirectory(qsharedmemory) endif() -add_subdirectory(qsignalblocker) -add_subdirectory(qsignalmapper) if(QT_FEATURE_private_tests AND TARGET Qt::Network) add_subdirectory(qsocketnotifier) endif() if(QT_FEATURE_systemsemaphore AND NOT ANDROID AND NOT UIKIT) add_subdirectory(qsystemsemaphore) endif() -# add_subdirectory(qtimer) # special case -add_subdirectory(qtranslator) -add_subdirectory(qvariant) -if(win32_x_ AND NOT WINRT) +if(win32_x_) add_subdirectory(qwineventnotifier) endif() if(QT_FEATURE_private_tests) diff --git a/tests/auto/corelib/kernel/kernel.pro b/tests/auto/corelib/kernel/kernel.pro index 26cc00ea40..7c4fd2ec3d 100644 --- a/tests/auto/corelib/kernel/kernel.pro +++ b/tests/auto/corelib/kernel/kernel.pro @@ -40,7 +40,7 @@ SUBDIRS=\ qproperty # This test is only applicable on Windows -!win32*|winrt: SUBDIRS -= qwineventnotifier +!win32*: SUBDIRS -= qwineventnotifier android|uikit: SUBDIRS -= qobject qsharedmemory qsystemsemaphore diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp index 39c90f69b4..2e755351ee 100644 --- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp +++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp @@ -155,9 +155,7 @@ void tst_QCoreApplication::qAppName() void tst_QCoreApplication::qAppVersion() { -#if defined(Q_OS_WINRT) - const char appVersion[] = "1.0.0.0"; -#elif defined(Q_OS_WIN) +#if 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"; @@ -192,9 +190,6 @@ void tst_QCoreApplication::qAppVersion() void tst_QCoreApplication::argc() { -#if defined(Q_OS_WINRT) - QSKIP("QCoreApplication::arguments() parses arguments from actual command line on this platform."); -#endif { int argc = 1; char *argv[] = { const_cast(QTest::currentAppName()) }; diff --git a/tests/auto/corelib/kernel/qeventloop/CMakeLists.txt b/tests/auto/corelib/kernel/qeventloop/CMakeLists.txt index ac952f64f7..1b2e058a3d 100644 --- a/tests/auto/corelib/kernel/qeventloop/CMakeLists.txt +++ b/tests/auto/corelib/kernel/qeventloop/CMakeLists.txt @@ -15,7 +15,7 @@ add_qt_test(tst_qeventloop ## Scopes: ##################################################################### -extend_target(tst_qeventloop CONDITION WIN32 AND NOT WINRT +extend_target(tst_qeventloop CONDITION WIN32 PUBLIC_LIBRARIES user32 ) diff --git a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro index 159761c0c6..827ecec883 100644 --- a/tests/auto/corelib/kernel/qeventloop/qeventloop.pro +++ b/tests/auto/corelib/kernel/qeventloop/qeventloop.pro @@ -3,6 +3,6 @@ TARGET = tst_qeventloop QT = core network testlib core-private SOURCES = $$PWD/tst_qeventloop.cpp -win32:!winrt: QMAKE_USE += user32 +win32: QMAKE_USE += user32 qtConfig(glib): DEFINES += HAVE_GLIB diff --git a/tests/auto/corelib/kernel/qmetatype/.prev_CMakeLists.txt b/tests/auto/corelib/kernel/qmetatype/.prev_CMakeLists.txt index 9a0bbc189c..397dbdf850 100644 --- a/tests/auto/corelib/kernel/qmetatype/.prev_CMakeLists.txt +++ b/tests/auto/corelib/kernel/qmetatype/.prev_CMakeLists.txt @@ -22,16 +22,12 @@ add_qt_test(tst_qmetatype ## Scopes: ##################################################################### -extend_target(tst_qmetatype CONDITION MSVC OR WINRT +extend_target(tst_qmetatype CONDITION MSVC COMPILE_OPTIONS /bigobj ) -#### Keys ignored in scope 3:.:.:qmetatype.pro:WINRT: -# QMAKE_CFLAGS_RELEASE = "--O2" -# QMAKE_CXXFLAGS_RELEASE = "--O2" - -#### Keys ignored in scope 4:.:.:qmetatype.pro:CLANG: +#### Keys ignored in scope 3:.:.:qmetatype.pro:CLANG: # QMAKE_CFLAGS_RELEASE = "--O2" "--g" # QMAKE_CXXFLAGS_RELEASE = "--O2" "--g" diff --git a/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt b/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt index 8f72ce51f3..0188d83e59 100644 --- a/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt +++ b/tests/auto/corelib/kernel/qmetatype/CMakeLists.txt @@ -23,16 +23,12 @@ add_qt_test(tst_qmetatype ## Scopes: ##################################################################### -extend_target(tst_qmetatype CONDITION MSVC OR WINRT +extend_target(tst_qmetatype CONDITION MSVC COMPILE_OPTIONS /bigobj ) -#### Keys ignored in scope 3:.:.:qmetatype.pro:WINRT: -# QMAKE_CFLAGS_RELEASE = "--O2" -# QMAKE_CXXFLAGS_RELEASE = "--O2" - -#### Keys ignored in scope 4:.:.:qmetatype.pro:CLANG: +#### Keys ignored in scope 3:.:.:qmetatype.pro:CLANG: # QMAKE_CFLAGS_RELEASE = "--O2" "--g" # QMAKE_CXXFLAGS_RELEASE = "--O2" "--g" diff --git a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro index 56b8c071c3..ae36fb07f9 100644 --- a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro +++ b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro @@ -6,14 +6,9 @@ SOURCES = tst_qmetatype.cpp TESTDATA=./typeFlags.bin DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 -msvc|winrt { +msvc { # Prevents "fatal error C1128: number of sections exceeded object file format limit". QMAKE_CXXFLAGS += /bigobj - # Reduce compile time - winrt { - QMAKE_CXXFLAGS_RELEASE -= -O2 - QMAKE_CFLAGS_RELEASE -= -O2 - } } clang { diff --git a/tests/auto/corelib/kernel/qobject/CMakeLists.txt b/tests/auto/corelib/kernel/qobject/CMakeLists.txt index 3be3287532..ba8c67bd99 100644 --- a/tests/auto/corelib/kernel/qobject/CMakeLists.txt +++ b/tests/auto/corelib/kernel/qobject/CMakeLists.txt @@ -9,21 +9,11 @@ add_qt_test(tst_qobject tst_qobject.cpp DEFINES QT_DISABLE_DEPRECATED_BEFORE=0 - LIBRARIES - Qt::CorePrivate PUBLIC_LIBRARIES + Qt::CorePrivate Qt::Network ) -#### Keys ignored in scope 3:.:.:test.pro:: -# CONFIG = "testcase" "console" - ## Scopes: ##################################################################### - -#### Keys ignored in scope 4:.:.:test.pro:QT_CONFIG___contains___c++1z: -# CONFIG = "c++1z" - -if(NOT WINRT) - add_subdirectory(signalbug) -endif() +add_subdirectory(signalbug) diff --git a/tests/auto/corelib/kernel/qobject/qobject.pro b/tests/auto/corelib/kernel/qobject/qobject.pro index 75ad7b5f14..bdbec1e9f8 100644 --- a/tests/auto/corelib/kernel/qobject/qobject.pro +++ b/tests/auto/corelib/kernel/qobject/qobject.pro @@ -1,4 +1,4 @@ TEMPLATE = subdirs -SUBDIRS += test.pro -!winrt: SUBDIRS += signalbug +SUBDIRS += test.pro \ + signalbug diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index 917c4e639f..b2dc3c7297 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -1862,8 +1862,6 @@ void tst_QObject::moveToThread() thread.wait(); } - // WinRT does not allow connection to localhost -#ifndef Q_OS_WINRT { // make sure socket notifiers are moved with the object MoveToThreadThread thread; @@ -1899,7 +1897,6 @@ void tst_QObject::moveToThread() QMetaObject::invokeMethod(socket, "deleteLater", Qt::QueuedConnection); thread.wait(); } -#endif } diff --git a/tests/auto/corelib/kernel/qsharedmemory/.prev_CMakeLists.txt b/tests/auto/corelib/kernel/qsharedmemory/.prev_CMakeLists.txt new file mode 100644 index 0000000000..7cd08cd377 --- /dev/null +++ b/tests/auto/corelib/kernel/qsharedmemory/.prev_CMakeLists.txt @@ -0,0 +1,23 @@ +# Generated from qsharedmemory.pro. + + ##################################################################### + ## tst_qsharedmemory Test: + ##################################################################### + + add_qt_test(tst_qsharedmemory + SOURCES + tst_qsharedmemory.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + ) + + ## Scopes: + ##################################################################### + + extend_target(tst_qsharedmemory CONDITION LINUX + PUBLIC_LIBRARIES + rt + ) +if(QT_FEATURE_sharedmemory) + add_subdirectory(producerconsumer) +endif() diff --git a/tests/auto/corelib/kernel/qsharedmemory/CMakeLists.txt b/tests/auto/corelib/kernel/qsharedmemory/CMakeLists.txt index 366e76d034..c96e6a8825 100644 --- a/tests/auto/corelib/kernel/qsharedmemory/CMakeLists.txt +++ b/tests/auto/corelib/kernel/qsharedmemory/CMakeLists.txt @@ -1,7 +1,6 @@ # Generated from qsharedmemory.pro. - -if(QT_FEATURE_sharedmemory) +if(QT_FEATURE_sharedmemory) # special case ##################################################################### ## tst_qsharedmemory Test: ##################################################################### @@ -9,13 +8,10 @@ if(QT_FEATURE_sharedmemory) add_qt_test(tst_qsharedmemory SOURCES tst_qsharedmemory.cpp - LIBRARIES + PUBLIC_LIBRARIES Qt::CorePrivate ) -#### Keys ignored in scope 4:.:.:test.pro:: - # CONFIG = "testcase" - ## Scopes: ##################################################################### @@ -23,8 +19,6 @@ if(QT_FEATURE_sharedmemory) PUBLIC_LIBRARIES rt ) - - if(NOT WINRT) - add_subdirectory(producerconsumer) - endif() +# if(QT_FEATURE_sharedmemory) # special case + add_subdirectory(producerconsumer) endif() diff --git a/tests/auto/corelib/kernel/qsharedmemory/qsharedmemory.pro b/tests/auto/corelib/kernel/qsharedmemory/qsharedmemory.pro index 323d5bbd37..91ac28fe0d 100644 --- a/tests/auto/corelib/kernel/qsharedmemory/qsharedmemory.pro +++ b/tests/auto/corelib/kernel/qsharedmemory/qsharedmemory.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs qtConfig(sharedmemory) { - !winrt: SUBDIRS = producerconsumer - SUBDIRS += test.pro + SUBDIRS = producerconsumer \ + test.pro } diff --git a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp index 8ba3505d8b..9ab540cdf2 100644 --- a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp +++ b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp @@ -36,11 +36,7 @@ #include #include #include -#ifndef Q_OS_WINRT #include -#else -#include -#endif #define NATIVESOCKETENGINE QNativeSocketEngine #ifdef Q_OS_UNIX #include @@ -130,10 +126,6 @@ signals: void tst_QSocketNotifier::unexpectedDisconnection() { -#ifdef Q_OS_WINRT - // WinRT does not allow a connection to the localhost - QSKIP("Local connection not allowed", SkipAll); -#else /* Given two sockets and two QSocketNotifiers registered on each their socket. If both sockets receive data, and the first slot @@ -199,7 +191,6 @@ void tst_QSocketNotifier::unexpectedDisconnection() writeEnd1->close(); writeEnd2->close(); server.close(); -#endif // !Q_OS_WINRT } class MixingWithTimersHelper : public QObject @@ -238,9 +229,6 @@ void MixingWithTimersHelper::socketFired() void tst_QSocketNotifier::mixingWithTimers() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not allow connection to localhost", SkipAll); -#else QTimer timer; timer.setInterval(0); timer.start(); @@ -265,7 +253,6 @@ void tst_QSocketNotifier::mixingWithTimers() QCOMPARE(helper.timerActivated, true); QTRY_COMPARE(helper.socketActivated, true); -#endif // !Q_OS_WINRT } #ifdef Q_OS_UNIX @@ -354,9 +341,6 @@ void tst_QSocketNotifier::async_writeDatagramSlot() void tst_QSocketNotifier::asyncMultipleDatagram() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not allow connection to localhost", SkipAll); -#else m_asyncSender = new QUdpSocket; m_asyncReceiver = new QUdpSocket; @@ -386,7 +370,6 @@ void tst_QSocketNotifier::asyncMultipleDatagram() delete m_asyncSender; delete m_asyncReceiver; - #endif // !Q_OS_WINRT } void tst_QSocketNotifier::activationReason_data() diff --git a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp index 9fde7da816..a2fb035557 100644 --- a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp +++ b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp @@ -86,15 +86,15 @@ void tst_QTranslator::initTestCase() // chdir into the directory containing our testdata, // to make the code simpler (load testdata via relative paths) -#ifdef Q_OS_WINRT +#if 0 // ### TODO: Use this for all platforms in 5.7 dataDir = QEXTRACTTESTDATA(QStringLiteral("/")); QVERIFY2(!dataDir.isNull(), qPrintable("Could not extract test data")); QVERIFY2(QDir::setCurrent(dataDir->path()), qPrintable("Could not chdir to " + dataDir->path())); -#else // !Q_OS_WINRT +#else QString testdata_dir = QFileInfo(QFINDTESTDATA("hellotr_la.qm")).absolutePath(); QVERIFY2(QDir::setCurrent(testdata_dir), qPrintable("Could not chdir to " + testdata_dir)); -#endif // !Q_OS_WINRT +#endif } diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt index 940dcc2b09..fe5670da88 100644 --- a/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt +++ b/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt @@ -22,12 +22,6 @@ add_cmake_library(plugin1 ## Scopes: ##################################################################### -#### Keys ignored in scope 6:.:..:../winrt.pri:(CMAKE_BUILD_TYPE STREQUAL Debug): -# DESTDIR = "../debug/bin" - -#### Keys ignored in scope 7:.:..:../winrt.pri:else: -# DESTDIR = "../release/bin" - extend_target(plugin1 CONDITION NOT QT_FEATURE_library DEFINES QT_STATICPLUGIN diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.pro b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.pro index 44ef12db29..964e466228 100644 --- a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.pro +++ b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.pro @@ -5,7 +5,6 @@ HEADERS = plugin1.h SOURCES = plugin1.cpp TARGET = $$qtLibraryTarget(plugin1) DESTDIR = ../bin -winrt:include(../winrt.pri) !qtConfig(library): DEFINES += QT_STATICPLUGIN diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt index 2df999c292..fe616f7cb2 100644 --- a/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt +++ b/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt @@ -22,12 +22,6 @@ add_cmake_library(plugin2 ## Scopes: ##################################################################### -#### Keys ignored in scope 6:.:..:../winrt.pri:(CMAKE_BUILD_TYPE STREQUAL Debug): -# DESTDIR = "../debug/bin" - -#### Keys ignored in scope 7:.:..:../winrt.pri:else: -# DESTDIR = "../release/bin" - extend_target(plugin2 CONDITION NOT QT_FEATURE_library DEFINES QT_STATICPLUGIN diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.pro b/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.pro index 5689919108..cc888f1d10 100644 --- a/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.pro +++ b/tests/auto/corelib/plugin/qfactoryloader/plugin2/plugin2.pro @@ -5,7 +5,6 @@ HEADERS = plugin2.h SOURCES = plugin2.cpp TARGET = $$qtLibraryTarget(plugin2) DESTDIR = ../bin -winrt:include(../winrt.pri) !qtConfig(library): DEFINES += QT_STATICPLUGIN diff --git a/tests/auto/corelib/plugin/qfactoryloader/winrt.pri b/tests/auto/corelib/plugin/qfactoryloader/winrt.pri deleted file mode 100644 index 31602634b2..0000000000 --- a/tests/auto/corelib/plugin/qfactoryloader/winrt.pri +++ /dev/null @@ -1,9 +0,0 @@ -# We cannot use TESTDATA as plugins have to reside physically -# inside the package directory -winrt { - CONFIG(debug, debug|release) { - DESTDIR = ../debug/bin - } else { - DESTDIR = ../release/bin - } -} diff --git a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp index 50c4d9b467..0898817240 100644 --- a/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp +++ b/tests/auto/corelib/plugin/qlibrary/tst_qlibrary.cpp @@ -159,13 +159,11 @@ void tst_QLibrary::initTestCase() } directory = tempDir->path(); temporaryDir = std::move(tempDir); -#elif !defined(Q_OS_WINRT) +#else // chdir to our testdata directory, and use relative paths in some tests. QString testdatadir = QFileInfo(QFINDTESTDATA("library_path")).absolutePath(); QVERIFY2(QDir::setCurrent(testdatadir), qPrintable("Could not chdir to " + testdatadir)); directory = QCoreApplication::applicationDirPath(); -#elif defined(Q_OS_WINRT) - directory = QCoreApplication::applicationDirPath(); #endif } @@ -434,7 +432,7 @@ void tst_QLibrary::loadHints_data() QString appDir = directory; lh |= QLibrary::ResolveAllSymbolsHint; -# if defined(Q_OS_WIN32) || defined(Q_OS_WINRT) +# if defined(Q_OS_WIN32) QTest::newRow( "ok01 (with suffix)" ) << appDir + "/mylib.dll" << int(lh) << true; QTest::newRow( "ok02 (with non-standard suffix)" ) << appDir + "/mylib.dl2" << int(lh) << true; QTest::newRow( "ok03 (with many dots)" ) << appDir + "/system.qt.test.mylib.dll" << int(lh) << true; @@ -486,7 +484,7 @@ void tst_QLibrary::fileName_data() QTest::newRow( "ok02" ) << sys_qualifiedLibraryName(QLatin1String("mylib")) << sys_qualifiedLibraryName(QLatin1String("mylib")); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QTest::newRow( "ok03" ) << "user32" << "USER32.dll"; #endif diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/lib/.prev_CMakeLists.txt index 74945fc6d8..dddd7cb953 100644 --- a/tests/auto/corelib/plugin/qpluginloader/lib/.prev_CMakeLists.txt +++ b/tests/auto/corelib/plugin/qpluginloader/lib/.prev_CMakeLists.txt @@ -22,12 +22,6 @@ add_cmake_library(tst_qpluginloaderlib ## Scopes: ##################################################################### -#### Keys ignored in scope 6:.:..:../winrt.pri:(CMAKE_BUILD_TYPE STREQUAL Debug): -# DESTDIR = "../debug/bin" - -#### Keys ignored in scope 7:.:..:../winrt.pri:else: -# DESTDIR = "../release/bin" - extend_target(tst_qpluginloaderlib CONDITION MSVC DEFINES WIN32_MSVC diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt index 8d723cf3ce..aa980eabaa 100644 --- a/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt +++ b/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt @@ -22,12 +22,6 @@ add_cmake_library(tst_qpluginloaderlib ## Scopes: ##################################################################### -#### Keys ignored in scope 6:.:..:../winrt.pri:(CMAKE_BUILD_TYPE STREQUAL Debug): -# DESTDIR = "../debug/bin" - -#### Keys ignored in scope 7:.:..:../winrt.pri:else: -# DESTDIR = "../release/bin" - extend_target(tst_qpluginloaderlib CONDITION MSVC DEFINES WIN32_MSVC diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/lib.pro b/tests/auto/corelib/plugin/qpluginloader/lib/lib.pro index 9fc76a4201..aa72a80559 100644 --- a/tests/auto/corelib/plugin/qpluginloader/lib/lib.pro +++ b/tests/auto/corelib/plugin/qpluginloader/lib/lib.pro @@ -4,7 +4,6 @@ CONFIG -= staticlib SOURCES = mylib.c TARGET = tst_qpluginloaderlib DESTDIR = ../bin -winrt:include(../winrt.pri) QT = core msvc: DEFINES += WIN32_MSVC diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt index 5389790fba..83f5f0605e 100644 --- a/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt +++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt @@ -19,13 +19,4 @@ add_cmake_library(theplugin # TEMPLATE = "lib" # target.path = "$$[QT_INSTALL_TESTS]/tst_qpluginloader/bin" -## Scopes: -##################################################################### - -#### Keys ignored in scope 5:.:..:../winrt.pri:(CMAKE_BUILD_TYPE STREQUAL Debug): -# DESTDIR = "../debug/bin" - -#### Keys ignored in scope 6:.:..:../winrt.pri:else: -# DESTDIR = "../release/bin" - qt_autogen_tools_initial_setup(theplugin) diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro index 6aa8161699..6ec4a8de05 100644 --- a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro +++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.pro @@ -6,7 +6,6 @@ SOURCES = theplugin.cpp #TARGET = $$qtLibraryTarget(theplugin) TARGET = theplugin DESTDIR = ../bin -winrt:include(../winrt.pri) QT = core # This is testdata for the tst_qpluginloader test. diff --git a/tests/auto/corelib/plugin/qpluginloader/winrt.pri b/tests/auto/corelib/plugin/qpluginloader/winrt.pri deleted file mode 100644 index 31602634b2..0000000000 --- a/tests/auto/corelib/plugin/qpluginloader/winrt.pri +++ /dev/null @@ -1,9 +0,0 @@ -# We cannot use TESTDATA as plugins have to reside physically -# inside the package directory -winrt { - CONFIG(debug, debug|release) { - DESTDIR = ../debug/bin - } else { - DESTDIR = ../release/bin - } -} diff --git a/tests/auto/corelib/serialization/qtextstream/BLACKLIST b/tests/auto/corelib/serialization/qtextstream/BLACKLIST index 674569e204..eb50b6f59c 100644 --- a/tests/auto/corelib/serialization/qtextstream/BLACKLIST +++ b/tests/auto/corelib/serialization/qtextstream/BLACKLIST @@ -1,3 +1,2 @@ [stillOpenWhenAtEnd] windows-7sp1 -winrt diff --git a/tests/auto/corelib/text/qlocale/CMakeLists.txt b/tests/auto/corelib/text/qlocale/CMakeLists.txt index 0f5a98ccce..363baa8d52 100644 --- a/tests/auto/corelib/text/qlocale/CMakeLists.txt +++ b/tests/auto/corelib/text/qlocale/CMakeLists.txt @@ -1,6 +1,4 @@ # Generated from qlocale.pro. add_subdirectory(test) -if(NOT WINRT) - add_subdirectory(syslocaleapp) -endif() +add_subdirectory(syslocaleapp) diff --git a/tests/auto/corelib/text/qlocale/qlocale.pro b/tests/auto/corelib/text/qlocale/qlocale.pro index 5161200260..abbe31d1ef 100644 --- a/tests/auto/corelib/text/qlocale/qlocale.pro +++ b/tests/auto/corelib/text/qlocale/qlocale.pro @@ -1,4 +1,4 @@ TEMPLATE = subdirs -SUBDIRS += test -!winrt: SUBDIRS+=syslocaleapp +SUBDIRS += test \ + syslocaleapp diff --git a/tests/auto/corelib/text/qlocale/test/CMakeLists.txt b/tests/auto/corelib/text/qlocale/test/CMakeLists.txt index 19d454d530..399b22327e 100644 --- a/tests/auto/corelib/text/qlocale/test/CMakeLists.txt +++ b/tests/auto/corelib/text/qlocale/test/CMakeLists.txt @@ -25,5 +25,5 @@ qt_extend_target(tst_qlocale CONDITION NOT QT_FEATURE_doubleconversion AND NOT Q QT_NO_DOUBLECONVERSION ) -#### Keys ignored in scope 7:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 7:.:.:test.pro:NOT ANDROID: # TEST_HELPER_INSTALLS = "../syslocaleapp/syslocaleapp" diff --git a/tests/auto/corelib/text/qlocale/test/test.pro b/tests/auto/corelib/text/qlocale/test/test.pro index f7243e99a7..7f38528f5f 100644 --- a/tests/auto/corelib/text/qlocale/test/test.pro +++ b/tests/auto/corelib/text/qlocale/test/test.pro @@ -16,4 +16,4 @@ win32 { } } -!android:!winrt: TEST_HELPER_INSTALLS = ../syslocaleapp/syslocaleapp +!android: TEST_HELPER_INSTALLS = ../syslocaleapp/syslocaleapp diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp index b46f9aa567..4078805221 100644 --- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp @@ -70,7 +70,7 @@ public: private slots: void initTestCase(); void cleanupTestCase(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) void windowsDefaultLocale(); #endif #ifdef Q_OS_MAC @@ -2016,7 +2016,7 @@ void tst_QLocale::macDefaultLocale() } #endif // Q_OS_MAC -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) #include static QString getWinLocaleInfo(LCTYPE type) @@ -2126,7 +2126,7 @@ void tst_QLocale::windowsDefaultLocale() QCOMPARE(locale.toString(QDateTime(QDate(1974, 12, 1), QTime(1,2,3)), QLocale::LongFormat), QStringLiteral("1@12@1974 ") + expectedFormattedLongTime); } -#endif // Q_OS_WIN but !Q_OS_WINRT +#endif // Q_OS_WIN void tst_QLocale::numberOptions() { diff --git a/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp b/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp index 48f6628be1..ad973f73fc 100644 --- a/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp +++ b/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp @@ -2105,16 +2105,12 @@ void tst_QRegularExpression::threadSafety_data() QTest::addRow("pattern%d", ++i) << "ab.*cd" << subject; } - // pcre2 does not support JIT for winrt. As this test row takes a long time without JIT we skip - // it for winrt as it might time out in COIN. -#ifndef Q_OS_WINRT { QString subject = "ab"; subject.append(QString(512*1024, QLatin1Char('x'))); subject.append("c"); QTest::addRow("pattern%d", ++i) << "ab.*cd" << subject; } -#endif // Q_OS_WINRT { QString subject = "ab"; diff --git a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp index 47bae585a1..0fe6a5294d 100644 --- a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp +++ b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp @@ -39,11 +39,7 @@ #endif #if defined(Q_OS_WIN) # include -# ifndef Q_OS_WINRT -# define sleep(X) Sleep(X) -# else -# define sleep(X) WaitForSingleObjectEx(GetCurrentThread(), X, FALSE); -# endif +# define sleep(X) Sleep(X) #endif //on solaris, threads that loop on the release bool variable diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp index 7be2f48758..b5520ac9bb 100644 --- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp +++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp @@ -471,8 +471,8 @@ void tst_QThread::start() void tst_QThread::terminate() { -#if defined(Q_OS_WINRT) || defined(Q_OS_ANDROID) - QSKIP("Thread termination is not supported on WinRT or Android."); +#if defined(Q_OS_ANDROID) + QSKIP("Thread termination is not supported on Android."); #endif Terminate_Thread thread; { @@ -537,8 +537,8 @@ void tst_QThread::finished() void tst_QThread::terminated() { -#if defined(Q_OS_WINRT) || defined(Q_OS_ANDROID) - QSKIP("Thread termination is not supported on WinRT or Android."); +#if defined(Q_OS_ANDROID) + QSKIP("Thread termination is not supported on Android."); #endif SignalRecorder recorder; Terminate_Thread thread; @@ -674,8 +674,6 @@ void NativeThreadWrapper::start(FunctionPointer functionPointer, void *data) #if defined Q_OS_UNIX const int state = pthread_create(&nativeThreadHandle, 0, NativeThreadWrapper::runUnix, this); Q_UNUSED(state); -#elif defined(Q_OS_WINRT) - nativeThreadHandle = CreateThread(NULL, 0 , (LPTHREAD_START_ROUTINE)NativeThreadWrapper::runWin , this, 0, NULL); #elif defined Q_OS_WIN unsigned thrdid = 0; nativeThreadHandle = (Qt::HANDLE) _beginthreadex(NULL, 0, NativeThreadWrapper::runWin, this, 0, &thrdid); diff --git a/tests/auto/corelib/thread/qthreadstorage/CMakeLists.txt b/tests/auto/corelib/thread/qthreadstorage/CMakeLists.txt index 52a928863c..11ebf34799 100644 --- a/tests/auto/corelib/thread/qthreadstorage/CMakeLists.txt +++ b/tests/auto/corelib/thread/qthreadstorage/CMakeLists.txt @@ -16,6 +16,6 @@ add_qt_test(tst_qthreadstorage ## Scopes: ##################################################################### -if(NOT ANDROID AND NOT WINRT) +if(NOT ANDROID) add_subdirectory(crashonexit) endif() diff --git a/tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro b/tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro index 432c564ba1..c3eae5f7e1 100644 --- a/tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro +++ b/tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs -!android:!winrt { +!android { test.depends = crashonexit SUBDIRS += crashonexit } diff --git a/tests/auto/corelib/thread/qthreadstorage/test/test.pro b/tests/auto/corelib/thread/qthreadstorage/test/test.pro index d2f21f48f0..e0725d038e 100644 --- a/tests/auto/corelib/thread/qthreadstorage/test/test.pro +++ b/tests/auto/corelib/thread/qthreadstorage/test/test.pro @@ -2,14 +2,14 @@ CONFIG += testcase debug_and_release { CONFIG(debug, debug|release) { TARGET = ../../debug/tst_qthreadstorage - !android:!winrt: TEST_HELPER_INSTALLS = ../../debug/crashonexit_helper + !android: TEST_HELPER_INSTALLS = ../../debug/crashonexit_helper } else { TARGET = ../../release/tst_qthreadstorage - !android:!winrt: TEST_HELPER_INSTALLS = ../../release/crashonexit_helper + !android: TEST_HELPER_INSTALLS = ../../release/crashonexit_helper } } else { TARGET = ../tst_qthreadstorage - !android:!winrt: TEST_HELPER_INSTALLS = ../crashonexit_helper + !android: TEST_HELPER_INSTALLS = ../crashonexit_helper } CONFIG += console QT = core testlib diff --git a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp index 3538d90803..737cb86c01 100644 --- a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp +++ b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp @@ -180,13 +180,6 @@ void testAdoptedThreadStorageWin(void *p) } QObject::connect(QThread::currentThread(), SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); } -#ifdef Q_OS_WINRT -unsigned __stdcall testAdoptedThreadStorageWinRT(void *p) -{ - testAdoptedThreadStorageWin(p); - return 0; -} -#endif void *testAdoptedThreadStorageUnix(void *pointers) { testAdoptedThreadStorageWin(pointers); @@ -204,11 +197,6 @@ void tst_QThreadStorage::adoptedThreads() const int state = pthread_create(&thread, 0, testAdoptedThreadStorageUnix, &pointers); QCOMPARE(state, 0); pthread_join(thread, 0); -#elif defined Q_OS_WINRT - HANDLE thread; - thread = (HANDLE) _beginthreadex(NULL, 0, testAdoptedThreadStorageWinRT, &pointers, 0, 0); - QVERIFY(thread); - WaitForSingleObjectEx(thread, INFINITE, FALSE); #elif defined Q_OS_WIN HANDLE thread; thread = (HANDLE)_beginthread(testAdoptedThreadStorageWin, 0, &pointers); diff --git a/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp index ac22d32503..7a653e16eb 100644 --- a/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp @@ -3697,9 +3697,6 @@ void tst_QDateTime::timeZones() const void tst_QDateTime::systemTimeZoneChange() const { -#ifdef Q_OS_WINRT - QSKIP("UWP applications cannot change the system`s time zone (sandboxing)"); -#endif // Set the timezone to Brisbane time TimeZoneRollback useZone(QByteArray("AEST-10:00")); -- cgit v1.2.3