diff options
Diffstat (limited to 'tests')
242 files changed, 505 insertions, 1442 deletions
diff --git a/tests/auto/.prev_CMakeLists.txt b/tests/auto/.prev_CMakeLists.txt index 6bbd881af3..8a491d7b9c 100644 --- a/tests/auto/.prev_CMakeLists.txt +++ b/tests/auto/.prev_CMakeLists.txt @@ -18,13 +18,13 @@ endif() if(TARGET Qt::Concurrent) add_subdirectory(concurrent) endif() -if((((TARGET Qt::DBus AND NOT CMAKE_CROSSCOMPILING AND NOT boot2qt) AND (system("dbus-send --session --type=signal / local.AutotestCheck.Hello >_ss_QMAKE_SYSTEM_NULL_DEVICE 2>&1"))))) +if((((system("dbus-send --session --type=signal / local.AutotestCheck.Hello >_ss_QMAKE_SYSTEM_NULL_DEVICE 2>&1")) AND (TARGET Qt::DBus AND NOT CMAKE_CROSSCOMPILING AND NOT boot2qt)))) add_subdirectory(dbus) endif() -if(TARGET Qt::Network AND NOT WINRT) +if(TARGET Qt::Network) add_subdirectory(network) endif() -if(TARGET Qt::OpenGL AND NOT WINRT) +if(TARGET Qt::OpenGL) add_subdirectory(opengl) endif() if(TARGET Qt::PrintSupport) diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt index 703459bb9d..df7bebd0d5 100644 --- a/tests/auto/CMakeLists.txt +++ b/tests/auto/CMakeLists.txt @@ -49,10 +49,10 @@ endif() if (TARGET Qt::Gui) add_subdirectory(gui) endif() -if (TARGET Qt::Network AND NOT WINRT) +if (TARGET Qt::Network) add_subdirectory(network) endif() -if (TARGET Qt::OpenGL AND NOT WINRT) +if (TARGET Qt::OpenGL) add_subdirectory(opengl) endif() if (TARGET Qt::PrintSupport) diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index b0b732d372..25519233a1 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -26,8 +26,8 @@ qtHaveModule(dbus):!cross_compile:!boot2qt { } } qtHaveModule(gui): SUBDIRS += gui -qtHaveModule(network):!winrt: SUBDIRS += network -qtHaveModule(opengl):!winrt: SUBDIRS += opengl +qtHaveModule(network): SUBDIRS += network +qtHaveModule(opengl): SUBDIRS += opengl qtHaveModule(printsupport): SUBDIRS += printsupport qtHaveModule(sql): SUBDIRS += sql qtHaveModule(widgets): SUBDIRS += widgets 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 <sys/stat.h> #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<QString>("fileName"); QTest::addColumn<QString>("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<QString>("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")); @@ -2370,9 +2353,6 @@ void tst_QDir::cdBelowRoot() 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())); QCOMPARE(dir.path(), targetPath); 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 <QtCore/private/qfsfileengine_p.h> -#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<qint64>("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 <shlobj.h> #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 <qt_windows.h> -#if !defined(Q_OS_WINRT) #include <private/qwinregistry_p.h> #include <lm.h> #endif -#endif #include <qplatformdefs.h> #include <qdebug.h> #if defined(Q_OS_WIN) @@ -61,7 +59,7 @@ #include <private/qfileinfo_p.h> #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<QString>("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("<not current drive>: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<int> 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 <QElapsedTimer> #include <QTextStream> #include <QDir> -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) #include <windows.h> #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 <unistd.h> #include <sys/time.h> -#elif defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#elif defined(Q_OS_WIN) # include <qt_windows.h> #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 <QtCore/qt_windows.h> -#ifndef Q_OS_WINRT -# include <private/qwinregistry_p.h> -#endif +#include <private/qwinregistry_p.h> #else #include <unistd.h> #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 <qfileinfo.h> #include <qsysinfo.h> #include <qregularexpression.h> -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) # include <qt_windows.h> #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<QString>("needle"); QTest::addColumn<QString>("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<char*>(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:<TRUE>: -# 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:<TRUE>: - # 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 <QtNetwork/QTcpServer> #include <QtNetwork/QTcpSocket> #include <QtNetwork/QUdpSocket> -#ifndef Q_OS_WINRT #include <private/qnativesocketengine_p.h> -#else -#include <private/qnativesocketengine_winrt_p.h> -#endif #define NATIVESOCKETENGINE QNativeSocketEngine #ifdef Q_OS_UNIX #include <private/qnet_unix_p.h> @@ -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 <qt_windows.h> 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 <qt_windows.h> -# 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")); diff --git a/tests/auto/gui/.prev_CMakeLists.txt b/tests/auto/gui/.prev_CMakeLists.txt index e7317e932c..ad6bb07001 100644 --- a/tests/auto/gui/.prev_CMakeLists.txt +++ b/tests/auto/gui/.prev_CMakeLists.txt @@ -10,7 +10,7 @@ if(NOT UIKIT) add_subdirectory(itemmodels) add_subdirectory(rhi) endif() -if(QT_FEATURE_opengl AND NOT UIKIT AND NOT WINRT) +if(QT_FEATURE_opengl AND NOT UIKIT) add_subdirectory(qopenglconfig) add_subdirectory(qopengl) endif() diff --git a/tests/auto/gui/CMakeLists.txt b/tests/auto/gui/CMakeLists.txt index e9c9ffe9fe..ad6bb07001 100644 --- a/tests/auto/gui/CMakeLists.txt +++ b/tests/auto/gui/CMakeLists.txt @@ -10,9 +10,9 @@ if(NOT UIKIT) add_subdirectory(itemmodels) add_subdirectory(rhi) endif() -if(QT_FEATURE_opengl AND NOT UIKIT AND NOT WINRT) - add_subdirectory(qopenglconfig) - add_subdirectory(qopengl) +if(QT_FEATURE_opengl AND NOT UIKIT) + add_subdirectory(qopenglconfig) + add_subdirectory(qopengl) endif() if(QT_FEATURE_vulkan AND NOT UIKIT) add_subdirectory(qvulkan) diff --git a/tests/auto/gui/gui.pro b/tests/auto/gui/gui.pro index c90fc48251..30c404be57 100644 --- a/tests/auto/gui/gui.pro +++ b/tests/auto/gui/gui.pro @@ -15,6 +15,6 @@ SUBDIRS = \ itemmodels \ rhi -!qtConfig(opengl)|winrt: SUBDIRS -= qopengl qopenglconfig +!qtConfig(opengl): SUBDIRS -= qopengl qopenglconfig !qtConfig(vulkan): SUBDIRS -= qvulkan diff --git a/tests/auto/gui/image/qimage/CMakeLists.txt b/tests/auto/gui/image/qimage/CMakeLists.txt index 865f1124b9..f6125d0fe9 100644 --- a/tests/auto/gui/image/qimage/CMakeLists.txt +++ b/tests/auto/gui/image/qimage/CMakeLists.txt @@ -54,7 +54,7 @@ if(ANDROID AND NOT ANDROID_EMBEDDED) ) endif() -extend_target(tst_qimage CONDITION WIN32 AND NOT WINRT +extend_target(tst_qimage CONDITION WIN32 PUBLIC_LIBRARIES gdi32 user32 diff --git a/tests/auto/gui/image/qimage/qimage.pro b/tests/auto/gui/image/qimage/qimage.pro index 0593cfbc23..c8aa16732e 100644 --- a/tests/auto/gui/image/qimage/qimage.pro +++ b/tests/auto/gui/image/qimage/qimage.pro @@ -7,7 +7,7 @@ qtConfig(c++11): CONFIG += c++11 android:!android-embedded: RESOURCES += qimage.qrc -win32:!winrt: QMAKE_USE += user32 gdi32 +win32: QMAKE_USE += user32 gdi32 darwin: LIBS += -framework CoreGraphics TESTDATA += images/* diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp index 9455e2b6e8..38b3d28901 100644 --- a/tests/auto/gui/image/qimage/tst_qimage.cpp +++ b/tests/auto/gui/image/qimage/tst_qimage.cpp @@ -44,7 +44,7 @@ #include <CoreGraphics/CoreGraphics.h> #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) # include <qt_windows.h> #endif @@ -238,11 +238,11 @@ private slots: void wideImage(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) void toWinHBITMAP_data(); void toWinHBITMAP(); void fromMonoHBITMAP(); -#endif // Q_OS_WIN && !Q_OS_WINRT +#endif // Q_OS_WIN private: const QString m_prefix; @@ -3776,7 +3776,7 @@ void tst_QImage::wideImage() // Qt6: Test that it actually works on 64bit architectures. } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QT_BEGIN_NAMESPACE Q_GUI_EXPORT HBITMAP qt_imageToWinHBITMAP(const QImage &p, int hbitmapFormat = 0); Q_GUI_EXPORT QImage qt_imageFromWinHBITMAP(HBITMAP bitmap, int hbitmapFormat = 0); @@ -3890,7 +3890,7 @@ void tst_QImage::fromMonoHBITMAP() // QTBUG-72343, corruption for mono bitmaps DeleteObject(hbitmap); } -#endif // Q_OS_WIN && !Q_OS_WINRT +#endif // Q_OS_WIN QTEST_GUILESS_MAIN(tst_QImage) #include "tst_qimage.moc" diff --git a/tests/auto/gui/image/qpixmap/CMakeLists.txt b/tests/auto/gui/image/qpixmap/CMakeLists.txt index f6a83aa0da..efdfb3b98e 100644 --- a/tests/auto/gui/image/qpixmap/CMakeLists.txt +++ b/tests/auto/gui/image/qpixmap/CMakeLists.txt @@ -100,7 +100,7 @@ extend_target(tst_qpixmap CONDITION TARGET Qt::Widgets Qt::WidgetsPrivate ) -extend_target(tst_qpixmap CONDITION WIN32 AND NOT WINRT +extend_target(tst_qpixmap CONDITION WIN32 PUBLIC_LIBRARIES gdi32 user32 diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro index c9219dad1d..65294c6aeb 100644 --- a/tests/auto/gui/image/qpixmap/qpixmap.pro +++ b/tests/auto/gui/image/qpixmap/qpixmap.pro @@ -5,7 +5,7 @@ QT += core-private gui-private testlib qtHaveModule(widgets): QT += widgets widgets-private SOURCES += tst_qpixmap.cpp -win32:!winrt: QMAKE_USE += user32 gdi32 +win32: QMAKE_USE += user32 gdi32 RESOURCES += qpixmap.qrc TESTDATA += convertFromImage/* convertFromToHICON/* loadFromData/* images/* diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index 1d77f70919..87d513bacb 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -103,7 +103,7 @@ private slots: void convertFromImageDetach(); void convertFromImageCacheKey(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) void toWinHBITMAP_data(); void toWinHBITMAP(); void fromWinHBITMAP_data(); @@ -841,7 +841,7 @@ void tst_QPixmap::convertFromImageCacheKey() QCOMPARE(copy.cacheKey(), pix.cacheKey()); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QT_BEGIN_NAMESPACE Q_GUI_EXPORT HBITMAP qt_createIconMask(const QBitmap &bitmap); @@ -1057,7 +1057,7 @@ void tst_QPixmap::fromWinHICON() QVERIFY(compareImages(imageFromHICON, imageFromFile)); } -#endif // Q_OS_WIN && !Q_OS_WINRT +#endif // Q_OS_WIN void tst_QPixmap::onlyNullPixmapsOutsideGuiThread() { diff --git a/tests/auto/gui/kernel/CMakeLists.txt b/tests/auto/gui/kernel/CMakeLists.txt index 1cb38a7c9e..10cfe0e628 100644 --- a/tests/auto/gui/kernel/CMakeLists.txt +++ b/tests/auto/gui/kernel/CMakeLists.txt @@ -44,6 +44,6 @@ endif() if(QT_FEATURE_opengl) add_subdirectory(qopenglwindow) endif() -if(TARGET Qt::Network AND WIN32 AND NOT WINRT) +if(TARGET Qt::Network AND WIN32) add_subdirectory(noqteventloop) endif() diff --git a/tests/auto/gui/kernel/kernel.pro b/tests/auto/gui/kernel/kernel.pro index 85bebbddc9..cc57a0cd92 100644 --- a/tests/auto/gui/kernel/kernel.pro +++ b/tests/auto/gui/kernel/kernel.pro @@ -31,7 +31,7 @@ SUBDIRS=\ qrasterwindow \ qaddpostroutine -win32:!winrt:qtHaveModule(network): SUBDIRS += noqteventloop +win32:qtHaveModule(network): SUBDIRS += noqteventloop !qtConfig(shortcut): SUBDIRS -= \ qkeysequence \ diff --git a/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt b/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt index 82de116f8d..4a6ea22d13 100644 --- a/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt +++ b/tests/auto/gui/kernel/noqteventloop/CMakeLists.txt @@ -17,7 +17,7 @@ add_qt_test(tst_noqteventloop ## Scopes: ##################################################################### -extend_target(tst_noqteventloop CONDITION QT_FEATURE_dynamicgl AND WIN32 AND NOT WINRT +extend_target(tst_noqteventloop CONDITION QT_FEATURE_dynamicgl AND WIN32 PUBLIC_LIBRARIES user32 ) diff --git a/tests/auto/gui/kernel/noqteventloop/noqteventloop.pro b/tests/auto/gui/kernel/noqteventloop/noqteventloop.pro index 293a6a8581..7394c6b6ac 100644 --- a/tests/auto/gui/kernel/noqteventloop/noqteventloop.pro +++ b/tests/auto/gui/kernel/noqteventloop/noqteventloop.pro @@ -5,4 +5,4 @@ QT += core-private network gui-private testlib SOURCES += tst_noqteventloop.cpp -qtConfig(dynamicgl):win32:!winrt: QMAKE_USE += user32 +qtConfig(dynamicgl):win32: QMAKE_USE += user32 diff --git a/tests/auto/gui/kernel/qclipboard/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/CMakeLists.txt index b795d32520..05eba972d6 100644 --- a/tests/auto/gui/kernel/qclipboard/CMakeLists.txt +++ b/tests/auto/gui/kernel/qclipboard/CMakeLists.txt @@ -1,7 +1,5 @@ # Generated from qclipboard.pro. +add_subdirectory(copier) +add_subdirectory(paster) add_subdirectory(test) -if(NOT WINRT) - add_subdirectory(copier) - add_subdirectory(paster) -endif() diff --git a/tests/auto/gui/kernel/qclipboard/qclipboard.pro b/tests/auto/gui/kernel/qclipboard/qclipboard.pro index b9fd2080e7..d97c58dea0 100644 --- a/tests/auto/gui/kernel/qclipboard/qclipboard.pro +++ b/tests/auto/gui/kernel/qclipboard/qclipboard.pro @@ -1,4 +1,4 @@ TEMPLATE = subdirs -!winrt: SUBDIRS = copier paster +SUBDIRS = copier paster test.depends += $$SUBDIRS SUBDIRS += test diff --git a/tests/auto/gui/kernel/qclipboard/test/.prev_CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/test/.prev_CMakeLists.txt index 36d9f7b00c..e7c1313c7b 100644 --- a/tests/auto/gui/kernel/qclipboard/test/.prev_CMakeLists.txt +++ b/tests/auto/gui/kernel/qclipboard/test/.prev_CMakeLists.txt @@ -20,5 +20,5 @@ extend_target(tst_qclipboard CONDITION MACOS ${FWAppKit} ) -#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID: # TEST_HELPER_INSTALLS = "../copier/copier" "../paster/paster" diff --git a/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt b/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt index 36d9f7b00c..e7c1313c7b 100644 --- a/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt +++ b/tests/auto/gui/kernel/qclipboard/test/CMakeLists.txt @@ -20,5 +20,5 @@ extend_target(tst_qclipboard CONDITION MACOS ${FWAppKit} ) -#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID: # TEST_HELPER_INSTALLS = "../copier/copier" "../paster/paster" diff --git a/tests/auto/gui/kernel/qclipboard/test/test.pro b/tests/auto/gui/kernel/qclipboard/test/test.pro index 84e80d62e6..3a4ed3a7bc 100644 --- a/tests/auto/gui/kernel/qclipboard/test/test.pro +++ b/tests/auto/gui/kernel/qclipboard/test/test.pro @@ -13,6 +13,6 @@ win32 { } } -!android:!winrt: TEST_HELPER_INSTALLS = \ +!android: TEST_HELPER_INSTALLS = \ ../copier/copier \ ../paster/paster diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp index 3dbff8f435..d3cfeb204a 100644 --- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp +++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp @@ -374,9 +374,6 @@ public: void tst_QGuiApplication::changeFocusWindow() { -#ifdef Q_OS_WINRT - QSKIP("WinRt does not support multiple native windows."); -#endif int argc = 0; QGuiApplication app(argc, nullptr); @@ -635,9 +632,6 @@ public: void tst_QGuiApplication::modalWindow() { -#ifdef Q_OS_WINRT - QSKIP("WinRt does not support multiple native windows."); -#endif int argc = 0; QGuiApplication app(argc, nullptr); const QRect screenGeometry = QGuiApplication::primaryScreen()->availableVirtualGeometry(); diff --git a/tests/auto/gui/kernel/qguieventdispatcher/BLACKLIST b/tests/auto/gui/kernel/qguieventdispatcher/BLACKLIST deleted file mode 100644 index d2c51922a8..0000000000 --- a/tests/auto/gui/kernel/qguieventdispatcher/BLACKLIST +++ /dev/null @@ -1,3 +0,0 @@ -[registerTimer] -winrt - diff --git a/tests/auto/gui/kernel/qguieventloop/.prev_CMakeLists.txt b/tests/auto/gui/kernel/qguieventloop/.prev_CMakeLists.txt index c4daa5a310..7fb82219a9 100644 --- a/tests/auto/gui/kernel/qguieventloop/.prev_CMakeLists.txt +++ b/tests/auto/gui/kernel/qguieventloop/.prev_CMakeLists.txt @@ -17,7 +17,7 @@ add_qt_test(tst_qguieventloop ## Scopes: ##################################################################### -extend_target(tst_qguieventloop CONDITION WIN32 AND NOT WINRT +extend_target(tst_qguieventloop CONDITION WIN32 PUBLIC_LIBRARIES user32 ) diff --git a/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt b/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt index de9a876e9d..3fd943c83c 100644 --- a/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt +++ b/tests/auto/gui/kernel/qguieventloop/CMakeLists.txt @@ -16,7 +16,7 @@ add_qt_test(tst_qguieventloop ## Scopes: ##################################################################### -extend_target(tst_qguieventloop CONDITION WIN32 AND NOT WINRT +extend_target(tst_qguieventloop CONDITION WIN32 PUBLIC_LIBRARIES user32 ) diff --git a/tests/auto/gui/kernel/qopenglwindow/BLACKLIST b/tests/auto/gui/kernel/qopenglwindow/BLACKLIST deleted file mode 100644 index 3ce78abee8..0000000000 --- a/tests/auto/gui/kernel/qopenglwindow/BLACKLIST +++ /dev/null @@ -1,6 +0,0 @@ -[basic] -winrt -[resize] -winrt -[painter] -winrt diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST index 44a55316ab..17fe1f62a6 100644 --- a/tests/auto/gui/kernel/qwindow/BLACKLIST +++ b/tests/auto/gui/kernel/qwindow/BLACKLIST @@ -3,7 +3,6 @@ opensuse-leap [positioning:default] linux macos ci -winrt [positioning:fake] macos ci [modalWithChildWindow] diff --git a/tests/auto/gui/kernel/qwindow/CMakeLists.txt b/tests/auto/gui/kernel/qwindow/CMakeLists.txt index cfd17219bd..60603a219b 100644 --- a/tests/auto/gui/kernel/qwindow/CMakeLists.txt +++ b/tests/auto/gui/kernel/qwindow/CMakeLists.txt @@ -16,7 +16,7 @@ add_qt_test(tst_qwindow ## Scopes: ##################################################################### -extend_target(tst_qwindow CONDITION QT_FEATURE_dynamicgl AND WIN32 AND NOT WINRT +extend_target(tst_qwindow CONDITION QT_FEATURE_dynamicgl AND WIN32 PUBLIC_LIBRARIES user32 ) diff --git a/tests/auto/gui/kernel/qwindow/qwindow.pro b/tests/auto/gui/kernel/qwindow/qwindow.pro index e7931ca773..f97d4ef789 100644 --- a/tests/auto/gui/kernel/qwindow/qwindow.pro +++ b/tests/auto/gui/kernel/qwindow/qwindow.pro @@ -5,4 +5,4 @@ QT += core-private gui-private testlib SOURCES += tst_qwindow.cpp -qtConfig(dynamicgl):win32:!winrt: QMAKE_USE += user32 +qtConfig(dynamicgl):win32: QMAKE_USE += user32 diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index 1db7e9a9c7..5843516d85 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -41,16 +41,10 @@ #if defined(Q_OS_QNX) #include <QOpenGLContext> -#elif defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#elif defined(Q_OS_WIN) # include <QtCore/qt_windows.h> #endif -static bool isPlatformWinRT() -{ - static const bool isWinRT = !QGuiApplication::platformName().compare(QLatin1String("winrt"), Qt::CaseInsensitive); - return isWinRT; -} - class tst_QWindow: public QObject { Q_OBJECT @@ -239,8 +233,6 @@ void tst_QWindow::setVisible() QVERIFY(h.handle()); i.setParent(&h); QVERIFY2(i.handle(), "Making a visible but not created child window child of a created window should create it"); - if (isPlatformWinRT()) - QEXPECT_FAIL("", "Child windows are unsupported on winrt", Continue); QVERIFY(QTest::qWaitForWindowExposed(&i)); } @@ -407,15 +399,11 @@ void tst_QWindow::resizeEventAfterResize() // Make sure we get a resizeEvent after calling resize window.resize(m_testWindowSize); - if (isPlatformWinRT()) - QEXPECT_FAIL("", "Winrt windows are fullscreen by default.", Continue); QTRY_COMPARE(window.received(QEvent::Resize), 2); } void tst_QWindow::exposeEventOnShrink_QTBUG54040() { - if (isPlatformWinRT()) - QSKIP("", "WinRT does not support non-maximized/non-fullscreen top level windows. QTBUG-54528", Continue); Window window; window.setGeometry(QRect(m_availableTopLeft + QPoint(80, 80), m_testWindowSize)); window.setTitle(QTest::currentTestFunction()); @@ -603,8 +591,6 @@ void tst_QWindow::childWindowPositioning() { if (isPlatformWayland()) QSKIP("Wayland: This is flaky (protocol errors for xdg-shell v6). See QTBUG-67648."); - else if (isPlatformWinRT()) - QSKIP("WinRT does not support child windows."); const QPoint topLeftOrigin(0, 0); @@ -796,8 +782,6 @@ void tst_QWindow::isExposed() QCoreApplication::processEvents(); QTRY_VERIFY(window.received(QEvent::Expose) > 1); - if (isPlatformWinRT()) - QEXPECT_FAIL("", "WinRT does not destroy the window. Figure out why. QTBUG-68297", Continue); QTRY_VERIFY(!window.isExposed()); } @@ -832,8 +816,6 @@ void tst_QWindow::isActive() child.setGeometry(10, 10, 20, 20); child.show(); - if (isPlatformWinRT()) - QEXPECT_FAIL("", "WinRT does not support native child windows.", Abort); QTRY_VERIFY(child.isExposed()); child.requestActivate(); @@ -1894,8 +1876,6 @@ void tst_QWindow::initialSize() w.setTitle(QLatin1String(QTest::currentTestFunction())); w.setWidth(m_testWindowSize.width()); w.showNormal(); - if (isPlatformWinRT()) - QEXPECT_FAIL("", "WinRT shows windows as fullscreen by default.", Continue); QTRY_COMPARE(w.width(), m_testWindowSize.width()); QTRY_VERIFY(w.height() > 0); } @@ -1907,8 +1887,6 @@ void tst_QWindow::initialSize() w.showNormal(); const QSize expectedSize = testSize; - if (isPlatformWinRT()) - QEXPECT_FAIL("", "WinRT shows windows as fullscreen by default.", Continue); QTRY_COMPARE(w.size(), expectedSize); } } @@ -1953,8 +1931,6 @@ void tst_QWindow::modalDialog() return; } - if (isPlatformWinRT()) - QEXPECT_FAIL("", "WinRT only support one native window.", Continue); QTRY_COMPARE(QGuiApplication::focusWindow(), &dialog); } @@ -2001,8 +1977,6 @@ void tst_QWindow::modalDialogClosingOneOfTwoModal() return; } - if (isPlatformWinRT()) - QEXPECT_FAIL("", "WinRT only support one native window.", Continue); QTRY_COMPARE(QGuiApplication::focusWindow(), &first_dialog); } @@ -2031,8 +2005,6 @@ void tst_QWindow::modalWithChildWindow() tlw_dialog.show(); QVERIFY(QTest::qWaitForWindowExposed(&tlw_dialog)); - if (isPlatformWinRT()) - QEXPECT_FAIL("", "WinRT only support one native window.", Abort); QVERIFY(QTest::qWaitForWindowExposed(&sub_window)); QTRY_COMPARE(QGuiApplication::focusWindow(), &tlw_dialog); @@ -2087,8 +2059,6 @@ void tst_QWindow::modalWindowPosition() window.setModality(Qt::WindowModal); window.show(); QVERIFY(QTest::qWaitForWindowExposed(&window)); - if (isPlatformWinRT()) - QEXPECT_FAIL("", "WinRT windows are fullscreen by default.", Continue); QCOMPARE(window.geometry(), origGeo); } @@ -2149,9 +2119,6 @@ void tst_QWindow::modalWindowEnterEventOnHide_QTBUG35109() root.resetCounters(); modal.close(); - if (isPlatformWinRT()) - QEXPECT_FAIL("", "WinRT does not trigger the enter event correctly" - "- QTBUG-68297.", Abort); // Check for the enter event QTRY_COMPARE(root.enterEventCount, 1); } @@ -2282,8 +2249,6 @@ void tst_QWindow::spuriousMouseMove() const QString &platformName = QGuiApplication::platformName(); if (platformName == QLatin1String("offscreen") || platformName == QLatin1String("cocoa")) QSKIP("No enter events sent"); - if (isPlatformWayland() || isPlatformWinRT()) - QSKIP("QCursor::setPos() is not supported on this platform"); const QRect screenGeometry = QGuiApplication::primaryScreen()->geometry(); const QPoint center = screenGeometry.center(); QCursor::setPos(center); @@ -2321,7 +2286,7 @@ void tst_QWindow::spuriousMouseMove() static bool isNativeWindowVisible(const QWindow *window) { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) return IsWindowVisible(reinterpret_cast<HWND>(window->winId())); #else Q_UNIMPLEMENTED(); diff --git a/tests/auto/gui/rhi/qrhi/data/buildshaders.bat b/tests/auto/gui/rhi/qrhi/data/buildshaders.bat index 0cfeaaaff3..f4ebae070b 100644 --- a/tests/auto/gui/rhi/qrhi/data/buildshaders.bat +++ b/tests/auto/gui/rhi/qrhi/data/buildshaders.bat @@ -37,9 +37,6 @@ :: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: Note the -c argument: we do not want runtime HLSL compilation since that is -:: not an option on UWP (WinRT). This means that running qsb must happen on Windows. - qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simple.vert.qsb simple.vert qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simple.frag.qsb simple.frag qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simpletextured.vert.qsb simpletextured.vert diff --git a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp index f1e11c4b23..553a6ae7a9 100644 --- a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp +++ b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp @@ -2116,11 +2116,6 @@ void tst_QRhi::renderToWindowSimple() QFETCH(QRhi::Implementation, impl); QFETCH(QRhiInitParams *, initParams); -#ifdef Q_OS_WINRT - if (impl == QRhi::D3D11) - QSKIP("Skipping window-based QRhi rendering on WinRT as the platform and the D3D11 backend are not prepared for this yet"); -#endif - QScopedPointer<QRhi> rhi(QRhi::create(impl, initParams, QRhi::Flags(), nullptr)); if (!rhi) QSKIP("QRhi could not be created, skipping testing rendering"); @@ -2256,11 +2251,6 @@ void tst_QRhi::finishWithinSwapchainFrame() QFETCH(QRhi::Implementation, impl); QFETCH(QRhiInitParams *, initParams); -#ifdef Q_OS_WINRT - if (impl == QRhi::D3D11) - QSKIP("Skipping window-based QRhi rendering on WinRT as the platform and the D3D11 backend are not prepared for this yet"); -#endif - QScopedPointer<QRhi> rhi(QRhi::create(impl, initParams, QRhi::Flags(), nullptr)); if (!rhi) QSKIP("QRhi could not be created, skipping testing rendering"); diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp index 7764a716ca..1e2bb72ddd 100644 --- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp +++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp @@ -87,7 +87,7 @@ void tst_QCssParser::scanner_data() QTest::addColumn<QString>("input"); QTest::addColumn<QString>("output"); -#if defined(Q_OS_ANDROID) || defined(Q_OS_WINRT) +#if defined(Q_OS_ANDROID) QDir d(":/"); #else QDir d(SRCDIR); diff --git a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp index 1429e4cb7f..344fa2c981 100644 --- a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp +++ b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp @@ -727,9 +727,6 @@ void tst_QGlyphRun::mixedScripts() layout.endLayout(); QList<QGlyphRun> glyphRuns = layout.glyphRuns(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Hangul character not rendered on winrt", Continue); -#endif QCOMPARE(glyphRuns.size(), 2); } diff --git a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp index 2f5936cf74..8a12057527 100644 --- a/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp +++ b/tests/auto/gui/text/qtextdocumentfragment/tst_qtextdocumentfragment.cpp @@ -1709,9 +1709,6 @@ void tst_QTextDocumentFragment::html_bodyBackground() const char html[] = "<body background=\"foo.png\">Foo</body>"; doc->setHtml(html); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on winrt. Investigate - QTBUG-68297", Continue); -#endif QCOMPARE(doc->rootFrame()->frameFormat().background().style(), Qt::TexturePattern); } @@ -1726,9 +1723,6 @@ void tst_QTextDocumentFragment::html_tableCellBackground() QVERIFY(table); QTextTableCell cell = table->cellAt(0, 0); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on winrt. Investigate - QTBUG-68297", Continue); -#endif QCOMPARE(cell.format().background().style(), Qt::TexturePattern); } @@ -1737,9 +1731,6 @@ void tst_QTextDocumentFragment::css_bodyBackground() const char html[] = "<body style=\"background-image:url('foo.png')\">Foo</body>"; doc->setHtml(html); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on winrt. Investigate - QTBUG-68297", Continue); -#endif QCOMPARE(doc->rootFrame()->frameFormat().background().style(), Qt::TexturePattern); } @@ -1754,9 +1745,6 @@ void tst_QTextDocumentFragment::css_tableCellBackground() QVERIFY(table); QTextTableCell cell = table->cellAt(0, 0); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on winrt. Investigate - QTBUG-68297", Continue); -#endif QCOMPARE(cell.format().background().style(), Qt::TexturePattern); } diff --git a/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp b/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp index 4ed02ca658..d1495a2067 100644 --- a/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp +++ b/tests/auto/gui/text/qtextdocumentlayout/tst_qtextdocumentlayout.cpp @@ -302,10 +302,6 @@ void tst_QTextDocumentLayout::imageAtRightAlignedTab() cursor.insertImage(imgFormat); // Everything should fit into the 300 pixels -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on winrt. Figure out why - QTBUG-68297", Continue); -#endif - qreal bearing = QFontMetricsF(doc->defaultFont()).rightBearing(QLatin1Char('t')); QCOMPARE(doc->idealWidth(), std::max(300.0, 300.0 - bearing)); } diff --git a/tests/auto/gui/text/qtextmarkdownwriter/BLACKLIST b/tests/auto/gui/text/qtextmarkdownwriter/BLACKLIST index a35e0f303e..c266b4037a 100644 --- a/tests/auto/gui/text/qtextmarkdownwriter/BLACKLIST +++ b/tests/auto/gui/text/qtextmarkdownwriter/BLACKLIST @@ -1,3 +1,2 @@ [rewriteDocument] -winrt ci b2qt diff --git a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp index 7c864a078c..ba4a035767 100644 --- a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp +++ b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp @@ -44,7 +44,7 @@ void tst_qdesktopservices::openUrl() { // At the bare minimum check that they return false for invalid url's QCOMPARE(QDesktopServices::openUrl(QUrl()), false); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) // this test is only valid on windows on other systems it might mean open a new document in the application handling .file const QRegularExpression messagePattern("ShellExecute 'file://invalid\\.file' failed \\(error \\d+\\)\\."); QVERIFY(messagePattern.isValid()); diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST index a2c6224ce0..915c30bfb3 100644 --- a/tests/auto/network/access/qnetworkreply/BLACKLIST +++ b/tests/auto/network/access/qnetworkreply/BLACKLIST @@ -14,7 +14,7 @@ osx linux # QTBUG-71953 [getFromHttp] -* !android !winrt +* !android [getFromHttpIntoBuffer] osx [getFromHttpIntoBuffer2] diff --git a/tests/auto/network/access/qnetworkreply/CMakeLists.txt b/tests/auto/network/access/qnetworkreply/CMakeLists.txt index f7efa8f7f3..3b138b3918 100644 --- a/tests/auto/network/access/qnetworkreply/CMakeLists.txt +++ b/tests/auto/network/access/qnetworkreply/CMakeLists.txt @@ -1,7 +1,4 @@ # Generated from qnetworkreply.pro. +add_subdirectory(echo) add_subdirectory(test) - -if(NOT WINRT) - add_subdirectory(echo) -endif() diff --git a/tests/auto/network/access/qnetworkreply/qnetworkreply.pro b/tests/auto/network/access/qnetworkreply/qnetworkreply.pro index d3a92436ac..ec6f35a8b1 100644 --- a/tests/auto/network/access/qnetworkreply/qnetworkreply.pro +++ b/tests/auto/network/access/qnetworkreply/qnetworkreply.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs -!winrt:SUBDIRS += echo +SUBDIRS += echo test.depends += $$SUBDIRS SUBDIRS += test diff --git a/tests/auto/network/access/qnetworkreply/test/.prev_CMakeLists.txt b/tests/auto/network/access/qnetworkreply/test/.prev_CMakeLists.txt index 48759572de..9350c9afbf 100644 --- a/tests/auto/network/access/qnetworkreply/test/.prev_CMakeLists.txt +++ b/tests/auto/network/access/qnetworkreply/test/.prev_CMakeLists.txt @@ -55,5 +55,5 @@ add_qt_resource(tst_qnetworkreply "qnetworkreply" ## Scopes: ##################################################################### -#### Keys ignored in scope 2:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 2:.:.:test.pro:NOT ANDROID: # TEST_HELPER_INSTALLS = "../echo/echo" diff --git a/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt b/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt index ef017edf58..50572444a1 100644 --- a/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt +++ b/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt @@ -56,5 +56,5 @@ add_qt_resource(tst_qnetworkreply "qnetworkreply" ## Scopes: ##################################################################### -#### Keys ignored in scope 2:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 2:.:.:test.pro:NOT ANDROID: # TEST_HELPER_INSTALLS = "../echo/echo" diff --git a/tests/auto/network/access/qnetworkreply/test/test.pro b/tests/auto/network/access/qnetworkreply/test/test.pro index d3385c1929..bf09a99d27 100644 --- a/tests/auto/network/access/qnetworkreply/test/test.pro +++ b/tests/auto/network/access/qnetworkreply/test/test.pro @@ -13,7 +13,7 @@ RESOURCES += ../qnetworkreply.qrc TESTDATA += ../empty ../rfc3252.txt ../resource ../bigfile ../*.jpg ../certs \ ../index.html ../smb-file.txt -!android:!winrt: TEST_HELPER_INSTALLS = ../echo/echo +!android: TEST_HELPER_INSTALLS = ../echo/echo CONFIG += unsupported/testserver QT_TEST_SERVER_LIST = vsftpd apache2 ftp-proxy danted squid diff --git a/tests/auto/network/kernel/CMakeLists.txt b/tests/auto/network/kernel/CMakeLists.txt index 6ce3fcdf32..0b25020694 100644 --- a/tests/auto/network/kernel/CMakeLists.txt +++ b/tests/auto/network/kernel/CMakeLists.txt @@ -5,11 +5,6 @@ add_subdirectory(qnetworkdatagram) add_subdirectory(qnetworkaddressentry) add_subdirectory(qhostaddress) -if(NOT WINRT) - add_subdirectory(qnetworkproxy) - add_subdirectory(qnetworkproxyfactory) -endif() - if(QT_FEATURE_private_tests) add_subdirectory(qauthenticator) diff --git a/tests/auto/network/kernel/kernel.pro b/tests/auto/network/kernel/kernel.pro index 42df80dfa1..c13378cc02 100644 --- a/tests/auto/network/kernel/kernel.pro +++ b/tests/auto/network/kernel/kernel.pro @@ -11,10 +11,6 @@ SUBDIRS=\ qnetworkaddressentry \ qhostaddress \ -winrt: SUBDIRS -= \ - qnetworkproxy \ - qnetworkproxyfactory \ - osx: SUBDIRS -= \ # QTBUG-41847 qhostinfo \ diff --git a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp index 48f05a4604..ad8c4a8d1c 100644 --- a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp +++ b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp @@ -38,9 +38,6 @@ #include <qdatastream.h> #ifdef Q_OS_WIN # include <qt_windows.h> -# if defined(Q_OS_WINRT) -# include <winsock2.h> -# endif #endif #ifdef Q_OS_ANDROID @@ -384,15 +381,12 @@ void tst_QHostAddress::assignment() QCOMPARE(address, QHostAddress("::1")); #endif - // WinRT does not support sockaddr_in -#ifndef Q_OS_WINRT QHostAddress addr("4.2.2.1"); sockaddr_in sockAddr; sockAddr.sin_family = AF_INET; sockAddr.sin_addr.s_addr = htonl(addr.toIPv4Address()); address.setAddress((sockaddr *)&sockAddr); QCOMPARE(address, addr); -#endif // !Q_OS_WINRT } QT_WARNING_POP diff --git a/tests/auto/network/kernel/qhostinfo/CMakeLists.txt b/tests/auto/network/kernel/qhostinfo/CMakeLists.txt index 19eae0611d..891312ae5e 100644 --- a/tests/auto/network/kernel/qhostinfo/CMakeLists.txt +++ b/tests/auto/network/kernel/qhostinfo/CMakeLists.txt @@ -26,6 +26,3 @@ extend_target(tst_qhostinfo CONDITION WIN32 PUBLIC_LIBRARIES ws2_32 ) - -#### Keys ignored in scope 3:.:.:qhostinfo.pro:WINRT: -# WINRT_MANIFEST.capabilities = "internetClientServer" diff --git a/tests/auto/network/kernel/qhostinfo/qhostinfo.pro b/tests/auto/network/kernel/qhostinfo/qhostinfo.pro index d358cdf52c..e084f28229 100644 --- a/tests/auto/network/kernel/qhostinfo/qhostinfo.pro +++ b/tests/auto/network/kernel/qhostinfo/qhostinfo.pro @@ -7,5 +7,3 @@ requires(qtConfig(private_tests)) QT = core-private network-private testlib win32: QMAKE_USE += ws2_32 - -winrt: WINRT_MANIFEST.capabilities += internetClientServer diff --git a/tests/auto/network/socket/.prev_CMakeLists.txt b/tests/auto/network/socket/.prev_CMakeLists.txt new file mode 100644 index 0000000000..7e72b4be29 --- /dev/null +++ b/tests/auto/network/socket/.prev_CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from socket.pro. + +if(QT_FEATURE_private_tests) + add_subdirectory(qhttpsocketengine) + add_subdirectory(qtcpsocket) + add_subdirectory(qsocks5socketengine) + add_subdirectory(platformsocketengine) +endif() +add_subdirectory(qudpsocket) +add_subdirectory(qlocalsocket) +add_subdirectory(qtcpserver) +add_subdirectory(qabstractsocket) +if(QT_FEATURE_sctp) + add_subdirectory(qsctpsocket) +endif() diff --git a/tests/auto/network/socket/CMakeLists.txt b/tests/auto/network/socket/CMakeLists.txt index 5019e47140..a4b19ac1d6 100644 --- a/tests/auto/network/socket/CMakeLists.txt +++ b/tests/auto/network/socket/CMakeLists.txt @@ -1,20 +1,15 @@ # Generated from socket.pro. -add_subdirectory(qudpsocket) -### add_subdirectory(qlocalsocket) -add_subdirectory(qtcpserver) -add_subdirectory(qabstractsocket) - if(QT_FEATURE_private_tests) - add_subdirectory(platformsocketengine) + add_subdirectory(qhttpsocketengine) add_subdirectory(qtcpsocket) - - if(NOT WINRT) - add_subdirectory(qhttpsocketengine) - add_subdirectory(qsocks5socketengine) - endif() + add_subdirectory(qsocks5socketengine) + add_subdirectory(platformsocketengine) endif() - +add_subdirectory(qudpsocket) +### add_subdirectory(qlocalsocket) # special case +add_subdirectory(qtcpserver) +add_subdirectory(qabstractsocket) if(QT_FEATURE_sctp) add_subdirectory(qsctpsocket) endif() diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp index 68c913ecfc..88a39eea93 100644 --- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp +++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp @@ -48,11 +48,7 @@ #define PLATFORMSOCKETENGINE QNativeSocketEngine #define PLATFORMSOCKETENGINESTRING "QNativeSocketEngine" -#ifndef Q_OS_WINRT -# include <private/qnativesocketengine_p.h> -#else -# include <private/qnativesocketengine_winrt_p.h> -#endif +#include <private/qnativesocketengine_p.h> #include <qstringlist.h> @@ -79,9 +75,7 @@ private slots: void networkError(); void setSocketDescriptor(); void invalidSend(); -#ifndef Q_OS_WINRT void receiveUrgentData(); -#endif void tooManySockets(); }; @@ -582,9 +576,7 @@ void tst_PlatformSocketEngine::networkError() QCOMPARE(client.state(), QAbstractSocket::ConnectedState); // An unexpected network error! -#ifdef Q_OS_WINRT - client.close(); -#elif defined(Q_OS_WIN) +#if defined(Q_OS_WIN) // could use shutdown to produce different errors ::closesocket(client.socketDescriptor()); #else @@ -617,7 +609,6 @@ void tst_PlatformSocketEngine::invalidSend() } //--------------------------------------------------------------------------- -#ifndef Q_OS_WINRT void tst_PlatformSocketEngine::receiveUrgentData() { PLATFORMSOCKETENGINE server; @@ -680,7 +671,6 @@ void tst_PlatformSocketEngine::receiveUrgentData() QCOMPARE(response.at(0), msg); #endif } -#endif // !Q_OS_WINRT QTEST_MAIN(tst_PlatformSocketEngine) #include "tst_platformsocketengine.moc" diff --git a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp index 5c66ef6520..7cb65cd1a3 100644 --- a/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp +++ b/tests/auto/network/socket/qtcpserver/crashingServer/main.cpp @@ -29,14 +29,14 @@ #include <QtCore> #include <QtNetwork> -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && defined(Q_CC_MSVC) +#if defined(Q_OS_WIN) && defined(Q_CC_MSVC) # include <crtdbg.h> #endif int main(int argc, char *argv[]) { // Windows: Suppress crash notification dialog. -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && defined(Q_CC_MSVC) +#if defined(Q_OS_WIN) && defined(Q_CC_MSVC) _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG); #endif QCoreApplication app(argc, argv); diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp index 094e28149c..927dc5cf9a 100644 --- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -88,9 +88,7 @@ private slots: void maxPendingConnections(); void listenError(); void waitForConnectionTest(); -#ifndef Q_OS_WINRT void setSocketDescriptor(); -#endif void listenWhileListening(); void addressReusable(); void setNewSocketDescriptorBlocking(); @@ -527,7 +525,6 @@ void tst_QTcpServer::waitForConnectionTest() } //---------------------------------------------------------------------------------- -#ifndef Q_OS_WINRT void tst_QTcpServer::setSocketDescriptor() { QTcpServer server; @@ -557,7 +554,6 @@ void tst_QTcpServer::setSocketDescriptor() WSACleanup(); #endif } -#endif // !Q_OS_WINRT //---------------------------------------------------------------------------------- void tst_QTcpServer::listenWhileListening() @@ -579,7 +575,6 @@ public: bool ok; protected: -#ifndef Q_OS_WINRT void incomingConnection(qintptr socketDescriptor) { // how a user woulddo it (qabstractsocketengine is not public) @@ -592,7 +587,6 @@ protected: ::close(socketDescriptor); #endif } -#endif // !Q_OS_WINRT }; void tst_QTcpServer::addressReusable() diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp index 88d2c46f3d..3c4728afec 100644 --- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp @@ -126,9 +126,7 @@ private slots: void bindThenResolveHost_data(); void bindThenResolveHost(); void setInvalidSocketDescriptor(); -#ifndef Q_OS_WINRT void setSocketDescriptor(); -#endif void socketDescriptor(); void blockingIMAP(); void nonBlockingIMAP(); @@ -738,7 +736,6 @@ void tst_QTcpSocket::setInvalidSocketDescriptor() //---------------------------------------------------------------------------------- -#ifndef Q_OS_WINRT void tst_QTcpSocket::setSocketDescriptor() { QFETCH_GLOBAL(bool, setProxy); @@ -782,7 +779,6 @@ void tst_QTcpSocket::setSocketDescriptor() delete dummy; #endif } -#endif // !Q_OS_WINRT //---------------------------------------------------------------------------------- diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp index b69bfb106c..425d61127a 100644 --- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp @@ -1276,9 +1276,6 @@ void tst_QUdpSocket::multicastTtlOption_data() void tst_QUdpSocket::multicastTtlOption() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support multicast."); -#endif QFETCH_GLOBAL(bool, setProxy); QFETCH(QHostAddress, bindAddress); QFETCH(int, ttl); @@ -1326,9 +1323,6 @@ void tst_QUdpSocket::multicastLoopbackOption_data() void tst_QUdpSocket::multicastLoopbackOption() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support multicast."); -#endif QFETCH_GLOBAL(bool, setProxy); QFETCH(QHostAddress, bindAddress); QFETCH(int, loopback); @@ -1365,9 +1359,6 @@ void tst_QUdpSocket::multicastJoinBeforeBind_data() void tst_QUdpSocket::multicastJoinBeforeBind() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support multicast."); -#endif QFETCH(QHostAddress, groupAddress); QUdpSocket udpSocket; @@ -1387,9 +1378,6 @@ void tst_QUdpSocket::multicastLeaveAfterClose_data() void tst_QUdpSocket::multicastLeaveAfterClose() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support multicast."); -#endif QFETCH_GLOBAL(bool, setProxy); QFETCH(QHostAddress, groupAddress); if (setProxy) @@ -1434,9 +1422,6 @@ void tst_QUdpSocket::setMulticastInterface_data() void tst_QUdpSocket::setMulticastInterface() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support multicast."); -#endif QFETCH_GLOBAL(bool, setProxy); QFETCH(QNetworkInterface, iface); QFETCH(QHostAddress, address); @@ -1494,9 +1479,6 @@ void tst_QUdpSocket::multicast_data() void tst_QUdpSocket::multicast() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support multicast."); -#endif QFETCH_GLOBAL(bool, setProxy); QFETCH(QHostAddress, bindAddress); QFETCH(bool, bindResult); diff --git a/tests/auto/network/socket/socket.pro b/tests/auto/network/socket/socket.pro index 06fe356a5a..1248d71172 100644 --- a/tests/auto/network/socket/socket.pro +++ b/tests/auto/network/socket/socket.pro @@ -20,7 +20,3 @@ SUBDIRS=\ !qtConfig(sctp): SUBDIRS -= \ qsctpsocket \ - -winrt: SUBDIRS -= \ - qhttpsocketengine \ - qsocks5socketengine \ diff --git a/tests/auto/network/ssl/CMakeLists.txt b/tests/auto/network/ssl/CMakeLists.txt index c10cfabbf4..6d4dc15cc8 100644 --- a/tests/auto/network/ssl/CMakeLists.txt +++ b/tests/auto/network/ssl/CMakeLists.txt @@ -6,31 +6,17 @@ add_subdirectory(qsslcipher) add_subdirectory(qsslellipticcurve) add_subdirectory(qsslerror) add_subdirectory(qsslkey) - -if(QT_FEATURE_ssl) - - if(QT_FEATURE_private_tests) - add_subdirectory(qsslsocket) - if(NOT WINRT) - add_subdirectory(qsslsocket_onDemandCertificates_member) - add_subdirectory(qsslsocket_onDemandCertificates_static) - endif() - - if(QT_FEATURE_dtls) - add_subdirectory(qdtlscookie) - add_subdirectory(qdtls) - endif() - - if(QT_FEATURE_ocsp) - add_subdirectory(qocsp) - endif() - endif() +if(QT_FEATURE_private_tests AND QT_FEATURE_ssl) + add_subdirectory(qsslsocket) + add_subdirectory(qsslsocket_onDemandCertificates_member) + add_subdirectory(qsslsocket_onDemandCertificates_static) + add_subdirectory(qasn1element) + add_subdirectory(qssldiffiehellmanparameters) endif() - -if(QT_FEATURE_ssl) - - if(QT_FEATURE_private_tests) - add_subdirectory(qasn1element) - add_subdirectory(qssldiffiehellmanparameters) - endif() +if(QT_FEATURE_dtls AND QT_FEATURE_private_tests AND QT_FEATURE_ssl) + add_subdirectory(qdtlscookie) + add_subdirectory(qdtls) +endif() +if(QT_FEATURE_ocsp AND QT_FEATURE_private_tests AND QT_FEATURE_ssl) + add_subdirectory(qocsp) endif() diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp index 0611deb184..69a90c9c83 100644 --- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp @@ -819,7 +819,7 @@ void tst_QSslCertificate::task256066toPem() void tst_QSslCertificate::nulInCN() { -#if QT_CONFIG(securetransport) || defined(Q_OS_WINRT) || QT_CONFIG(schannel) +#if QT_CONFIG(securetransport) || QT_CONFIG(schannel) QSKIP("Generic QSslCertificatePrivate fails this test"); #endif QList<QSslCertificate> certList = @@ -838,7 +838,7 @@ void tst_QSslCertificate::nulInCN() void tst_QSslCertificate::nulInSan() { -#if QT_CONFIG(securetransport) || defined(Q_OS_WINRT) || QT_CONFIG(schannel) +#if QT_CONFIG(securetransport) || QT_CONFIG(schannel) QSKIP("Generic QSslCertificatePrivate fails this test"); #endif QList<QSslCertificate> certList = @@ -934,7 +934,7 @@ void tst_QSslCertificate::toText() QString txtcert = cert.toText(); #ifdef QT_NO_OPENSSL - QEXPECT_FAIL("", "QTBUG-40884: QSslCertificate::toText is not implemented on WinRT", Continue); + QEXPECT_FAIL("", "QSslCertificate::toText is not implemented on platforms which do not use openssl", Continue); #endif QVERIFY(QString::fromLatin1(txt098) == txtcert || QString::fromLatin1(txt100) == txtcert || @@ -990,7 +990,7 @@ void tst_QSslCertificate::verify() ) #ifdef QT_NO_OPENSSL - QEXPECT_FAIL("", "QTBUG-40884: WinRT API does not yet support verifying a chain", Abort); + QEXPECT_FAIL("", "Verifying a chain is not supported without openssl", Abort); // TODO? #endif // Empty chain is unspecified error errors = QSslCertificate::verify(toVerify); @@ -1323,7 +1323,7 @@ void tst_QSslCertificate::pkcs12() QList<QSslCertificate> caCerts; #ifdef QT_NO_OPENSSL - QEXPECT_FAIL("", "QTBUG-40884: WinRT API does not support pkcs12 imports", Abort); + QEXPECT_FAIL("", "pkcs12 imports are only supported when openssl is used", Abort); // TODO? #endif ok = QSslCertificate::importPkcs12(&f, &key, &cert, &caCerts); QVERIFY(ok); diff --git a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp index 1807315061..ce223a53ef 100644 --- a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp +++ b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp @@ -167,9 +167,9 @@ void tst_QSslKey::createPlainTestRows(bool pemOnly) foreach (KeyInfo keyInfo, keyInfoList) { if (pemOnly && keyInfo.format != QSsl::EncodingFormat::Pem) continue; -#if defined(Q_OS_WINRT) || QT_CONFIG(schannel) +#if QT_CONFIG(schannel) if (keyInfo.fileInfo.fileName().contains("RC2-64")) - continue; // WinRT/Schannel treats RC2 as 128 bit + continue; // Schannel treats RC2 as 128 bit #endif #if !defined(QT_NO_SSL) && defined(QT_NO_OPENSSL) // generic backend if (keyInfo.fileInfo.fileName().contains(QRegularExpression("-aes\\d\\d\\d-"))) @@ -702,11 +702,11 @@ void tst_QSslKey::encrypt() QFETCH(QByteArray, cipherText); QFETCH(QByteArray, iv); -#if defined(Q_OS_WINRT) || QT_CONFIG(schannel) - QEXPECT_FAIL("RC2-40-CBC, length 0", "WinRT/Schannel treats RC2 as 128-bit", Abort); - QEXPECT_FAIL("RC2-40-CBC, length 8", "WinRT/Schannel treats RC2 as 128-bit", Abort); - QEXPECT_FAIL("RC2-64-CBC, length 0", "WinRT/Schannel treats RC2 as 128-bit", Abort); - QEXPECT_FAIL("RC2-64-CBC, length 8", "WinRT/Schannel treats RC2 as 128-bit", Abort); +#if QT_CONFIG(schannel) + QEXPECT_FAIL("RC2-40-CBC, length 0", "Schannel treats RC2 as 128-bit", Abort); + QEXPECT_FAIL("RC2-40-CBC, length 8", "Schannel treats RC2 as 128-bit", Abort); + QEXPECT_FAIL("RC2-64-CBC, length 0", "Schannel treats RC2 as 128-bit", Abort); + QEXPECT_FAIL("RC2-64-CBC, length 8", "Schannel treats RC2 as 128-bit", Abort); #endif QByteArray encrypted = QSslKeyPrivate::encrypt(cipher, plainText, key, iv); QCOMPARE(encrypted, cipherText); diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index 0ac87a9cb1..538864db6c 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -1307,9 +1307,6 @@ protected slots: void tst_QSslSocket::protocolServerSide_data() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QTest::addColumn<QSsl::SslProtocol>("serverProtocol"); QTest::addColumn<QSsl::SslProtocol>("clientProtocol"); QTest::addColumn<bool>("works"); @@ -1413,9 +1410,6 @@ void tst_QSslSocket::protocolServerSide() void tst_QSslSocket::serverCipherPreferences() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) { qWarning("SSL not supported, skipping test"); return; @@ -1542,9 +1536,6 @@ void tst_QSslSocket::localCertificateChain() void tst_QSslSocket::setLocalCertificateChain() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) return; @@ -1587,9 +1578,6 @@ void tst_QSslSocket::setPrivateKey() void tst_QSslSocket::setSocketDescriptor() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) return; @@ -1995,9 +1983,6 @@ protected: void tst_QSslSocket::setEmptyKey() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) return; @@ -2019,9 +2004,6 @@ void tst_QSslSocket::setEmptyKey() void tst_QSslSocket::spontaneousWrite() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -2067,9 +2049,6 @@ void tst_QSslSocket::spontaneousWrite() void tst_QSslSocket::setReadBufferSize() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -2331,9 +2310,6 @@ void tst_QSslSocket::waitForMinusOne() #ifdef Q_OS_WIN QSKIP("QTBUG-24451 - indefinite wait may hang"); #endif -#ifdef Q_OS_WINRT // This can stay in case the one above goes away - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -2412,9 +2388,6 @@ protected: void tst_QSslSocket::verifyMode() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -2698,9 +2671,6 @@ void tst_QSslSocket::ignoreSslErrorsListWithSlot() void tst_QSslSocket::abortOnSslErrors() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -2800,9 +2770,6 @@ void tst_QSslSocket::writeBigChunk() void tst_QSslSocket::blacklistedCertificates() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -3064,9 +3031,6 @@ protected: void tst_QSslSocket::qtbug18498_peek() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -3140,9 +3104,6 @@ protected: void tst_QSslSocket::qtbug18498_peek2() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QFETCH_GLOBAL(bool, setProxy); if (setProxy) return; @@ -3246,9 +3207,6 @@ void tst_QSslSocket::qtbug18498_peek2() void tst_QSslSocket::dhServer() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) QSKIP("No SSL support"); @@ -3358,9 +3316,6 @@ void tst_QSslSocket::dhServerCustomParams() void tst_QSslSocket::ecdhServer() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) { qWarning("SSL not supported, skipping test"); return; @@ -3467,9 +3422,6 @@ void tst_QSslSocket::verifyClientCertificate() // success instead of failure etc.). QSKIP("This test can not work with Secure Transport"); #endif // QT_CONFIG(securetransport) -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif if (!QSslSocket::supportsSsl()) { qWarning("SSL not supported, skipping test"); return; @@ -4049,9 +4001,6 @@ void tst_QSslSocket::simplePskConnect() void tst_QSslSocket::ephemeralServerKey_data() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif QTest::addColumn<QString>("cipher"); QTest::addColumn<bool>("emptyKey"); @@ -4084,9 +4033,6 @@ void tst_QSslSocket::ephemeralServerKey() void tst_QSslSocket::pskServer() { -#ifdef Q_OS_WINRT - QSKIP("Server-side encryption is not implemented on WinRT."); -#endif #if QT_CONFIG(schannel) QSKIP("Schannel does not have PSK support implemented."); #endif diff --git a/tests/auto/network/ssl/ssl.pro b/tests/auto/network/ssl/ssl.pro index 169e9bce83..014ff34064 100644 --- a/tests/auto/network/ssl/ssl.pro +++ b/tests/auto/network/ssl/ssl.pro @@ -26,10 +26,6 @@ qtConfig(ssl) { } } -winrt: SUBDIRS -= \ - qsslsocket_onDemandCertificates_member \ - qsslsocket_onDemandCertificates_static \ - qtConfig(ssl) { qtConfig(private_tests) { SUBDIRS += qasn1element \ diff --git a/tests/auto/other/.prev_CMakeLists.txt b/tests/auto/other/.prev_CMakeLists.txt index 74ea69ee0e..d89e950690 100644 --- a/tests/auto/other/.prev_CMakeLists.txt +++ b/tests/auto/other/.prev_CMakeLists.txt @@ -11,7 +11,7 @@ if(TARGET Qt::Widgets) add_subdirectory(qsharedpointer_and_qwidget) add_subdirectory(windowsmobile) endif() -if(TARGET Qt::Network AND TARGET Qt::Widgets AND NOT WINRT) +if(TARGET Qt::Network AND TARGET Qt::Widgets) add_subdirectory(lancelot) add_subdirectory(qnetworkaccessmanager_and_qprogressdialog) endif() @@ -26,13 +26,13 @@ endif() if(QT_FEATURE_process AND TARGET Qt::Gui) add_subdirectory(qprocess_and_guieventloop) endif() -if(QT_FEATURE_accessibility AND TARGET Qt::Gui AND TARGET Qt::Widgets AND NOT WINRT) +if(QT_FEATURE_accessibility AND TARGET Qt::Gui AND TARGET Qt::Widgets) add_subdirectory(qaccessibility) endif() if(QT_FEATURE_accessibility_atspi_bridge AND TARGET Qt::Gui AND TARGET Qt::Widgets) add_subdirectory(qaccessibilitylinux) endif() -if(TARGET Qt::Network AND NOT WINRT) +if(TARGET Qt::Network) add_subdirectory(networkselftest) endif() if(MACOS AND TARGET Qt::Gui) diff --git a/tests/auto/other/CMakeLists.txt b/tests/auto/other/CMakeLists.txt index 808afeff35..6a9569332d 100644 --- a/tests/auto/other/CMakeLists.txt +++ b/tests/auto/other/CMakeLists.txt @@ -11,7 +11,7 @@ if(TARGET Qt::Widgets) add_subdirectory(qsharedpointer_and_qwidget) # add_subdirectory(windowsmobile) <- does not exist # special case endif() -if(TARGET Qt::Network AND TARGET Qt::Widgets AND NOT WINRT) +if(TARGET Qt::Network AND TARGET Qt::Widgets) add_subdirectory(lancelot) add_subdirectory(qnetworkaccessmanager_and_qprogressdialog) endif() @@ -26,13 +26,13 @@ endif() if(QT_FEATURE_process AND TARGET Qt::Gui) add_subdirectory(qprocess_and_guieventloop) endif() -if(QT_FEATURE_accessibility AND TARGET Qt::Gui AND TARGET Qt::Widgets AND NOT WINRT) +if(QT_FEATURE_accessibility AND TARGET Qt::Gui AND TARGET Qt::Widgets) add_subdirectory(qaccessibility) endif() if(QT_FEATURE_accessibility_atspi_bridge AND TARGET Qt::Gui AND TARGET Qt::Widgets) #add_subdirectory(qaccessibilitylinux) # special case # This test is broken endif() -if(TARGET Qt::Network AND NOT WINRT) +if(TARGET Qt::Network) add_subdirectory(networkselftest) endif() if(MACOS AND TARGET Qt::Gui) diff --git a/tests/auto/other/languagechange/tst_languagechange.cpp b/tests/auto/other/languagechange/tst_languagechange.cpp index 14ede33500..fc3d0f1c06 100644 --- a/tests/auto/other/languagechange/tst_languagechange.cpp +++ b/tests/auto/other/languagechange/tst_languagechange.cpp @@ -197,7 +197,7 @@ void tst_languageChange::retranslatability_data() << "QFileDialog::Back" << "QFileDialog::Create New Folder" << "QFileDialog::Detail View" -#if !defined(Q_OS_MAC) && !defined(Q_OS_WINRT) +#if !defined(Q_OS_MAC) << "QFileDialog::File" #endif << "QFileDialog::Files of type:" diff --git a/tests/auto/other/other.pro b/tests/auto/other/other.pro index 8a99d0eef6..8d72957ac7 100644 --- a/tests/auto/other/other.pro +++ b/tests/auto/other/other.pro @@ -40,7 +40,7 @@ SUBDIRS=\ qaccessibilitylinux \ qaccessibilitymac \ -winrt|!qtHaveModule(network): SUBDIRS -= \ +!qtHaveModule(network): SUBDIRS -= \ lancelot \ networkselftest \ qnetworkaccessmanager_and_qprogressdialog \ @@ -49,7 +49,7 @@ cross_compile: SUBDIRS -= \ atwrapper \ compiler -winrt|!qtHaveModule(gui)|!qtConfig(accessibility): SUBDIRS -= qaccessibility +!qtHaveModule(gui)|!qtConfig(accessibility): SUBDIRS -= qaccessibility !qtHaveModule(gui)|!qtConfig(accessibility-atspi-bridge): SUBDIRS -= qaccessibilitylinux diff --git a/tests/auto/other/qaccessibility/.prev_CMakeLists.txt b/tests/auto/other/qaccessibility/.prev_CMakeLists.txt index 8663e412c4..7dea6c37e6 100644 --- a/tests/auto/other/qaccessibility/.prev_CMakeLists.txt +++ b/tests/auto/other/qaccessibility/.prev_CMakeLists.txt @@ -33,13 +33,9 @@ extend_target(tst_qaccessibility CONDITION UNIX AND NOT APPLE AND NOT HAIKU AND extend_target(tst_qaccessibility CONDITION WIN32 PUBLIC_LIBRARIES + Qt::WindowsUIAutomationSupportPrivate ole32 oleacc oleaut32 uuid ) - -extend_target(tst_qaccessibility CONDITION WIN32 AND NOT WINRT - PUBLIC_LIBRARIES - Qt::WindowsUIAutomationSupportPrivate -) diff --git a/tests/auto/other/qaccessibility/CMakeLists.txt b/tests/auto/other/qaccessibility/CMakeLists.txt index f5f74bbafc..8a27fc25cc 100644 --- a/tests/auto/other/qaccessibility/CMakeLists.txt +++ b/tests/auto/other/qaccessibility/CMakeLists.txt @@ -39,13 +39,9 @@ extend_target(tst_qaccessibility CONDITION UNIX AND NOT APPLE AND NOT HAIKU AND extend_target(tst_qaccessibility CONDITION WIN32 PUBLIC_LIBRARIES + Qt::WindowsUIAutomationSupportPrivate ole32 oleacc oleaut32 uuid ) - -extend_target(tst_qaccessibility CONDITION WIN32 AND NOT WINRT - PUBLIC_LIBRARIES - Qt::WindowsUIAutomationSupportPrivate -) diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index 339e7ad20d..07cccde0c8 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -30,10 +30,8 @@ #include <QtCore/qglobal.h> #ifdef Q_OS_WIN # include <QtCore/qt_windows.h> -#ifndef Q_OS_WINRT # include <oleacc.h> # include <QtGui/private/qwindowsuiawrapper_p.h> -#endif # include <servprov.h> # include <winuser.h> #endif @@ -3774,7 +3772,7 @@ void tst_QAccessibility::bridgeTest() { // For now this is a simple test to see if the bridge is working at all. // Ideally it should be extended to test all aspects of the bridge. -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QWidget window; QVBoxLayout *lay = new QVBoxLayout(&window); diff --git a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp index 9285d5b5da..0242f8a36e 100644 --- a/tests/auto/other/qfocusevent/tst_qfocusevent.cpp +++ b/tests/auto/other/qfocusevent/tst_qfocusevent.cpp @@ -357,10 +357,9 @@ void tst_QFocusEvent::checkReason_ActiveWindow() d->hide(); if (!QGuiApplication::platformName().compare(QLatin1String("offscreen"), Qt::CaseInsensitive) - || !QGuiApplication::platformName().compare(QLatin1String("minimal"), Qt::CaseInsensitive) - || !QGuiApplication::platformName().compare(QLatin1String("winrt"), Qt::CaseInsensitive)) { + || !QGuiApplication::platformName().compare(QLatin1String("minimal"), Qt::CaseInsensitive)) { // Activate window of testFocusWidget, focus in that window goes to childFocusWidgetOne - QWARN("Platforms offscreen, minimal, and winrt require explicit activateWindow()"); + QWARN("Platforms offscreen and minimal require explicit activateWindow()"); testFocusWidget->activateWindow(); } diff --git a/tests/auto/testlib/selftests/CMakeLists.txt b/tests/auto/testlib/selftests/CMakeLists.txt index 9dc85e556a..bce68a37d8 100644 --- a/tests/auto/testlib/selftests/CMakeLists.txt +++ b/tests/auto/testlib/selftests/CMakeLists.txt @@ -52,7 +52,7 @@ qt_add_resource(tst_selftests "qmake_expected_files" ## Scopes: ##################################################################### -#### Keys ignored in scope 5:.:.:test.pro:NOT ANDROID AND NOT WINRT AND for(file,SUBPROGRAMS): +#### Keys ignored in scope 5:.:.:test.pro:NOT ANDROID AND for(file,SUBPROGRAMS): # TEST_HELPER_INSTALLS = "../$${file}/$${file}" #### Keys ignored in scope 7:.:..:../selftests.pri:TARGET Qt::Gui: @@ -63,71 +63,69 @@ qt_apply_testlib_coverage_options(tst_selftests) # ------------- Sub tests ------------- # special case begin -if(NOT WINRT) - set(subprograms - assert - badxml - benchlibcallgrind - benchlibcounting - benchlibeventcounter - benchliboptions - benchlibtickcounter - benchlibwalltime - blacklisted - cmptest - commandlinedata - counting - crashes - datatable - datetime - deleteLater - deleteLater_noApp - differentexec - exceptionthrow - expectfail - failcleanup - faildatatype - failfetchtype - failinit - failinitdata - fetchbogus - findtestdata - float - globaldata - longstring - maxwarnings - multiexec - pass - pairdiagnostics - printdatatags - printdatatagswithglobaltags - qexecstringlist - silent - signaldumper - singleskip - skip - skipcleanup - skipinit - skipinitdata - sleep - strcmp - subtest - testlib - tuplediagnostics - verbose1 - verbose2 - verifyexceptionthrown - warnings - watchdog - xunit - ) +set(subprograms + assert + badxml + benchlibcallgrind + benchlibcounting + benchlibeventcounter + benchliboptions + benchlibtickcounter + benchlibwalltime + blacklisted + cmptest + commandlinedata + counting + crashes + datatable + datetime + deleteLater + deleteLater_noApp + differentexec + exceptionthrow + expectfail + failcleanup + faildatatype + failfetchtype + failinit + failinitdata + fetchbogus + findtestdata + float + globaldata + longstring + maxwarnings + multiexec + pass + pairdiagnostics + printdatatags + printdatatagswithglobaltags + qexecstringlist + silent + signaldumper + singleskip + skip + skipcleanup + skipinit + skipinitdata + sleep + strcmp + subtest + testlib + tuplediagnostics + verbose1 + verbose2 + verifyexceptionthrown + warnings + watchdog + xunit +) - if(TARGET Qt::Gui) - list(APPEND subprograms - keyboard - mouse - ) - endif() +if(TARGET Qt::Gui) + list(APPEND subprograms + keyboard + mouse + ) endif() foreach(subprogram IN LISTS subprograms) @@ -149,6 +147,6 @@ qt_extend_target(tst_selftests ## Scopes: ##################################################################### -#### Keys ignored in scope 5:.:.:test.pro:NOT ANDROID AND NOT WINRT AND for(file,SUBPROGRAMS): +#### Keys ignored in scope 5:.:.:test.pro:NOT ANDROID AND for(file,SUBPROGRAMS): # TEST_HELPER_INSTALLS = "../$${file}/$${file}" # special case end diff --git a/tests/auto/testlib/selftests/catch_p_p.h b/tests/auto/testlib/selftests/catch_p_p.h index ffc10559aa..97ce7a24fd 100644 --- a/tests/auto/testlib/selftests/catch_p_p.h +++ b/tests/auto/testlib/selftests/catch_p_p.h @@ -235,13 +235,7 @@ namespace Catch { # define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS # endif -// Universal Windows platform does not support SEH -// Or console colours (or console at all...) -# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) -# define CATCH_CONFIG_COLOUR_NONE -# else -# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH -# endif +# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH // MSVC traditional preprocessor needs some workaround for __VA_ARGS__ // _MSVC_TRADITIONAL == 0 means new conformant preprocessor diff --git a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp index 87b241f5e5..4c418cc78f 100644 --- a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp +++ b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp @@ -44,7 +44,7 @@ private slots: void tst_Crashes::crash() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) //we avoid the error dialogbox to appear on windows SetErrorMode( SEM_NOGPFAULTERRORBOX | SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); #endif diff --git a/tests/auto/testlib/selftests/selftest.pro b/tests/auto/testlib/selftests/selftest.pro index bcf96c9cb3..4d926d3572 100644 --- a/tests/auto/testlib/selftests/selftest.pro +++ b/tests/auto/testlib/selftests/selftest.pro @@ -18,6 +18,6 @@ RESOURCES += expected_files include(selftests.pri) DEFINES += SUBPROGRAMS=$$shell_quote($$SUBPROGRAMS) -!android:!winrt: for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "$${file}/$${file}" +!android: for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "$${file}/$${file}" include($$QT_SOURCE_TREE/src/testlib/selfcover.pri) diff --git a/tests/auto/testlib/selftests/selftests.pro b/tests/auto/testlib/selftests/selftests.pro index 235967ebe9..cb71ff4833 100644 --- a/tests/auto/testlib/selftests/selftests.pro +++ b/tests/auto/testlib/selftests/selftests.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs -!winrt: include(selftests.pri) +include(selftests.pri) selftest.file = selftest.pro selftest.makefile = Makefile.selftest diff --git a/tests/auto/widgets/dialogs/CMakeLists.txt b/tests/auto/widgets/dialogs/CMakeLists.txt index 508093e7ad..0c52076efe 100644 --- a/tests/auto/widgets/dialogs/CMakeLists.txt +++ b/tests/auto/widgets/dialogs/CMakeLists.txt @@ -1,19 +1,18 @@ +# Generated from dialogs.pro. + add_subdirectory(qcolordialog) add_subdirectory(qdialog) add_subdirectory(qerrormessage) -if (NOT WINRT) - add_subdirectory(qfiledialog) - add_subdirectory(qfiledialog2) - add_subdirectory(qmessagebox) -endif() -if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR NOT WIN32) - add_subdirectory(qfilesystemmodel) -endif() +add_subdirectory(qfiledialog) +add_subdirectory(qfiledialog2) add_subdirectory(qfontdialog) add_subdirectory(qinputdialog) +add_subdirectory(qmessagebox) add_subdirectory(qprogressdialog) -if (QT_FEATURE_private_tests) +add_subdirectory(qwizard) +if(NOT MINGW) + add_subdirectory(qfilesystemmodel) +endif() +if(QT_FEATURE_private_tests) add_subdirectory(qsidebar) endif() -add_subdirectory(qwizard) - diff --git a/tests/auto/widgets/dialogs/dialogs.pro b/tests/auto/widgets/dialogs/dialogs.pro index e0ebe78f33..cf548f2dea 100644 --- a/tests/auto/widgets/dialogs/dialogs.pro +++ b/tests/auto/widgets/dialogs/dialogs.pro @@ -18,4 +18,3 @@ SUBDIRS=\ mac:qinputdialog.CONFIG += no_check_target # QTBUG-25496 mingw: SUBDIRS -= qfilesystemmodel # QTBUG-29403 -winrt: SUBDIRS -= qfiledialog qfiledialog2 qmessagebox # QTBUG-68297 diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp index 94915d0e40..d469b0f9bd 100644 --- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp +++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp @@ -307,10 +307,6 @@ void tst_QDialog::showAsTool() testWidget.activateWindow(); QVERIFY(QTest::qWaitForWindowActive(&testWidget)); dialog.exec(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "As winrt does not support child widgets, the dialog is being activated" - "together with the main widget.", Continue); -#endif if (testWidget.style()->styleHint(QStyle::SH_Widget_ShareActivation, 0, &testWidget)) { QCOMPARE(dialog.wasActive(), true); } else { @@ -468,8 +464,7 @@ void tst_QDialog::snapToDefaultButton() #ifdef QT_NO_CURSOR QSKIP("Test relies on there being a cursor"); #else - if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive) - || !QGuiApplication::platformName().compare(QLatin1String("winrt"), Qt::CaseInsensitive)) + if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive)) QSKIP("This platform does not support setting the cursor position."); const QRect dialogGeometry(QGuiApplication::primaryScreen()->availableGeometry().topLeft() diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp index d3b7f53bb4..4e2699889f 100644 --- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp +++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp @@ -276,7 +276,7 @@ void tst_QFileDialog2::showNameFilterDetails() void tst_QFileDialog2::unc() { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) // Only test UNC on Windows./ QString dir("\\\\" + QtNetworkSettings::winServerName() + "\\testsharewritable"); #else diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/BLACKLIST b/tests/auto/widgets/dialogs/qfilesystemmodel/BLACKLIST index d9d7786314..4119afce84 100644 --- a/tests/auto/widgets/dialogs/qfilesystemmodel/BLACKLIST +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/BLACKLIST @@ -1,12 +1,5 @@ -winrt -[sort] -winrt [sort:QFileDialog usage] ubuntu b2qt [specialFiles] b2qt -[dirsBeforeFiles] -winrt -[drives] -winrt diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp index 63bf103725..e814e79dbe 100644 --- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp @@ -340,14 +340,7 @@ bool tst_QFileSystemModel::createFiles(QFileSystemModel *model, const QString &t if (initial_file[0] == '.') { const QString hiddenFile = QDir::toNativeSeparators(file.fileName()); const auto nativeHiddenFile = reinterpret_cast<const wchar_t *>(hiddenFile.utf16()); -#ifndef Q_OS_WINRT DWORD currentAttributes = ::GetFileAttributes(nativeHiddenFile); -#else // !Q_OS_WINRT - WIN32_FILE_ATTRIBUTE_DATA attributeData; - if (!::GetFileAttributesEx(nativeHiddenFile, GetFileExInfoStandard, &attributeData)) - attributeData.dwFileAttributes = 0xFFFFFFFF; - DWORD currentAttributes = attributeData.dwFileAttributes; -#endif // Q_OS_WINRT if (currentAttributes == 0xFFFFFFFF) { qErrnoWarning("failed to get file attributes: %s", qPrintable(hiddenFile)); return false; diff --git a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp index 543128915e..6985c37cb6 100644 --- a/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp +++ b/tests/auto/widgets/dialogs/qmessagebox/tst_qmessagebox.cpp @@ -150,8 +150,6 @@ void tst_QMessageBox::sanityTest() QSKIP("Test hangs on macOS 10.12 -- QTQAINFRA-1362"); return; } -#elif defined(Q_OS_WINRT) - QSKIP("Test hangs on winrt -- QTBUG-68297"); #endif QMessageBox msgBox; msgBox.setText("This is insane"); diff --git a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp index 8276d3ea9d..146a9e262d 100644 --- a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp +++ b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp @@ -55,9 +55,6 @@ void tst_QSidebar::setUrls() QCOMPARE(model->rowCount(), 0); qsidebar.setUrls(urls); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "One of the URLs is not seen as valid on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(qsidebar.urls(), urls); QCOMPARE(model->rowCount(), urls.count()); qsidebar.setUrls(urls); @@ -102,9 +99,6 @@ void tst_QSidebar::addUrls() // test < 0 qsidebar.addUrls(urls, -1); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "One of the URLs is not seen as valid on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(model->rowCount(), 2); // test = 0 @@ -192,9 +186,6 @@ void tst_QSidebar::goToUrl() QSignalSpy spy(&qsidebar, SIGNAL(goToUrl(QUrl))); QTest::mousePress(qsidebar.viewport(), Qt::LeftButton, {}, qsidebar.visualRect(qsidebar.model()->index(0, 0)).center()); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(spy.count(), 1); QCOMPARE((spy.value(0)).at(0).toUrl(), urls.first()); } diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp index 5b7ded0ecb..a522dc4122 100644 --- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp +++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp @@ -2596,9 +2596,6 @@ void tst_QWizard::task161658_alignments() void tst_QWizard::task177022_setFixedSize() { -#ifdef Q_OS_WINRT - QSKIP("Widgets cannot have a fixed size on WinRT."); -#endif int width = 300; int height = 200; QWizard wiz; diff --git a/tests/auto/widgets/graphicsview/.prev_CMakeLists.txt b/tests/auto/widgets/graphicsview/.prev_CMakeLists.txt new file mode 100644 index 0000000000..28a641ac61 --- /dev/null +++ b/tests/auto/widgets/graphicsview/.prev_CMakeLists.txt @@ -0,0 +1,24 @@ +# Generated from graphicsview.pro. + +if(QT_FEATURE_private_tests) + add_subdirectory(qgraphicsanchorlayout) + add_subdirectory(qgraphicsanchorlayout1) + add_subdirectory(qgraphicsitem) + add_subdirectory(qgraphicsscene) + add_subdirectory(qgraphicssceneindex) +endif() +add_subdirectory(qgraphicseffectsource) +add_subdirectory(qgraphicsgridlayout) +add_subdirectory(qgraphicsitemanimation) +add_subdirectory(qgraphicslayout) +add_subdirectory(qgraphicslayoutitem) +add_subdirectory(qgraphicslinearlayout) +add_subdirectory(qgraphicsobject) +add_subdirectory(qgraphicspixmapitem) +add_subdirectory(qgraphicspolygonitem) +add_subdirectory(qgraphicstransform) +add_subdirectory(qgraphicsview) +if(QT_FEATURE_style_fusion) + add_subdirectory(qgraphicsproxywidget) + add_subdirectory(qgraphicswidget) +endif() diff --git a/tests/auto/widgets/graphicsview/CMakeLists.txt b/tests/auto/widgets/graphicsview/CMakeLists.txt index be1ae7253a..d995d3c1e0 100644 --- a/tests/auto/widgets/graphicsview/CMakeLists.txt +++ b/tests/auto/widgets/graphicsview/CMakeLists.txt @@ -17,6 +17,7 @@ add_subdirectory(qgraphicsobject) add_subdirectory(qgraphicspixmapitem) add_subdirectory(qgraphicspolygonitem) add_subdirectory(qgraphicstransform) +add_subdirectory(qgraphicsview) if(QT_FEATURE_style_fusion) # special case begin # These tests are never run in coin with qmake since the statement @@ -30,6 +31,3 @@ if(QT_FEATURE_style_fusion) #add_subdirectory(qgraphicswidget) # special case end endif() -if(NOT WINRT) - add_subdirectory(qgraphicsview) -endif() diff --git a/tests/auto/widgets/graphicsview/graphicsview.pro b/tests/auto/widgets/graphicsview/graphicsview.pro index 0f4c1721e3..e99897a4f6 100644 --- a/tests/auto/widgets/graphicsview/graphicsview.pro +++ b/tests/auto/widgets/graphicsview/graphicsview.pro @@ -30,5 +30,3 @@ SUBDIRS=\ !contains(styles, fusion):SUBDIRS -= \ qgraphicsproxywidget \ qgraphicswidget \ - -winrt: SUBDIRS -= qgraphicsview # QTBUG-68297 diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt index 1be66372b6..81cdeeb84a 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/CMakeLists.txt @@ -21,7 +21,7 @@ add_qt_test(tst_qgraphicsitem ## Scopes: ##################################################################### -extend_target(tst_qgraphicsitem CONDITION WIN32 AND NOT WINRT +extend_target(tst_qgraphicsitem CONDITION WIN32 PUBLIC_LIBRARIES user32 ) diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro b/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro index 16818a98f9..7c95972222 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/qgraphicsitem.pro @@ -5,4 +5,4 @@ QT += core-private gui-private SOURCES += tst_qgraphicsitem.cpp DEFINES += QT_NO_CAST_TO_ASCII -win32:!winrt: QMAKE_USE += user32 +win32: QMAKE_USE += user32 diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp index 1cc793503a..e7a79d017b 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp @@ -71,7 +71,7 @@ Q_DECLARE_METATYPE(QPainterPath) Q_DECLARE_METATYPE(QSizeF) Q_DECLARE_METATYPE(QTransform) -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) #include <windows.h> #define Q_CHECK_PAINTEVENTS \ if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \ @@ -6959,9 +6959,6 @@ void tst_QGraphicsItem::opacityZeroUpdates() QRegion expectedRegion = parentDeviceBoundingRect.adjusted(-2, -2, 2, 2); expectedRegion += childDeviceBoundingRect.adjusted(-2, -2, 2, 2); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT. Figure out why - QTBUG-68297", Abort); -#endif COMPARE_REGIONS(view.paintedRegion, expectedRegion); } @@ -8196,9 +8193,6 @@ void tst_QGraphicsItem::moveLineItem() // Make sure the calculated region is correct. item->update(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT. Figure out why - QTBUG-68297", Abort); -#endif QTRY_COMPARE(view.paintedRegion, expectedRegion); view.reset(); @@ -11483,10 +11477,6 @@ void tst_QGraphicsItem::QTBUG_7714_fullUpdateDiscardingOpacityUpdate2() childYellow->setOpacity(1.0); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT. Figure out why - QTBUG-68297", Abort); -#endif - QTRY_VERIFY(origView.repaints > 0); QTRY_VERIFY(view.repaints > 0); } diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt index c566b6c1bf..efcb4598e5 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt @@ -71,7 +71,7 @@ add_qt_resource(tst_qgraphicsscene "testdata" ## Scopes: ##################################################################### -extend_target(tst_qgraphicsscene CONDITION WIN32 AND NOT WINRT +extend_target(tst_qgraphicsscene CONDITION WIN32 PUBLIC_LIBRARIES user32 ) diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro index 2f648a2212..fe8e83ee0a 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/qgraphicsscene.pro @@ -4,7 +4,7 @@ QT += widgets widgets-private testlib QT += core-private gui-private SOURCES += tst_qgraphicsscene.cpp RESOURCES += images.qrc -win32:!winrt: QMAKE_USE += user32 +win32: QMAKE_USE += user32 DEFINES += SRCDIR=\\\"$$PWD\\\" DEFINES += QT_NO_CAST_TO_ASCII diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp index 7e5d94da22..f0a276b9e7 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp @@ -52,7 +52,7 @@ #include "../../../shared/platforminputcontext.h" #include <private/qinputmethod_p.h> -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) #include <QtCore/qt_windows.h> #define Q_CHECK_PAINTEVENTS \ if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \ @@ -2693,7 +2693,7 @@ void tst_QGraphicsScene::render() void tst_QGraphicsScene::renderItemsWithNegativeWidthOrHeight() { -#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) || defined(Q_OS_WINRT) +#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) QSKIP("Test only works on platforms with resizable windows"); #endif QGraphicsScene scene(0, 0, m_testSize.width(), m_testSize.height()); diff --git a/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp b/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp index ff01810938..daf339168c 100644 --- a/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp @@ -356,9 +356,6 @@ void tst_QGraphicsSceneIndex::clear() MyItem *item = new MyItem; scene.addItem(item); qApp->processEvents(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "There is one additional paint event on WinRT - QTBUG-68297", Abort); -#endif QTRY_COMPARE(item->numPaints, 1); } diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp index ba4c1473e8..42cbad14c0 100644 --- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp +++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp @@ -1278,9 +1278,6 @@ void tst_QAbstractItemView::task250754_fontChange() font.setPixelSize(60); tree.setFont(font); -#ifdef Q_OS_WINRT - QSKIP("Resizing the widget does not work as expected for WinRT, so the scroll bar might not be visible"); -#endif //now with the huge items, the scrollbar must be visible QTRY_VERIFY(tree.verticalScrollBar()->isVisible()); @@ -1602,9 +1599,6 @@ void tst_QAbstractItemView::testClickedSignal() QSignalSpy clickedSpy(&view, &QTableWidget::clicked); QTest::mouseClick(view.viewport(), Qt::LeftButton, {}, p); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(clickedSpy.count(), 1); QTest::mouseClick(view.viewport(), Qt::RightButton, {}, p); @@ -2311,9 +2305,6 @@ void tst_QAbstractItemView::QTBUG46785_mouseout_hover_state() QTest::mouseMove(table.viewport(), QPoint(-50, 0)); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "QTest::mouseMove does not work on WinRT", Abort); -#endif QTRY_VERIFY(delegate.m_paintedWithoutHover); } diff --git a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp index 5ac144340d..cca791fe5a 100644 --- a/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp +++ b/tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp @@ -924,10 +924,9 @@ void tst_QColumnView::parentCurrentIndex() QTRY_COMPARE(view.createdColumns[0]->currentIndex(), first); QTRY_COMPARE(view.createdColumns[1]->currentIndex(), second); -#ifndef Q_OS_WINRT // The next two lines should be removed when QTBUG-22707 is resolved. QEXPECT_FAIL("", "QTBUG-22707", Abort); -#endif + QVERIFY(view.createdColumns[2]); QTRY_COMPARE(view.createdColumns[2]->currentIndex(), third); diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp index bb098f32c2..1553b6e982 100644 --- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp +++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp @@ -706,8 +706,6 @@ void tst_QHeaderView::sectionSize() { #if defined Q_OS_QNX QSKIP("The section size is dpi dependent on QNX"); -#elif defined Q_OS_WINRT - QSKIP("Fails on WinRT - QTBUG-68297"); #endif QFETCH(const IntList, boundsCheck); QFETCH(const IntList, defaultSizes); @@ -809,8 +807,6 @@ void tst_QHeaderView::visualIndexAt() { #if defined Q_OS_QNX QSKIP("The section size is dpi dependent on QNX"); -#elif defined Q_OS_WINRT - QSKIP("Fails on WinRT - QTBUG-68297"); #endif QFETCH(const IntList, hidden); QFETCH(const IntList, from); @@ -1843,10 +1839,6 @@ void tst_QHeaderView::restoreBeforeSetModel() void tst_QHeaderView::defaultSectionSizeTest() { -#if defined Q_OS_WINRT - QSKIP("Fails on WinRT - QTBUG-73309"); -#endif - // Setup QTableView qtv; QHeaderView *hv = qtv.verticalHeader(); @@ -2169,9 +2161,6 @@ void tst_QHeaderView::preserveHiddenSectionWidth() void tst_QHeaderView::invisibleStretchLastSection() { -#ifdef Q_OS_WINRT - QSKIP("Fails on WinRT - QTBUG-68297"); -#endif int count = 6; QStandardItemModel model(1, count); QHeaderView view(Qt::Horizontal); diff --git a/tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt b/tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt index af1bac9ff0..dfdf263431 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt +++ b/tests/auto/widgets/itemviews/qitemdelegate/CMakeLists.txt @@ -16,7 +16,7 @@ add_qt_test(tst_qitemdelegate ## Scopes: ##################################################################### -extend_target(tst_qitemdelegate CONDITION WIN32 AND NOT WINRT +extend_target(tst_qitemdelegate CONDITION WIN32 PUBLIC_LIBRARIES user32 ) diff --git a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro index 916694fd0f..fc617b0e5d 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro +++ b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro @@ -3,4 +3,4 @@ TARGET = tst_qitemdelegate QT += widgets widgets-private testlib SOURCES += tst_qitemdelegate.cpp -win32:!winrt: QMAKE_USE += user32 +win32: QMAKE_USE += user32 diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp index a9d2b413f0..36ab1a64a6 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp +++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp @@ -58,7 +58,7 @@ Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) -#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined (Q_OS_WIN) #include <windows.h> #define Q_CHECK_PAINTEVENTS \ if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \ diff --git a/tests/auto/widgets/itemviews/qitemview/BLACKLIST b/tests/auto/widgets/itemviews/qitemview/BLACKLIST deleted file mode 100644 index d5fc89f204..0000000000 --- a/tests/auto/widgets/itemviews/qitemview/BLACKLIST +++ /dev/null @@ -1,2 +0,0 @@ -[scrollTo] -winrt diff --git a/tests/auto/widgets/itemviews/qlistview/CMakeLists.txt b/tests/auto/widgets/itemviews/qlistview/CMakeLists.txt index 07c290128e..6e14ba5c99 100644 --- a/tests/auto/widgets/itemviews/qlistview/CMakeLists.txt +++ b/tests/auto/widgets/itemviews/qlistview/CMakeLists.txt @@ -19,7 +19,7 @@ add_qt_test(tst_qlistview ## Scopes: ##################################################################### -extend_target(tst_qlistview CONDITION WIN32 AND NOT WINRT +extend_target(tst_qlistview CONDITION WIN32 PUBLIC_LIBRARIES user32 ) diff --git a/tests/auto/widgets/itemviews/qlistview/qlistview.pro b/tests/auto/widgets/itemviews/qlistview/qlistview.pro index c3e19adc81..7e2062e86e 100644 --- a/tests/auto/widgets/itemviews/qlistview/qlistview.pro +++ b/tests/auto/widgets/itemviews/qlistview/qlistview.pro @@ -2,4 +2,4 @@ CONFIG += testcase TARGET = tst_qlistview QT += widgets gui-private widgets-private core-private testlib testlib-private SOURCES += tst_qlistview.cpp -win32:!winrt: QMAKE_USE += user32 +win32: QMAKE_USE += user32 diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp index 8c1cff79ec..79ce1e970e 100644 --- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp +++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp @@ -125,7 +125,7 @@ private slots: void scrollBarAsNeeded(); void moveItems(); void wordWrap(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) void setCurrentIndexAfterAppendRowCrash(); #endif void emptyItemSize(); @@ -1415,13 +1415,10 @@ void tst_QListView::wordWrap() lv.showNormal(); QTRY_COMPARE(lv.horizontalScrollBar()->isVisible(), false); -#ifdef Q_OS_WINRT -QSKIP("setFixedSize does not work on WinRT. Vertical scroll bar will not be visible."); -#endif QTRY_COMPARE(lv.verticalScrollBar()->isVisible(), true); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) class SetCurrentIndexAfterAppendRowCrashDialog : public QDialog { Q_OBJECT @@ -1473,7 +1470,7 @@ void tst_QListView::setCurrentIndexAfterAppendRowCrash() SetCurrentIndexAfterAppendRowCrashDialog w; w.exec(); } -#endif // Q_OS_WIN && !Q_OS_WINRT +#endif // Q_OS_WIN void tst_QListView::emptyItemSize() { @@ -2058,9 +2055,6 @@ void tst_QListView::taskQTBUG_21115_scrollToAndHiddenItems_data() void tst_QListView::taskQTBUG_21115_scrollToAndHiddenItems() { QFETCH(QListView::Flow, flow); -#ifdef Q_OS_WINRT - QSKIP("Fails on WinRT - QTBUG-68297"); -#endif ScrollPerItemListView lv; lv.setUniformItemSizes(true); @@ -2253,9 +2247,6 @@ void tst_QListView::testScrollToWithHidden() lv.scrollTo(model.index(26, 0)); int expectedScrollBarValue = lv.verticalScrollBar()->value(); -#ifdef Q_OS_WINRT - QSKIP("Might fail on WinRT - QTBUG-68297"); -#endif QVERIFY(expectedScrollBarValue != 0); lv.scrollTo(model.index(25, 0)); diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp index ccc6997f26..aa5a05f9dc 100644 --- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp +++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp @@ -2329,14 +2329,6 @@ void tst_QTableView::rowViewportPosition() view.setVerticalScrollMode(verticalScrollMode); view.verticalScrollBar()->setValue(verticalScrollValue); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("row 1, scroll per item, 1", "Fails on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("row 5, scroll per item, 5", "Fails on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("row 9, scroll per item, 5", "Fails on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("row 1, scroll per pixel, 1", "Fails on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("row 5, scroll per pixel, 5", "Fails on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("row 9, scroll per pixel, 5", "Fails on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(view.rowViewportPosition(row), rowViewportPosition); } @@ -2500,13 +2492,6 @@ void tst_QTableView::columnViewportPosition() view.setHorizontalScrollMode(horizontalScrollMode); view.horizontalScrollBar()->setValue(horizontalScrollValue); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("column 5, scroll per item, 5", "Fails on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("column 9, scroll per item, 5", "Fails on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("column 1, scroll per pixel 1", "Fails on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("column 5, scroll per pixel 5", "Fails on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("column 9, scroll per pixel 5", "Fails on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(view.columnViewportPosition(column), columnViewportPosition); } diff --git a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp index 760dcac608..f85b885b34 100644 --- a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp @@ -893,9 +893,6 @@ void tst_QTreeView::horizontalScrollMode() QCOMPARE(view.horizontalScrollMode(), QAbstractItemView::ScrollPerPixel); QCOMPARE(view.horizontalScrollBar()->minimum(), 0); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "setFixedSize does not work on WinRT - QTBUG-68297", Abort); -#endif QVERIFY(view.horizontalScrollBar()->maximum() > 2); view.setHorizontalScrollMode(QAbstractItemView::ScrollPerItem); @@ -2068,10 +2065,6 @@ void tst_QTreeView::setSelection() QVERIFY(selectionModel); const QModelIndexList selectedIndexes = selectionModel->selectedIndexes(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("(0,-20,20,50),rows", "Fails on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("(0,-50,20,90),rows", "Fails on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(selectedIndexes.count(), expectedItems.count()); for (const QModelIndex &idx : selectedIndexes) QVERIFY(expectedItems.contains(QPoint(idx.column(), idx.row()))); diff --git a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp index 17617e0734..009086eebd 100644 --- a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp +++ b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp @@ -3487,9 +3487,8 @@ void tst_QTreeWidget::taskQTBUG_34717_collapseAtBottom() void tst_QTreeWidget::task20345_sortChildren() { - if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive) - || !QGuiApplication::platformName().compare(QLatin1String("winrt"), Qt::CaseInsensitive)) - QSKIP("Wayland/WinRT: This causes a crash triggered by setVisible(false)"); + if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive)) + QSKIP("Wayland: This causes a crash triggered by setVisible(false)"); // This test case is considered successful if it is executed (no crash in sorting) QTreeWidget tw; diff --git a/tests/auto/widgets/kernel/qapplication/CMakeLists.txt b/tests/auto/widgets/kernel/qapplication/CMakeLists.txt index 8e68089f5e..3bb7e31691 100644 --- a/tests/auto/widgets/kernel/qapplication/CMakeLists.txt +++ b/tests/auto/widgets/kernel/qapplication/CMakeLists.txt @@ -1,7 +1,5 @@ # Generated from qapplication.pro. +add_subdirectory(desktopsettingsaware) +add_subdirectory(modal) add_subdirectory(test) -if(NOT WINRT) - add_subdirectory(desktopsettingsaware) - add_subdirectory(modal) -endif() diff --git a/tests/auto/widgets/kernel/qapplication/qapplication.pro b/tests/auto/widgets/kernel/qapplication/qapplication.pro index 21bfb50aee..5154c915cd 100644 --- a/tests/auto/widgets/kernel/qapplication/qapplication.pro +++ b/tests/auto/widgets/kernel/qapplication/qapplication.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs -!winrt: SUBDIRS = desktopsettingsaware modal +SUBDIRS = desktopsettingsaware modal test.depends += $$SUBDIRS SUBDIRS += test diff --git a/tests/auto/widgets/kernel/qapplication/test/.prev_CMakeLists.txt b/tests/auto/widgets/kernel/qapplication/test/.prev_CMakeLists.txt index 40e612f0de..7f92e1cee8 100644 --- a/tests/auto/widgets/kernel/qapplication/test/.prev_CMakeLists.txt +++ b/tests/auto/widgets/kernel/qapplication/test/.prev_CMakeLists.txt @@ -29,14 +29,14 @@ extend_target(test CONDITION builtin_testdata BUILTIN_TESTDATA ) -#### Keys ignored in scope 3:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 3:.:.:test.pro:NOT ANDROID: # SUBPROGRAMS = "desktopsettingsaware" "modal" -#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID: # TEST_HELPER_INSTALLS = "../debug/helper" -#### Keys ignored in scope 8:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 8:.:.:test.pro:NOT ANDROID: # TEST_HELPER_INSTALLS = "../release/helper" -#### Keys ignored in scope 10:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 10:.:.:test.pro:NOT ANDROID: # TEST_HELPER_INSTALLS = "../helper" diff --git a/tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt b/tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt index 171ee1b273..304480f509 100644 --- a/tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt +++ b/tests/auto/widgets/kernel/qapplication/test/CMakeLists.txt @@ -30,14 +30,14 @@ extend_target(tst_qapplication CONDITION builtin_testdata # special case BUILTIN_TESTDATA ) -#### Keys ignored in scope 3:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 3:.:.:test.pro:NOT ANDROID: # SUBPROGRAMS = "desktopsettingsaware" "modal" -#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 6:.:.:test.pro:NOT ANDROID: # TEST_HELPER_INSTALLS = "../debug/helper" -#### Keys ignored in scope 8:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 8:.:.:test.pro:NOT ANDROID: # TEST_HELPER_INSTALLS = "../release/helper" -#### Keys ignored in scope 10:.:.:test.pro:NOT ANDROID AND NOT WINRT: +#### Keys ignored in scope 10:.:.:test.pro:NOT ANDROID: # TEST_HELPER_INSTALLS = "../helper" diff --git a/tests/auto/widgets/kernel/qapplication/test/test.pro b/tests/auto/widgets/kernel/qapplication/test/test.pro index 8ade4d8364..39b099261a 100644 --- a/tests/auto/widgets/kernel/qapplication/test/test.pro +++ b/tests/auto/widgets/kernel/qapplication/test/test.pro @@ -9,20 +9,20 @@ builtin_testdata: DEFINES += BUILTIN_TESTDATA TESTDATA = ../test/test.pro ../tmp/README ../modal -!android:!winrt: SUBPROGRAMS = desktopsettingsaware modal +!android: SUBPROGRAMS = desktopsettingsaware modal debug_and_release { CONFIG(debug, debug|release) { TARGET = ../../debug/tst_qapplication - !android:!winrt: TEST_HELPER_INSTALLS = ../debug/helper + !android: TEST_HELPER_INSTALLS = ../debug/helper for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../debug/$${file}" } else { TARGET = ../../release/tst_qapplication - !android:!winrt: TEST_HELPER_INSTALLS = ../release/helper + !android: TEST_HELPER_INSTALLS = ../release/helper for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../release/$${file}" } } else { TARGET = ../tst_qapplication - !android:!winrt: TEST_HELPER_INSTALLS = ../helper + !android: TEST_HELPER_INSTALLS = ../helper for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}" } diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index c9857b4379..b0689f5c16 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -241,9 +241,6 @@ public: void tst_QApplication::alert() { -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support more than 1 native widget at the same time"); -#endif int argc = 0; QApplication app(argc, nullptr); QApplication::alert(nullptr, 0); @@ -811,9 +808,6 @@ public: void tst_QApplication::closeAllWindows() { -#ifdef Q_OS_WINRT - QSKIP("PromptOnCloseWidget does not work on WinRT - QTBUG-68297"); -#endif int argc = 0; QApplication app(argc, nullptr); @@ -922,9 +916,6 @@ void tst_QApplication::libraryPaths() expected = QSet<QString>(expected.constBegin(), expected.constEnd()).values(); expected.sort(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "On WinRT PluginsPath is outside of sandbox. QTBUG-68297", Abort); -#endif QVERIFY2(isPathListIncluded(actual, expected), qPrintable("actual:\n - " + actual.join("\n - ") + "\nexpected:\n - " + expected.join("\n - "))); @@ -1032,9 +1023,6 @@ void tst_QApplication::libraryPaths_qt_plugin_path_2() << QDir(QCoreApplication::applicationDirPath()).canonicalPath() << QDir(QDir::fromNativeSeparators(QString::fromLatin1(validPath))).canonicalPath(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "On WinRT PluginsPath is outside of sandbox. QTBUG-68297", Abort); -#endif QVERIFY2(isPathListIncluded(QCoreApplication::libraryPaths(), expected), qPrintable("actual:\n - " + QCoreApplication::libraryPaths().join("\n - ") + "\nexpected:\n - " + expected.join("\n - "))); @@ -1753,9 +1741,6 @@ void tst_QApplication::focusMouseClick() QSpontaneKeyEvent::setSpontaneous(&ev); QVERIFY(ev.spontaneous()); qApp->notify(&w2, &ev); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QTRY_COMPARE(QApplication::focusWidget(), &w2); // now back to tab focus and click again (it already had focus) -> focus should stay diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp index 45a35fe4f1..fd4ce89b56 100644 --- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp +++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp @@ -282,9 +282,6 @@ void tst_QFormLayout::wrapping() w.setWindowTitle(QTest::currentTestFunction()); w.show(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "setFixedWidth does not work on WinRT", Abort); -#endif QCOMPARE(le->geometry().y() > lbl->geometry().y(), true); //TODO: additional tests covering different wrapping cases diff --git a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp index c8fe1841c8..55116fe8c0 100644 --- a/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp +++ b/tests/auto/widgets/kernel/qlayout/tst_qlayout.cpp @@ -337,7 +337,7 @@ void tst_QLayout::adjustSizeShouldMakeSureLayoutIsActivated() void tst_QLayout::testRetainSizeWhenHidden() { -#if (defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)) || defined(Q_OS_WINRT) +#if (defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED)) QSKIP("Test does not work on platforms which default to showMaximized()"); #endif diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST index 55738ca036..9df4e4c1ab 100644 --- a/tests/auto/widgets/kernel/qwidget/BLACKLIST +++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST @@ -39,9 +39,6 @@ rhel-7.6 centos opensuse-leap ubuntu -[windowState] -# QTBUG-75270 -winrt [syntheticEnterLeave] macos # Can't move cursor (QTBUG-76312) diff --git a/tests/auto/widgets/kernel/qwidget/CMakeLists.txt b/tests/auto/widgets/kernel/qwidget/CMakeLists.txt index dc47e7d9d9..bf7544c393 100644 --- a/tests/auto/widgets/kernel/qwidget/CMakeLists.txt +++ b/tests/auto/widgets/kernel/qwidget/CMakeLists.txt @@ -51,7 +51,7 @@ extend_target(tst_qwidget CONDITION APPLE ${FWSecurity} ) -extend_target(tst_qwidget CONDITION WIN32 AND NOT WINRT +extend_target(tst_qwidget CONDITION WIN32 PUBLIC_LIBRARIES gdi32 user32 diff --git a/tests/auto/widgets/kernel/qwidget/qwidget.pro b/tests/auto/widgets/kernel/qwidget/qwidget.pro index d3fbd6d0d9..98c0102d9f 100644 --- a/tests/auto/widgets/kernel/qwidget/qwidget.pro +++ b/tests/auto/widgets/kernel/qwidget/qwidget.pro @@ -16,4 +16,4 @@ mac { OBJECTIVE_SOURCES += tst_qwidget_mac_helpers.mm } -win32:!winrt: QMAKE_USE += user32 gdi32 +win32: QMAKE_USE += user32 gdi32 diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 365f64014a..a999ea05df 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -84,7 +84,7 @@ using namespace QTestPrivate; -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) # include <QtCore/qt_windows.h> # include <QtGui/private/qguiapplication_p.h> #include <qpa/qplatformnativeinterface.h> @@ -106,7 +106,7 @@ static HWND winHandleOf(const QWidget *w) if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \ QSKIP("desktop is not visible, this test would fail"); -#else // Q_OS_WIN && !Q_OS_WINRT +#else // Q_OS_WIN # define Q_CHECK_PAINTEVENTS #endif @@ -121,7 +121,7 @@ bool macHasAccessToWindowsServer() } #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) static inline void setWindowsAnimationsEnabled(bool enabled) { ANIMATIONINFO animation = { sizeof(ANIMATIONINFO), enabled }; @@ -134,10 +134,10 @@ static inline bool windowsAnimationsEnabled() SystemParametersInfo(SPI_GETANIMATION, 0, &animation, 0); return animation.iMinAnimate; } -#else // Q_OS_WIN && !Q_OS_WINRT +#else // Q_OS_WIN inline void setWindowsAnimationsEnabled(bool) {} static inline bool windowsAnimationsEnabled() { return false; } -#endif // !Q_OS_WIN || Q_OS_WINRT +#endif // !Q_OS_WIN template <class T> static QByteArray msgComparisonFailed(T v1, const char *op, T v2) @@ -192,7 +192,7 @@ private slots: void appFocusWidgetWithFocusProxyLater(); void appFocusWidgetWhenLosingFocusProxy(); void explicitTabOrderWithComplexWidget(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) void activation(); #endif void reparent(); @@ -269,7 +269,7 @@ private slots: void subtractOpaqueSiblings(); -#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined (Q_OS_WIN) void setGeometry_win(); #endif @@ -339,7 +339,7 @@ private slots: void quitOnCloseAttribute(); void moveRect(); -#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined (Q_OS_WIN) void gdiPainting(); void paintOnScreenPossible(); #endif @@ -577,7 +577,7 @@ void tst_QWidget::getSetCheck() QCOMPARE(true, obj1.autoFillBackground()); var1.reset(); -#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined (Q_OS_WIN) obj1.setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint); const HWND handle = reinterpret_cast<HWND>(obj1.winId()); // explicitly create window handle QVERIFY(GetWindowLong(handle, GWL_STYLE) & LONG(WS_POPUP)); @@ -1384,7 +1384,7 @@ void tst_QWidget::visible_setWindowOpacity() QVERIFY( !testWidget->isVisible() ); testWidget->setWindowOpacity(0.5); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) QVERIFY(!::IsWindowVisible(winHandleOf(testWidget.data()))); #endif testWidget->setWindowOpacity(1.0); @@ -1574,7 +1574,7 @@ void tst_QWidget::mapFromAndTo() subWindow2->setGeometry(75, 75, 100, 100); subSubWindow->setGeometry(10, 10, 10, 10); -#if !defined(Q_OS_QNX) && !defined(Q_OS_WINRT) +#if !defined(Q_OS_QNX) //update visibility if (windowMinimized) { if (!windowHidden) { @@ -2276,7 +2276,7 @@ void tst_QWidget::explicitTabOrderWithComplexWidget() QTRY_COMPARE(QApplication::focusWidget(), lineEditOne); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) void tst_QWidget::activation() { Q_CHECK_PAINTEVENTS @@ -2321,8 +2321,7 @@ void tst_QWidget::windowState() QPoint pos; QSize size = m_testWidgetSize; if (QGuiApplicationPrivate::platformIntegration()->defaultWindowState(Qt::Widget) - == Qt::WindowFullScreen - || m_platform == QStringLiteral("winrt")) { + == Qt::WindowFullScreen) { size = QGuiApplication::primaryScreen()->size(); } else { pos = QPoint(10, 10); @@ -2526,8 +2525,6 @@ void tst_QWidget::showFullScreen() QSKIP("QTBUG-52974"); #endif - if (m_platform == QStringLiteral("winrt")) - QSKIP("WinRT: This fails. QTBUG-68297"); QWidget plain; QHBoxLayout *layout; QWidget layouted; @@ -2651,8 +2648,6 @@ void tst_QWidget::resizeEvent() wTopLevel.resize(m_testWidgetSize); wTopLevel.show(); QVERIFY(QTest::qWaitForWindowExposed(&wTopLevel)); - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT does not support resize", Abort); QCOMPARE (wTopLevel.m_resizeEventCount, 1); // initial resize event before paint for toplevels wTopLevel.hide(); QSize safeSize(640,480); @@ -2683,9 +2678,6 @@ void tst_QWidget::showMinimized() plain.showMinimized(); QVERIFY(plain.isMinimized()); QVERIFY(plain.isVisible()); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Winrt does not support move and resize", Abort); -#endif QVERIFY2(HighDpi::fuzzyCompare(plain.pos(), pos, m_fuzz), qPrintable(HighDpi::msgPointMismatch(plain.pos(), pos))); @@ -2845,15 +2837,11 @@ void tst_QWidget::showMinimizedKeepsFocus() #ifdef Q_OS_MACOS if (!macHasAccessToWindowsServer()) QEXPECT_FAIL("", "When not having WindowServer access, we lose focus.", Continue); -#elif defined(Q_OS_WINRT) - QEXPECT_FAIL("", "Winrt fails here - QTBUG-68297", Continue); #endif QTRY_COMPARE(window.focusWidget(), firstchild); #ifdef Q_OS_MACOS if (!macHasAccessToWindowsServer()) QEXPECT_FAIL("", "When not having WindowServer access, we lose focus.", Continue); -#elif defined(Q_OS_WINRT) - QEXPECT_FAIL("", "Winrt fails here - QTBUG-68297", Continue); #endif QTRY_COMPARE(QApplication::focusWidget(), firstchild); } @@ -2884,9 +2872,6 @@ void tst_QWidget::reparent() parent.show(); childTLW.show(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "WinRT does not support more than 1 top level widget", Abort); -#endif QVERIFY(QTest::qWaitForWindowExposed(&parent)); parent.move(parentPosition); @@ -2984,8 +2969,6 @@ void tst_QWidget::normalGeometry() if (m_platform == QStringLiteral("wayland")) QSKIP("Wayland: This fails. Figure out why."); - else if (m_platform == QStringLiteral("winrt")) - QSKIP("WinRT: This fails. Figure out why - QTBUG-68297."); QWidget parent; parent.setWindowTitle("NormalGeometry parent"); QWidget *child = new QWidget(&parent); @@ -3098,8 +3081,6 @@ void tst_QWidget::setGeometry() tlw.setGeometry(tr); child.setGeometry(cr); tlw.showNormal(); - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT does not support setGeometry", Abort); QTRY_COMPARE(tlw.geometry().size(), tr.size()); QCOMPARE(child.geometry(), cr); @@ -3606,8 +3587,6 @@ void tst_QWidget::saveRestoreGeometry() QVERIFY(QTest::qWaitForWindowExposed(&widget)); QApplication::processEvents(); - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT does not support move/resize", Abort); QTRY_VERIFY2(HighDpi::fuzzyCompare(widget.pos(), position, m_fuzz), qPrintable(HighDpi::msgPointMismatch(widget.pos(), position))); QCOMPARE(widget.size(), size); @@ -3785,9 +3764,6 @@ void tst_QWidget::restoreVersion1Geometry() QVERIFY(QTest::qWaitForWindowExposed(&widget)); QTest::qWait(100); - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT does not support restoreGeometry", Abort); - if (expectedWindowState == Qt::WindowNoState) { QTRY_COMPARE(widget.size(), expectedSize); QCOMPARE(widget.geometry(), expectedNormalGeometry); @@ -3833,8 +3809,6 @@ void tst_QWidget::widgetAt() QSKIP("Wayland: This fails. Figure out why."); if (m_platform == QStringLiteral("offscreen")) QSKIP("Platform offscreen does not support lower()/raise() or WindowMasks"); - if (m_platform == QStringLiteral("winrt")) - QSKIP("WinRT does not support more than 1 top level widget"); Q_CHECK_PAINTEVENTS @@ -4136,8 +4110,6 @@ void tst_QWidget::optimizedResizeMove() staticWidget.gotPaintEvent = false; staticWidget.move(staticWidget.pos() + QPoint(10, 10)); QTest::qWait(20); - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT does not support move/resize", Abort); QCOMPARE(staticWidget.gotPaintEvent, false); staticWidget.gotPaintEvent = false; @@ -4241,8 +4213,6 @@ void tst_QWidget::optimizedResize_topLevel() QTRY_VERIFY(topLevel.gotPaintEvent); if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("offscreen")) QSKIP("QTBUG-26424"); - else if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT does not support move/resize", Abort); QCOMPARE(topLevel.partial, true); QCOMPARE(topLevel.paintedRegion, expectedUpdateRegion); } @@ -4349,8 +4319,6 @@ void tst_QWidget::setFixedSize() QVERIFY(QTest::qWaitForWindowActive(&w)); if (m_platform == QStringLiteral("xcb")) QSKIP("QTBUG-26424"); - else if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT does not support move/resize", Abort); QCOMPARE(w.size(), defaultSize + QSize(150,150)); } @@ -4600,8 +4568,6 @@ void tst_QWidget::transientParent() void tst_QWidget::showNativeChild() { - if (m_platform == QStringLiteral("winrt")) - QSKIP("WinRT does not support setGeometry"); QWidget topLevel; topLevel.setGeometry(QRect(m_availableTopLeft + QPoint(100, 100), m_testWidgetSize)); topLevel.setWindowTitle(__FUNCTION__); @@ -4780,8 +4746,6 @@ void tst_QWidget::update() // widgets are transparent by default, so both should get repaints { - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT does not support setGeometry", Abort); QApplication::processEvents(); QApplication::processEvents(); QCOMPARE(child.numPaintEvents, 1); @@ -5023,8 +4987,6 @@ void tst_QWidget::scroll() QCoreApplication::processEvents(); QRegion dirty(QRect(0, 0, w, 10)); dirty += QRegion(QRect(0, 10, 10, h - 10)); - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT does not support move/resize", Abort); QTRY_COMPARE(updateWidget.paintedRegion, dirty); } @@ -5186,8 +5148,6 @@ void tst_QWidget::setWindowGeometry() { if (m_platform == QStringLiteral("xcb")) QSKIP("X11: Skip this test due to Window manager positioning issues."); - else if (m_platform == QStringLiteral("winrt")) - QSKIP("WinRT does not support setWindowGeometry"); QFETCH(Rects, rects); QFETCH(int, windowFlags); @@ -5319,7 +5279,7 @@ void tst_QWidget::setWindowGeometry() } } -#if defined (Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined (Q_OS_WIN) void tst_QWidget::setGeometry_win() { QWidget widget; @@ -5340,7 +5300,7 @@ void tst_QWidget::setGeometry_win() QVERIFY2(rt.top <= m_availableTopLeft.y(), msgComparisonFailed(int(rt.top), "<=", m_availableTopLeft.y())); } -#endif // defined (Q_OS_WIN) && !defined(Q_OS_WINRT) +#endif // defined (Q_OS_WIN) // Since X11 WindowManager operation are all async, and we have no way to know if the window // manager has finished playing with the window geometry, this test can't be reliable on X11. @@ -5356,8 +5316,6 @@ void tst_QWidget::windowMoveResize() QSKIP("X11: Skip this test due to Window manager positioning issues."); if (m_platform == QStringLiteral("wayland")) QSKIP("Wayland: This fails. Figure out why."); - if (m_platform == QStringLiteral("winrt")) - QSKIP("WinRT does not support move/resize"); QFETCH(Rects, rects); QFETCH(int, windowFlags); @@ -5681,8 +5639,6 @@ void tst_QWidget::moveChild() QTRY_COMPARE(parent.r, QRegion(parent.rect()) - child.geometry()); QTRY_COMPARE(child.r, QRegion(child.rect())); - if (m_platform == QStringLiteral("winrt")) - QSKIP("WinRT does not support setGeometry (and we cannot use QEXPECT_FAIL because of VERIFY_COLOR)"); VERIFY_COLOR(child, child.rect(), child.color); VERIFY_COLOR(parent, QRegion(parent.rect()) - child.geometry(), parent.color); @@ -5739,8 +5695,6 @@ void tst_QWidget::showAndMoveChild() child.move(desktopDimensions.width()/2, desktopDimensions.height()/2); QCoreApplication::processEvents(); - if (m_platform == QStringLiteral("winrt")) - QSKIP("WinRT does not support setGeometry (and we cannot use QEXPECT_FAIL because of VERIFY_COLOR)"); VERIFY_COLOR(child, child.rect(), Qt::blue); VERIFY_COLOR(parent, QRegion(parent.rect()) - child.geometry(), Qt::red); } @@ -5831,8 +5785,6 @@ void tst_QWidget::multipleToplevelFocusCheck() if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation)) QSKIP("Window activation is not supported"); - else if (m_platform == QStringLiteral("winrt")) - QSKIP("Winrt: Sometimes crashes in QTextLayout. - QTBUG-68297"); TopLevelFocusCheck w1; TopLevelFocusCheck w2; @@ -5991,8 +5943,6 @@ void tst_QWidget::setFocus() testWidget->clearFocus(); child1.setFocus(); - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT fails here - QTBUG-68297", Abort); QVERIFY(!child1.hasFocus()); QCOMPARE(window.focusWidget(), &child1); QCOMPARE(QApplication::focusWidget(), nullptr); @@ -6692,8 +6642,6 @@ QByteArray EventRecorder::msgEventListMismatch(const EventList &expected, const void tst_QWidget::childEvents() { - if (m_platform == QStringLiteral("winrt")) - QSKIP("WinRT: This fails. QTBUG-68297."); EventRecorder::EventList expected; // Move away the cursor; otherwise it might result in an enter event if it's @@ -7092,8 +7040,6 @@ void tst_QWidget::renderInvisible() { if (m_platform == QStringLiteral("xcb")) QSKIP("QTBUG-26424"); - if (m_platform == QStringLiteral("winrt")) - QSKIP("WinRT: This fails. QTBUG-68297."); QScopedPointer<QCalendarWidget> calendar(new QCalendarWidget); calendar->move(m_availableTopLeft + QPoint(100, 100)); @@ -8042,8 +7988,6 @@ void tst_QWidget::hideOpaqueChildWhileHidden() child.hide(); child2.hide(); - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort); QTRY_COMPARE(w.r, QRegion(child.geometry())); child.show(); @@ -8082,8 +8026,6 @@ void tst_QWidget::updateWhileMinimized() // Make sure update requests are discarded until the widget is shown again. widget.update(0, 0, 50, 50); QTest::qWait(10); - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort); int count = 0; // mutter/GNOME Shell doesn't unmap when minimizing window. // More details at https://gitlab.gnome.org/GNOME/mutter/issues/185 @@ -8655,8 +8597,6 @@ void tst_QWidget::doubleRepaint() #if defined(Q_OS_QNX) QEXPECT_FAIL("", "Platform does not support showMinimized()", Continue); #endif - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort); QCOMPARE(widget.numPaintEvents, 0); widget.numPaintEvents = 0; @@ -8781,8 +8721,6 @@ void tst_QWidget::setMaskInResizeEvent() QRegion expectedParentUpdate(0, 0, 100, 10); // Old testWidget area. expectedParentUpdate += testWidget.geometry(); // New testWidget area. - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort); QTRY_COMPARE(w.paintedRegion, expectedParentUpdate); QTRY_COMPARE(testWidget.paintedRegion, testWidget.mask()); @@ -9015,7 +8953,7 @@ void tst_QWidget::moveRect() child.move(10, 10); // Don't crash. } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) class GDIWidget : public QDialog { Q_OBJECT @@ -9082,7 +9020,7 @@ void tst_QWidget::paintOnScreenPossible() w2.setAttribute(Qt::WA_PaintOnScreen); QVERIFY(w2.testAttribute(Qt::WA_PaintOnScreen)); } -#endif // Q_OS_WIN && !Q_OS_WINRT +#endif // Q_OS_WIN void tst_QWidget::reparentStaticWidget() { @@ -9240,8 +9178,6 @@ void tst_QWidget::translucentWidget() const QImage actual = widgetSnapshot.toImage().convertToFormat(QImage::Format_RGB32); QImage expected = pm.toImage().scaled(label.devicePixelRatioF() * pm.size()); expected.setDevicePixelRatio(label.devicePixelRatioF()); - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort); QCOMPARE(actual.size(),expected.size()); QCOMPARE(actual,expected); @@ -9963,8 +9899,6 @@ void tst_QWidget::rectOutsideCoordinatesLimit_task144779() correct.fill(Qt::green); const QPixmap mainPixmap = grabFromWidget(&main, QRect(QPoint(0, 0), QSize(-1, -1))); - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort); QTRY_COMPARE(mainPixmap.toImage().convertToFormat(QImage::Format_RGB32), correct.toImage().convertToFormat(QImage::Format_RGB32)); #ifndef QT_NO_CURSOR @@ -10058,8 +9992,6 @@ void tst_QWidget::activateWindow() QCoreApplication::processEvents(); QTRY_VERIFY(mainwindow->isActiveWindow()); - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort); QTRY_VERIFY(!mainwindow2->isActiveWindow()); } @@ -11363,8 +11295,6 @@ void tst_QWidget::resizeStaticContentsChildWidget_QTBUG35282() widget.showNormal(); QVERIFY(QTest::qWaitForWindowExposed(&widget)); - if (m_platform == QStringLiteral("winrt")) - QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort); QCOMPARE(childWidget.numPaintEvents, 0); childWidget.reset(); diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp index 72fa32a1b1..ee40fc56c9 100644 --- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp +++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp @@ -192,9 +192,6 @@ void tst_QWidget_window::tst_move_show() const QPoint pos(100, 100); w.move(pos); w.show(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Winrt does not support move", Abort); -#endif QVERIFY2(qFuzzyCompareWindowPosition(w.pos(), pos, m_fuzz), qPrintable(msgPointMismatch(w.pos(), pos))); } @@ -226,9 +223,6 @@ void tst_QWidget_window::tst_resize_show() QWidget w; w.resize(m_testWidgetSize); w.show(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Winrt does not support resize", Abort); -#endif QCOMPARE(w.size(), m_testWidgetSize); } @@ -418,8 +412,7 @@ void tst_QWidget_window::tst_exposeObscuredMapped_QTBUG39220() const auto integration = QGuiApplicationPrivate::platformIntegration(); if (!integration->hasCapability(QPlatformIntegration::MultipleWindows) - || !integration->hasCapability(QPlatformIntegration::NonFullScreenWindows) - || QGuiApplication::platformName() == QLatin1String("winrt")) { + || !integration->hasCapability(QPlatformIntegration::NonFullScreenWindows)) { QSKIP("The platform does not have the required capabilities"); } // QTBUG-39220: Fully obscured parent widgets may not receive expose @@ -631,9 +624,6 @@ void tst_QWidget_window::tst_dnd() QWidget *dropsAcceptingWidget3 = new DnDEventLoggerWidget(&log, &dndTestWidget, true); dropsAcceptingWidget3->setAcceptDrops(true); dropsAcceptingWidget3->setObjectName(QLatin1String("acceptingDropsWidget3")); - // 260 + 40 = 300 = widget size, must not be more than that. - // otherwise it will break WinRT because there the tlw is maximized every time - // and this window will receive one more event dropsAcceptingWidget3->resize(180, 40); dropsAcceptingWidget3->move(10, 260); @@ -994,9 +984,6 @@ void tst_QWidget_window::tst_resize_count() resize.setWindowFlags(Qt::X11BypassWindowManagerHint); resize.show(); QVERIFY(QTest::qWaitForWindowExposed(&resize)); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Winrt does not support resize", Abort); -#endif QCOMPARE(resize.resizeCount, 1); resize.resizeCount = 0; QSize size = resize.size(); @@ -1274,11 +1261,6 @@ void tst_QWidget_window::setWindowState() w.setWindowState(state); QCOMPARE(w.windowState(), state); w.show(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("0", "Winrt windows are maximized by default", Abort); - QEXPECT_FAIL("Qt::WindowMinimized", "Winrt windows are maximized by default", Abort); - QEXPECT_FAIL("Qt::WindowFullScreen", "Winrt windows are maximized by default", Abort); -#endif QCOMPARE(w.windowState(), state); QCOMPARE(w.windowHandle()->windowStates(), state); if (!(state & Qt::WindowMinimized)) diff --git a/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp b/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp index 98aebfe975..2a8edaf1a2 100644 --- a/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp +++ b/tests/auto/widgets/kernel/qwindowcontainer/tst_qwindowcontainer.cpp @@ -107,9 +107,6 @@ void tst_QWindowContainer::testShow() root.show(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QVERIFY(QTest::qWaitForWindowExposed(window)); } @@ -149,9 +146,6 @@ void tst_QWindowContainer::testExposeObscure() container->show(); QVERIFY(QTest::qWaitForWindowExposed(container.data())); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QVERIFY(QTest::qWaitForWindowExposed(window)); QVERIFY(window->numberOfExposes > 0); @@ -273,9 +267,6 @@ void tst_QWindowContainer::testUnparentReparent() QTRY_VERIFY(!window->isVisible()); container->show(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QVERIFY(QTest::qWaitForWindowExposed(window)); QTRY_VERIFY(window->isVisible()); @@ -383,9 +374,6 @@ void tst_QWindowContainer::testNativeContainerParent() root.show(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QVERIFY(QTest::qWaitForWindowExposed(window)); QTRY_COMPARE(window->parent(), container->windowHandle()); } diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp index 58dbfeb118..3b7495fda8 100644 --- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp +++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp @@ -75,7 +75,7 @@ private slots: void testFusionStyle(); #endif void testWindowsStyle(); -#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA) void testWindowsVistaStyle(); #endif #ifdef Q_OS_MAC @@ -183,9 +183,6 @@ void tst_QStyle::drawItemPixmap() QVERIFY(image.reinterpretAsFormat(QImage::Format_RGB32)); const QRgb *bits = reinterpret_cast<const QRgb *>(image.constBits()); const QRgb *end = bits + image.sizeInBytes() / sizeof(QRgb); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "QWidget::resize does not work on WinRT", Continue); -#endif QVERIFY(std::all_of(bits, end, [green] (QRgb r) { return r == green; })); } @@ -319,7 +316,7 @@ void tst_QStyle::testWindowsStyle() wstyle->drawControl(QStyle::CE_ProgressBar, &pb, &painter, nullptr); } -#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA) void tst_QStyle::testWindowsVistaStyle() { QScopedPointer<QStyle> vistastyle(QStyleFactory::create("WindowsVista")); @@ -515,9 +512,6 @@ void tst_QStyle::testFrameOnlyAroundContents() area.verticalScrollBar()->setStyle(&frameStyle); area.setStyle(&frameStyle); // Test that we reserve space for scrollbar spacing -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "QWidget::setGeometry does not work on WinRT", Continue); -#endif QCOMPARE(viewPortWidth, area.viewport()->width() + SCROLLBAR_SPACING); } diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp index dcc3837d0d..5b7ba0dbb8 100644 --- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp @@ -625,9 +625,6 @@ void tst_QCompleter::fileSystemModel_data() void tst_QCompleter::fileSystemModel() { -#ifdef Q_OS_WINRT - QSKIP("WinRT cannot access directories outside of the application's sandbox"); -#endif //QFileSystemModel is assync. filter(true); } @@ -1665,9 +1662,6 @@ void tst_QCompleter::QTBUG_14292_filesystem() // Wait for all file system model slots/timers to trigger // until the model sees the subdirectories. -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QTRY_VERIFY(testFileSystemReady(model)); // But this should not cause the combo to pop up. QVERIFY(!comp.popup()->isVisible()); diff --git a/tests/auto/widgets/widgets/CMakeLists.txt b/tests/auto/widgets/widgets/CMakeLists.txt index 60776f5da2..5421fdf378 100644 --- a/tests/auto/widgets/widgets/CMakeLists.txt +++ b/tests/auto/widgets/widgets/CMakeLists.txt @@ -16,7 +16,6 @@ add_subdirectory(qfocusframe) add_subdirectory(qfontcombobox) add_subdirectory(qframe) add_subdirectory(qgroupbox) -add_subdirectory(qkeysequenceedit) add_subdirectory(qlabel) add_subdirectory(qlcdnumber) add_subdirectory(qlineedit) @@ -41,7 +40,6 @@ add_subdirectory(qtabwidget) add_subdirectory(qtextbrowser) add_subdirectory(qtoolbox) add_subdirectory(qtoolbutton) - if(QT_FEATURE_private_tests) add_subdirectory(qabstractspinbox) add_subdirectory(qcombobox) @@ -49,7 +47,9 @@ if(QT_FEATURE_private_tests) add_subdirectory(qtextedit) add_subdirectory(qtoolbar) endif() - -if(NOT WINRT AND QT_FEATURE_opengl) +if(QT_FEATURE_shortcut) + add_subdirectory(qkeysequenceedit) +endif() +if(QT_FEATURE_opengl) add_subdirectory(qopenglwidget) endif() diff --git a/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp b/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp index 01ecfb2ca9..fd1e5c267d 100644 --- a/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp +++ b/tests/auto/widgets/widgets/qabstractscrollarea/tst_qabstractscrollarea.cpp @@ -340,10 +340,6 @@ void tst_QAbstractScrollArea::task214488_layoutDirection() int refValue = hbar->value(); qApp->sendEvent(&scrollArea, new QKeyEvent(QEvent::KeyPress, key, Qt::NoModifier)); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "WinRT: Scrollbar is not guaranteed to be visible, as QWidget::resize does not" - "work", Abort); -#endif QVERIFY(lessThan ? (hbar->value() < refValue) : (hbar->value() > refValue)); } diff --git a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp index c3ae2ea541..ecea005535 100644 --- a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp +++ b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp @@ -153,9 +153,6 @@ void tst_QCalendarWidget::getSetCheck() void tst_QCalendarWidget::buttonClickCheck() { -#ifdef Q_OS_WINRT - QSKIP("Fails on WinRT - QTBUG-68297"); -#endif if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) QSKIP("Wayland: This fails. Figure out why."); @@ -289,10 +286,6 @@ void tst_QCalendarWidget::showPrevNext() QFETCH(QDate, dateOrigin); QFETCH(QDate, expectedDate); -#ifdef Q_OS_WINRT - QSKIP("Fails on WinRT - QTBUG-68297"); -#endif - QCalendarWidget calWidget; calWidget.show(); QVERIFY(QTest::qWaitForWindowExposed(&calWidget)); diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index a4b2066087..da010ac357 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -1694,9 +1694,6 @@ void tst_QComboBox::setCustomModelAndView() QTest::qWait(QApplication::doubleClickInterval()); QTest::mouseClick(window->windowHandle(), Qt::LeftButton, {}, view->mapTo(window, subItemRect.center())); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QTRY_COMPARE(combo.currentText(), subItem21Text); } @@ -2406,9 +2403,6 @@ void tst_QComboBox::task190205_setModelAdjustToContents() correctBox.addItems(finalContent); correctBox.showNormal(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "WinRT does not support more than 1 native top level widget", Abort); -#endif QVERIFY(QTest::qWaitForWindowExposed(&box)); QVERIFY(QTest::qWaitForWindowExposed(&correctBox)); @@ -3353,9 +3347,6 @@ void tst_QComboBox::task_QTBUG_56693_itemFontFromModel() QVERIFY(container); QVERIFY(QTest::qWaitForWindowExposed(container)); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(proxyStyle->italicItemsNo, 5); box.hidePopup(); diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp index 6efac708b9..a1dd1197a3 100644 --- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp @@ -450,7 +450,7 @@ void tst_QDateTimeEdit::cleanupTestCase() void tst_QDateTimeEdit::init() { QLocale::setDefault(QLocale(QLocale::C)); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)); #endif testWidget->setDisplayFormat("dd/MM/yyyy"); // Nice default to have diff --git a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp index 8ece03983b..55be152e40 100644 --- a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp +++ b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp @@ -890,9 +890,6 @@ void tst_QDockWidget::task169808_setFloating() mw.show(); QVERIFY(QTest::qWaitForWindowExposed(&mw)); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Widgets are maximized on WinRT by default", Abort); -#endif QCOMPARE(dw->widget()->size(), dw->widget()->sizeHint()); //and now we try to test if the contents margin is taken into account @@ -935,9 +932,6 @@ void tst_QDockWidget::task248604_infiniteResize() d.setContentsMargins(2, 2, 2, 2); d.setMinimumSize(320, 240); d.showNormal(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Widgets are maximized on WinRT by default", Abort); -#endif QTRY_COMPARE(d.size(), QSize(320, 240)); } diff --git a/tests/auto/widgets/widgets/qlineedit/BLACKLIST b/tests/auto/widgets/widgets/qlineedit/BLACKLIST deleted file mode 100644 index 537c81413e..0000000000 --- a/tests/auto/widgets/widgets/qlineedit/BLACKLIST +++ /dev/null @@ -1,31 +0,0 @@ -# QTBUG-69111 -[undo_keypressevents:Inserts,moving,selection, delete and undo] -android - -# QTBUG-69112 -[inlineCompletion] -android - -# QTBUG-69116 -[leftKeyOnSelectedText] -android - -# QTBUG-69113 -[textMargin] -android - -# QTBUG-69119 -[task174640_editingFinished] -android - -# QTBUG-69118 -[task210502_caseInsensitiveInlineCompletion] -android - -# QTBUG-69114 -[QTBUG697_paletteCurrentColorGroup] -android - -# QTBUG-69115 -[testQuickSelectionWithMouse] -android diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp index 6b0beb614a..2367d56dad 100644 --- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp @@ -4851,9 +4851,6 @@ void tst_QLineEdit::testQuickSelectionWithMouse() QTest::mousePress(lineEdit.windowHandle(), Qt::LeftButton, Qt::NoModifier, center); QTest::mouseMove(lineEdit.windowHandle(), center + QPoint(20, 0)); qCDebug(lcTests) << "Selected text:" << lineEdit.selectedText(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "WinRT does not support QTest::mousePress/-Move", Abort); -#endif QVERIFY(!lineEdit.selectedText().isEmpty()); QVERIFY(!lineEdit.selectedText().endsWith(suffix)); diff --git a/tests/auto/widgets/widgets/qmainwindow/BLACKLIST b/tests/auto/widgets/widgets/qmainwindow/BLACKLIST deleted file mode 100644 index a03ea11f40..0000000000 --- a/tests/auto/widgets/widgets/qmainwindow/BLACKLIST +++ /dev/null @@ -1,2 +0,0 @@ -[resizeDocks] -winrt diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp index 01d625d091..5c595e99c7 100644 --- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp +++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp @@ -1787,9 +1787,6 @@ void tst_QMainWindow::centralWidgetSize() mainWindow.setCentralWidget(&widget); mainWindow.show(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Widgets are maximized by default on WinRT - QTBUG-68297", Abort); -#endif QTRY_COMPARE(widget.size(), widget.sizeHint()); } @@ -1834,9 +1831,6 @@ void tst_QMainWindow::fixedSizeCentralWidget() // finally verify that we get the space back when we resize to the old size mainWindow.resize(mwSize); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "QMainWindow::resize does not work on WinRT", Continue); -#endif QTRY_COMPARE(child->height(), childHeight); } diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp index 068742f33f..f8a91e6ec6 100644 --- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp +++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp @@ -358,9 +358,6 @@ void tst_QMdiArea::subWindowActivated() QMdiSubWindow *window = windows.at(i); window->showNormal(); qApp->processEvents(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("data2", "Broken on WinRT - QTBUG-68297", Abort); -#endif QVERIFY( window == activeWindow ); QVERIFY( activeWindow == workspace->activeSubWindow() ); } @@ -521,9 +518,6 @@ void tst_QMdiArea::subWindowActivated2() mdiArea.showNormal(); mdiArea.activateWindow(); QVERIFY(QTest::qWaitForWindowActive(&mdiArea)); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort); -#endif QTRY_COMPARE(spy.count(), 1); QCOMPARE(mdiArea.activeSubWindow(), activeSubWindow); spy.clear(); @@ -1201,9 +1195,6 @@ void tst_QMdiArea::addAndRemoveWindows() // Don't occupy space. QMdiSubWindow *window3 = workspace.addSubWindow(new QWidget); window3->show(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Windows are maximized by default on WinRT", Abort); -#endif QCOMPARE(window3->geometry().topLeft(), QPoint(window2RestoreGeometry.right() + 1, 0)); } @@ -1467,9 +1458,6 @@ void tst_QMdiArea::subWindowList() QList<QMdiSubWindow *> widgets = workspace.subWindowList(windowOrder); QCOMPARE(widgets.count(), windowCount); if (windowOrder == QMdiArea::StackingOrder) { -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(widgets.at(widgets.count() - 1), windows[staysOnTop2]); QCOMPARE(widgets.at(widgets.count() - 2), windows[staysOnTop1]); QCOMPARE(widgets.at(widgets.count() - 3), windows[activeSubWindow]); @@ -1688,9 +1676,6 @@ void tst_QMdiArea::tileSubWindows() // Re-tile. workspace.tileSubWindows(); workspace.setActiveSubWindow(0); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(workspace.viewport()->childrenRect(), workspace.viewport()->rect()); // Cascade and verify that the views are not tiled anymore. @@ -1999,9 +1984,6 @@ void tst_QMdiArea::dontMaximizeSubWindowOnActivation() // Verify that new windows are not maximized. mdiArea.addSubWindow(new QWidget)->show(); QVERIFY(mdiArea.activeSubWindow()); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort); -#endif QVERIFY(!mdiArea.activeSubWindow()->isMaximized()); } @@ -2023,9 +2005,6 @@ void tst_QMdiArea::delayedPlacement() QVERIFY(QTest::qWaitForWindowExposed(&mdiArea)); QCOMPARE(window1->geometry().topLeft(), QPoint(0, 0)); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(window2->geometry().topLeft(), window1->geometry().topRight() + QPoint(1, 0)); QCOMPARE(window3->geometry().topLeft(), window2->geometry().topRight() + QPoint(1, 0)); } @@ -2160,10 +2139,6 @@ void tst_QMdiArea::updateScrollBars() subWindow1->showNormal(); qApp->processEvents(); QVERIFY(!subWindow1->isMaximized()); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Widgets are maximized by default on WinRT, so scroll bars might not be" - "visible", Abort); -#endif QVERIFY(hbar->style()->styleHint(QStyle::SH_ScrollBar_Transient) || hbar->isVisible()); QVERIFY(vbar->style()->styleHint(QStyle::SH_ScrollBar_Transient) || vbar->isVisible()); if (i == 0) { @@ -2365,10 +2340,6 @@ void tst_QMdiArea::setViewMode() QList<QMdiSubWindow *> subWindows = mdiArea.subWindowList(); // Default. -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Widgets are maximized by default on WinRT, so scroll bars might not be" - "visible", Abort); -#endif QVERIFY(!activeSubWindow->isMaximized()); QTabBar *tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(!tabBar); diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp index dfba506cf9..b2320cb93f 100644 --- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp +++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp @@ -569,9 +569,6 @@ void tst_QMdiSubWindow::emittingOfSignals() } } } -#ifdef Q_OS_WINRT - QEXPECT_FAIL("windowMaximized", "Broken on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(count, 1); window->setParent(nullptr); @@ -598,9 +595,6 @@ void tst_QMdiSubWindow::showShaded() QVERIFY(QTest::qWaitForWindowExposed(&workspace)); QVERIFY(!window->isShaded()); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Windows are maximized per default on WinRt ", Abort); -#endif QVERIFY(!window->isMaximized()); QCOMPARE(window->size(), QSize(300, 300)); @@ -694,10 +688,6 @@ void tst_QMdiSubWindow::showNormal() QCoreApplication::processEvents(); window->showNormal(); QCoreApplication::processEvents(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("showMinimized", "Windows are maximized per default on WinRt ", Abort); - QEXPECT_FAIL("showMaximized", "Windows are maximized per default on WinRt ", Abort); -#endif QCOMPARE(window->geometry(), originalGeometry); } @@ -808,9 +798,6 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove() // Leave resize mode sendMouseRelease(mouseReceiver, mousePosition); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(resizeSpy.count(), expectedGeometryCount); QCOMPARE(window->size(), windowSize + QSize(geometryCount, geometryCount)); } @@ -977,9 +964,6 @@ void tst_QMdiSubWindow::mouseDoubleClick() workspace.show(); window->show(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Windows are maximized per default on WinRt ", Abort); -#endif QVERIFY(!window->isMaximized()); QVERIFY(!window->isShaded()); @@ -1053,9 +1037,6 @@ void tst_QMdiSubWindow::setSystemMenu() QVERIFY(!QApplication::activePopupWidget()); subWindow->showSystemMenu(); QTRY_COMPARE(QApplication::activePopupWidget(), qobject_cast<QWidget *>(systemMenu)); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort); -#endif QTRY_COMPARE(systemMenu->mapToGlobal(QPoint(0, 0)), (globalPopupPos = subWindow->mapToGlobal(subWindow->contentsRect().topLeft())) ); @@ -1279,9 +1260,6 @@ void tst_QMdiSubWindow::restoreFocusOverCreation() QTRY_COMPARE(QApplication::focusWidget(), subWidget2->m_lineEdit1); mdiArea.setActiveSubWindow(subWindow1); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Broken on WinRt - QTBUG-68297", Abort); -#endif QTRY_COMPARE(QApplication::focusWidget(), subWidget1->m_lineEdit2); } @@ -1494,9 +1472,6 @@ void tst_QMdiSubWindow::resizeEvents() QCOMPARE(window->widget()->windowState(), windowState); // Make sure we got as many resize events as expected. -#ifdef Q_OS_WINRT - QEXPECT_FAIL("maximized", "Broken on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(windowResizeEventSpy.count(), expectedWindowResizeEvents); QCOMPARE(widgetResizeEventSpy.count(), expectedWidgetResizeEvents); windowResizeEventSpy.clear(); @@ -1506,10 +1481,6 @@ void tst_QMdiSubWindow::resizeEvents() window->showNormal(); // Check that the window state is correct. -#ifdef Q_OS_WINRT - QEXPECT_FAIL("minimized", "Broken on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("shaded", "Broken on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(window->windowState(), Qt::WindowNoState | Qt::WindowActive); QCOMPARE(window->widget()->windowState(), Qt::WindowNoState); @@ -1776,9 +1747,6 @@ void tst_QMdiSubWindow::fixedMinMaxSize() QCOMPARE(subWindow->maximumSize(), maximumSize); mdiArea.addSubWindow(subWindow); subWindow->show(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Windows are maximized per default on WinRt ", Abort); -#endif QCOMPARE(subWindow->size(), minimumSize); // Calculate the size of a minimized sub window. @@ -2178,9 +2146,6 @@ void tst_QMdiSubWindow::testFullScreenState() subWindow->showFullScreen(); // QMdiSubWindow does not support the fullscreen state. This call // should be equivalent to setVisible(true) (and not showNormal()) QVERIFY(QTest::qWaitForWindowExposed(&mdiArea)); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Windows are maximized per default on WinRt ", Abort); -#endif QCOMPARE(subWindow->size(), QSize(300, 300)); } diff --git a/tests/auto/widgets/widgets/qmenu/BLACKLIST b/tests/auto/widgets/widgets/qmenu/BLACKLIST index 5677172f8e..d4ebf69e82 100644 --- a/tests/auto/widgets/widgets/qmenu/BLACKLIST +++ b/tests/auto/widgets/widgets/qmenu/BLACKLIST @@ -7,7 +7,5 @@ macos macos [tearOff] macos -[activeSubMenuPosition] -winrt [submenuTearOffDontClose] macos # Can't move cursor (QTBUG-76312) diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp index 9ee239aceb..8ce0ea2184 100644 --- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp +++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp @@ -859,9 +859,6 @@ private: void tst_QMenu::activeSubMenuPositionExec() { -#ifdef Q_OS_WINRT - QSKIP("Broken on WinRT - QTBUG-68297"); -#endif SubMenuPositionExecMenu menu; menu.exec(QGuiApplication::primaryScreen()->availableGeometry().center()); } @@ -1099,9 +1096,6 @@ void tst_QMenu::pushButtonPopulateOnAboutToShow() QTimer::singleShot(300, buttonMenu, SLOT(hide())); QTest::mouseClick(&b, Qt::LeftButton, Qt::NoModifier, b.rect().center()); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "WinRT does not support QTest::mouseClick", Abort); -#endif QVERIFY2(!buttonMenu->geometry().intersects(b.geometry()), msgGeometryIntersects(buttonMenu->geometry(), b.geometry())); // note: we're assuming that, if we previously got the desired geometry, we'll get it here too @@ -1211,9 +1205,6 @@ void tst_QMenu::click_while_dismissing_submenu() //this opens the submenu, move two times to emulate user interaction (d->motions > 0 in QMenu) QTest::mouseMove(menuWindow, menu.rect().center() + QPoint(0,2)); QTest::mouseMove(menuWindow, menu.rect().center() + QPoint(1,3), 60); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "WinRT does not support QTest::mouseMove", Abort); -#endif QVERIFY(menuShownSpy.wait()); QVERIFY(sub.isVisible()); QVERIFY(QTest::qWaitForWindowExposed(&sub)); @@ -1312,9 +1303,6 @@ void tst_QMenu::QTBUG47515_widgetActionEnterLeave() QTest::mouseMove(topLevelWindow, w1Center); QVERIFY(w1->isVisible()); QTRY_COMPARE(w1->leave, 0); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "WinRT does not support QTest::mouseMove", Abort); -#endif QTRY_COMPARE(w1->enter, 1); // Check whether leave event is not delivered on mouse move @@ -1360,9 +1348,6 @@ void tst_QMenu::QTBUG8122_widgetActionCrashOnClose() QSKIP("Window activation is not supported"); if (QGuiApplication::platformName() == QLatin1String("cocoa")) QSKIP("See QTBUG-63031"); -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support QTest::mouseMove"); -#endif const QRect availableGeometry = QGuiApplication::primaryScreen()->availableGeometry(); QRect geometry(QPoint(), availableGeometry.size() / 3); @@ -1572,9 +1557,6 @@ void tst_QMenu::QTBUG_56917_wideMenuSize() menu.popup(QPoint()); QVERIFY(QTest::qWaitForWindowExposed(&menu)); QVERIFY(menu.isVisible()); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort); -#endif QVERIFY(menu.height() <= menuSizeHint.height()); } @@ -1711,9 +1693,6 @@ void tst_QMenu::menuSize_Scrolling() const QMargins cm = contentsMargins(); QRect lastItem = actionGeometry(actions().at(actions().length() - 1)); QSize s = size(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort); -#endif if (!QGuiApplication::platformName().compare(QLatin1String("minimal"), Qt::CaseInsensitive) || !QGuiApplication::platformName().compare(QLatin1String("offscreen"), Qt::CaseInsensitive)) { QWARN("Skipping test on minimal/offscreen platforms - QTBUG-73522"); @@ -1789,12 +1768,6 @@ void tst_QMenu::menuSize_Scrolling() return; QTest::keyClick(&menu, Qt::Key_End); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("data8", "Broken on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("data9", "Broken on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("data10", "Broken on WinRT - QTBUG-68297", Abort); - QEXPECT_FAIL("data11", "Broken on WinRT - QTBUG-68297", Abort); -#endif QTRY_COMPARE(menu.actionGeometry(actions.last()).right(), menu.width() - mm.fw - mm.hmargin - leftMargin - 1); QCOMPARE(menu.actionGeometry(actions.last()).bottom(), diff --git a/tests/auto/widgets/widgets/qmenubar/BLACKLIST b/tests/auto/widgets/widgets/qmenubar/BLACKLIST index c9e15e531c..41b440d3d6 100644 --- a/tests/auto/widgets/widgets/qmenubar/BLACKLIST +++ b/tests/auto/widgets/widgets/qmenubar/BLACKLIST @@ -4,5 +4,3 @@ ubuntu-16.04 ubuntu-18.04 [activatedCount] opensuse-42.3 -[QTBUG_65488_hiddenActionTriggered] -winrt diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp index 1638ac846f..39ab5f6ebf 100644 --- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp +++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp @@ -1226,9 +1226,6 @@ void tst_QMenuBar::check_menuPosition() mbItemRect.moveTo(w.menuBar()->mapToGlobal(mbItemRect.topLeft())); QTest::keyClick(&w, Qt::Key_M, Qt::AltModifier ); QVERIFY(menu.isActiveWindow()); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "QTest::keyClick does not work on WinRT.", Abort); -#endif QCOMPARE(menu.pos(), QPoint(mbItemRect.x(), mbItemRect.top() - menu.height())); menu.close(); } @@ -1565,9 +1562,6 @@ void tst_QMenuBar::cornerWidgets() case Qt::TopLeftCorner: QVERIFY2(fileMenuGeometry.left() >= cornerWidgetWidth, msgComparison(fileMenuGeometry.left(), ">=", cornerWidgetWidth)); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort); -#endif QVERIFY2(menuBarWidth - editMenuGeometry.right() < cornerWidgetWidth, msgComparison(menuBarWidth - editMenuGeometry.right(), "<", cornerWidgetWidth)); break; diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp index fa702f8661..2f69518663 100644 --- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp +++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp @@ -1369,9 +1369,6 @@ void tst_QPlainTextEdit::adjustScrollbars() QLatin1String txt("\nabc def ghi jkl mno pqr stu vwx"); ed->setPlainText(txt + txt + txt + txt); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "WinRT does not support setMinimum/MaximumSize", Abort); -#endif QVERIFY(ed->verticalScrollBar()->maximum() > 0); ed->moveCursor(QTextCursor::End); diff --git a/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp b/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp index c491bbb4f6..a1097fa433 100644 --- a/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp +++ b/tests/auto/widgets/widgets/qprogressbar/tst_qprogressbar.cpp @@ -255,9 +255,6 @@ void tst_QProgressBar::setMinMaxRepaint() pbar.repainted = false; pbar.setMinimum(0); QTest::qWait(50); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort); -#endif QTRY_VERIFY(!pbar.repainted); // No repaint when setting maximum to the current maximum diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp index d0ed68c0c8..51eb7d2020 100644 --- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp +++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp @@ -520,7 +520,7 @@ void tst_QPushButton::sizeHint_data() #if !defined(QT_NO_STYLE_FUSION) QTest::newRow("fusion") << QString::fromLatin1("fusion"); #endif -#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) && !defined(QT_NO_STYLE_WINDOWSVISTA) QTest::newRow("windowsvista") << QString::fromLatin1("windowsvista"); #endif } diff --git a/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp b/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp index f4b91265a4..e4a8552365 100644 --- a/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp +++ b/tests/auto/widgets/widgets/qsizegrip/tst_qsizegrip.cpp @@ -97,9 +97,6 @@ void tst_QSizeGrip::hideAndShowOnWindowStateChange_data() void tst_QSizeGrip::hideAndShowOnWindowStateChange() { QFETCH(Qt::WindowType, windowType); -#ifdef Q_OS_WINRT - QSKIP("Broken on WinRT - QTBUG-68297"); -#endif QScopedPointer<QWidget> parentWidget; if (windowType != Qt::Window) @@ -144,9 +141,6 @@ void tst_QSizeGrip::hideAndShowOnWindowStateChange() void tst_QSizeGrip::orientation() { -#ifdef Q_OS_WINRT - QSKIP("Broken on WinRT - QTBUG-68297"); -#endif TestWidget widget; widget.setLayout(new QVBoxLayout); @@ -194,9 +188,6 @@ void tst_QSizeGrip::dontCrashOnTLWChange() // the above setup causes a change of TLW for the size grip, // and it must not crash. -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Broken on WinRT - QTBUG-68297", Abort); -#endif QVERIFY(QTest::qWaitForWindowExposed(&mdiArea)); QVERIFY(QTest::qWaitForWindowExposed(mw.data())); } diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp index a8b47ffc46..9f109ab96c 100644 --- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp +++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp @@ -524,17 +524,13 @@ void tst_QSpinBox::setReadOnly() QTest::keyClick(&spin, Qt::Key_Up); QCOMPARE(spin.value(), 1); spin.setReadOnly(true); -#ifndef Q_OS_WINRT // QTBUG-68297 QCOMPARE(spin.readOnlyChangeEventCount, 1); -#endif QTest::keyClick(&spin, Qt::Key_Up); QCOMPARE(spin.value(), 1); spin.stepBy(1); QCOMPARE(spin.value(), 2); spin.setReadOnly(false); -#ifndef Q_OS_WINRT // QTBUG-68297 QCOMPARE(spin.readOnlyChangeEventCount, 2); -#endif QTest::keyClick(&spin, Qt::Key_Up); QCOMPARE(spin.value(), 3); } diff --git a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp index 332aa7c6d3..aca795ff61 100644 --- a/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp +++ b/tests/auto/widgets/widgets/qsplitter/tst_qsplitter.cpp @@ -783,16 +783,12 @@ void tst_QSplitter::replaceWidget() const int expectedResizeCount = visible ? 1 : 0; // new widget only const int expectedPaintCount = visible && !collapsed ? 2 : 0; // splitter and new widget QTRY_COMPARE(ef.resizeCount, expectedResizeCount); -#ifndef Q_OS_WINRT // QTBUG-68297 QTRY_COMPARE(ef.paintCount, expectedPaintCount); -#endif QCOMPARE(newWidget->parentWidget(), &sp); QCOMPARE(newWidget->isVisible(), visible); if (visible && !collapsed) QCOMPARE(newWidget->geometry(), oldGeom); -#ifndef Q_OS_WINRT // QTBUG-68297 QCOMPARE(newWidget->size().isEmpty(), !visible || collapsed); -#endif delete res; } QCOMPARE(sp.count(), count); @@ -844,9 +840,7 @@ void tst_QSplitter::replaceWidgetWithSplitterChild() QTRY_VERIFY(ef.resizeCount > 0); QTRY_VERIFY(ef.paintCount > 0); QCOMPARE(sp.count(), count + 1); -#ifndef Q_OS_WINRT // QTBUG-68297 QCOMPARE(sp.sizes().mid(0, count), sizes); -#endif QCOMPARE(sp.sizes().last(), sibling->width()); } else { // No-op for the rest diff --git a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp index 256906080e..30fff4e0be 100644 --- a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp +++ b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp @@ -144,9 +144,6 @@ void tst_QStatusBar::setSizeGripEnabled() QTRY_VERIFY(statusBar->isVisible()); QPointer<QSizeGrip> sizeGrip = statusBar->findChild<QSizeGrip *>(); QVERIFY(sizeGrip); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QVERIFY(sizeGrip->isVisible()); statusBar->setSizeGripEnabled(true); diff --git a/tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt b/tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt index 9bd0018082..130cf2422a 100644 --- a/tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt +++ b/tests/auto/widgets/widgets/qtabwidget/CMakeLists.txt @@ -18,7 +18,7 @@ add_qt_test(tst_qtabwidget ## Scopes: ##################################################################### -extend_target(tst_qtabwidget CONDITION WIN32 AND NOT WINRT +extend_target(tst_qtabwidget CONDITION WIN32 PUBLIC_LIBRARIES user32 ) diff --git a/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro b/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro index b61cc8fa13..95c81b952f 100644 --- a/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro +++ b/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro @@ -8,4 +8,4 @@ INCLUDEPATH += ../ HEADERS += SOURCES += tst_qtabwidget.cpp -win32:!winrt: QMAKE_USE += user32 +win32: QMAKE_USE += user32 diff --git a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp index 28b8bfc6b3..25f61ec7ac 100644 --- a/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp +++ b/tests/auto/widgets/widgets/qtabwidget/tst_qtabwidget.cpp @@ -35,7 +35,7 @@ #include <qlabel.h> #include <QtWidgets/qboxlayout.h> -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) # include <qt_windows.h> #define Q_CHECK_PAINTEVENTS \ if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \ diff --git a/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp b/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp index 2496d446d8..7e99177dec 100644 --- a/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp +++ b/tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp @@ -211,9 +211,6 @@ void tst_QTextBrowser::forwardButton() browser->setSource(QUrl(QFINDTESTDATA("pagewithoutbg.html"))); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QVERIFY(!forwardEmissions.isEmpty()); val = forwardEmissions.takeLast()[0]; QCOMPARE(val.type(), QVariant::Bool); @@ -438,9 +435,6 @@ void tst_QTextBrowser::clearHistory() void tst_QTextBrowser::sourceInsideLoadResource() { -#ifdef Q_OS_WINRT - QSKIP("Paths cannot be compared if applications are sandboxed."); -#endif QUrl url = QUrl::fromLocalFile("pagewithimage.html"); // "file://pagewithimage.html" browser->setSource(url); QCOMPARE(browser->lastResource, QUrl::fromLocalFile(QDir::current().filePath("foobar.png"))); diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp index 716e7da490..eaa7251684 100644 --- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp @@ -1716,9 +1716,6 @@ void tst_QTextEdit::adjustScrollbars() QLatin1String txt("\nabc def ghi jkl mno pqr stu vwx"); ed->setText(txt + txt + txt + txt); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "setMinimum/MaximumSize does not work on WinRT", Abort); -#endif QVERIFY(ed->verticalScrollBar()->maximum() > 0); ed->moveCursor(QTextCursor::End); @@ -1902,9 +1899,6 @@ void tst_QTextEdit::copyPasteBackgroundImage() QBrush ba = a->cellAt(0, 0).format().background(); QBrush bb = b->cellAt(0, 0).format().background(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Fails on WinRT - QTBUG-68297", Abort); -#endif QCOMPARE(ba.style(), Qt::TexturePattern); QCOMPARE(ba.style(), bb.style()); diff --git a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp index ed4df2fc23..6111d5b0dd 100644 --- a/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp +++ b/tests/auto/widgets/widgets/qtoolbutton/tst_qtoolbutton.cpp @@ -278,9 +278,6 @@ void tst_QToolButton::qtbug_34759_sizeHintResetWhenSettingMenu() button1.show(); button2.show(); -#ifdef Q_OS_WINRT - QEXPECT_FAIL("", "Winrt does not support more than 1 native top level widget.", Abort); -#endif QVERIFY(QTest::qWaitForWindowExposed(&button1)); QVERIFY(QTest::qWaitForWindowExposed(&button2)); diff --git a/tests/auto/widgets/widgets/widgets.pro b/tests/auto/widgets/widgets/widgets.pro index 66950fa85a..f67fe86606 100644 --- a/tests/auto/widgets/widgets/widgets.pro +++ b/tests/auto/widgets/widgets/widgets.pro @@ -58,4 +58,4 @@ SUBDIRS=\ qtextedit \ qtoolbar \ -!winrt:qtConfig(opengl): SUBDIRS += qopenglwidget +qtConfig(opengl): SUBDIRS += qopenglwidget diff --git a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp index df158cae0f..6375a44983 100644 --- a/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp +++ b/tests/auto/xml/sax/qxmlsimplereader/tst_qxmlsimplereader.cpp @@ -562,9 +562,6 @@ void tst_QXmlSimpleReader::inputFromSocket_data() void tst_QXmlSimpleReader::inputFromSocket() { QFETCH(QString, file_name); -#ifdef Q_OS_WINRT - QSKIP("WinRT does not support connecting to localhost"); -#endif if (!server->threadStarted.tryAcquire(1, 15000)) { // If something is wrong with QThreads, it's not a reason to fail diff --git a/tests/baselineserver/shared/baselineprotocol.cpp b/tests/baselineserver/shared/baselineprotocol.cpp index b7da47de34..c481bf7639 100644 --- a/tests/baselineserver/shared/baselineprotocol.cpp +++ b/tests/baselineserver/shared/baselineprotocol.cpp @@ -66,11 +66,7 @@ const QString PI_PulseTestrBranch(QLS("PulseTestrBranch")); void BaselineProtocol::sysSleep(int ms) { #if defined(Q_OS_WIN) -# ifndef Q_OS_WINRT Sleep(DWORD(ms)); -# else - WaitForSingleObjectEx(GetCurrentThread(), ms, false); -# endif #else struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 }; nanosleep(&ts, NULL); diff --git a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp index 0b831f6625..d1aba9fa5f 100644 --- a/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp +++ b/tests/benchmarks/corelib/io/qdir/10000/bench_qdir_10000.cpp @@ -163,12 +163,7 @@ private slots: wcscat(appendedPath, L"\\*"); WIN32_FIND_DATA fd; -#ifndef Q_OS_WINRT HANDLE hSearch = FindFirstFileW(appendedPath, &fd); -#else - HANDLE hSearch = FindFirstFileEx(appendedPath, FindExInfoStandard, &fd, - FindExSearchNameMatch, NULL, FIND_FIRST_EX_LARGE_FETCH); -#endif QVERIFY(hSearch != INVALID_HANDLE_VALUE); QBENCHMARK { diff --git a/tests/benchmarks/corelib/io/qdiriterator/main.cpp b/tests/benchmarks/corelib/io/qdiriterator/main.cpp index 5b10a4a689..367913338f 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/main.cpp +++ b/tests/benchmarks/corelib/io/qdiriterator/main.cpp @@ -95,12 +95,7 @@ static int posix_helper(const wchar_t *dirpath, size_t length) Q_ASSERT(MAX_PATH > length + 3); wcsncpy(appendedPath, dirpath, length); wcscpy(appendedPath + length, L"\\*"); -#ifndef Q_OS_WINRT hSearch = FindFirstFile(appendedPath, &fd); -#else - hSearch = FindFirstFileEx(appendedPath, FindExInfoStandard, &fd, - FindExSearchNameMatch, NULL, FIND_FIRST_EX_LARGE_FETCH); -#endif if (hSearch == INVALID_HANDLE_VALUE) { qWarning("FindFirstFile failed"); diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp index 6ee8b4e93b..21018920f7 100644 --- a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp +++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp @@ -221,12 +221,7 @@ void QFileSystemIteratorPrivate::pushSubDirectory(const QByteArray &path) const int end = QString::fromLatin1(path + "\\*").toWCharArray(szSearchPath); Q_ASSERT(end < MAX_PATH); szSearchPath[end] = L'\0'; -#ifndef Q_OS_WINRT HANDLE dir = FindFirstFile(szSearchPath, &m_fileSearchResult); -#else - HANDLE dir = FindFirstFileEx(szSearchPath, FindExInfoStandard, &m_fileSearchResult, - FindExSearchLimitToDirectories, NULL, FIND_FIRST_EX_LARGE_FETCH); -#endif m_bFirstSearchResult = true; #else DIR *dir = ::opendir(path.constData()); diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp index 1966b30773..73b3ba8c48 100644 --- a/tests/benchmarks/corelib/io/qfile/main.cpp +++ b/tests/benchmarks/corelib/io/qfile/main.cpp @@ -297,11 +297,7 @@ void tst_qfile::readBigFile() // ensure we don't account string conversion wchar_t* cfilename = (wchar_t*)filename.utf16(); -#ifndef Q_OS_WINRT hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); -#else - hndl = CreateFile2(cfilename, GENERIC_READ, 0, OPEN_EXISTING, 0); -#endif Q_ASSERT(hndl); wchar_t* nativeBuffer = new wchar_t[BUFSIZE]; DWORD numberOfBytesRead; @@ -310,12 +306,7 @@ void tst_qfile::readBigFile() do { ReadFile(hndl, nativeBuffer, blockSize, &numberOfBytesRead, NULL); } while(numberOfBytesRead != 0); -#ifndef Q_OS_WINRT SetFilePointer(hndl, 0, NULL, FILE_BEGIN); -#else - LARGE_INTEGER offset = { 0 }; - SetFilePointerEx(hndl, offset, NULL, FILE_BEGIN); -#endif } delete[] nativeBuffer; CloseHandle(hndl); @@ -396,20 +387,11 @@ void tst_qfile::seek() // ensure we don't account string conversion wchar_t* cfilename = (wchar_t*)filename.utf16(); -#ifndef Q_OS_WINRT hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); -#else - hndl = CreateFile2(cfilename, GENERIC_READ, 0, OPEN_EXISTING, 0); -#endif Q_ASSERT(hndl); QBENCHMARK { i=(i+1)%sp_size; -#ifndef Q_OS_WINRT SetFilePointer(hndl, seekpos[i], NULL, 0); -#else - LARGE_INTEGER offset = { seekpos[i] }; - SetFilePointerEx(hndl, offset, NULL, FILE_BEGIN); -#endif } CloseHandle(hndl); #else @@ -494,11 +476,7 @@ void tst_qfile::open() wchar_t* cfilename = (wchar_t*)filename.utf16(); QBENCHMARK { -#ifndef Q_OS_WINRT hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); -#else - hndl = CreateFile2(cfilename, GENERIC_READ, 0, OPEN_EXISTING, 0); -#endif Q_ASSERT(hndl); CloseHandle(hndl); } @@ -702,11 +680,7 @@ void tst_qfile::readSmallFiles() // ensure we don't account string conversion wchar_t* cfilename = (wchar_t*)filename.utf16(); -#ifndef Q_OS_WINRT hndl = CreateFile(cfilename, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); -#else - hndl = CreateFile2(cfilename, GENERIC_READ, 0, OPEN_EXISTING, 0); -#endif Q_ASSERT(hndl); wchar_t* nativeBuffer = new wchar_t[BUFSIZE]; DWORD numberOfBytesRead; diff --git a/tests/benchmarks/corelib/io/qfileinfo/main.cpp b/tests/benchmarks/corelib/io/qfileinfo/main.cpp index 6cc96777a1..f4c4f815da 100644 --- a/tests/benchmarks/corelib/io/qfileinfo/main.cpp +++ b/tests/benchmarks/corelib/io/qfileinfo/main.cpp @@ -41,7 +41,7 @@ class qfileinfo : public QObject private slots: void existsTemporary(); void existsStatic(); -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) void symLinkTargetPerformanceLNK(); void symLinkTargetPerformanceMounpoint(); #endif @@ -71,7 +71,7 @@ void qfileinfo::existsStatic() QBENCHMARK { QFileInfo::exists(appPath); } } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) void qfileinfo::symLinkTargetPerformanceLNK() { QVERIFY(QFile::link("file","link.lnk")); diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/.prev_CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/.prev_CMakeLists.txt new file mode 100644 index 0000000000..59806127fe --- /dev/null +++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/.prev_CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from testProcessLoopback.pro. + +##################################################################### +## testProcessLoopback Binary: +##################################################################### + +add_qt_executable(testProcessLoopback + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/" + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Gui +) diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt index 44b18a4826..b5a7fe83f5 100644 --- a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt +++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/CMakeLists.txt @@ -4,18 +4,11 @@ ## testProcessLoopback Binary: ##################################################################### -add_qt_benchmark(testProcessLoopback +# add_qt_executable(testProcessLoopback # special case +add_qt_benchmark(testProcessLoopback # special case OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/" SOURCES main.cpp PUBLIC_LIBRARIES Qt::Gui ) - -## Scopes: -##################################################################### - -extend_target(testProcessLoopback CONDITION WINRT - LINK_OPTIONS - "/ENTRY:mainCRTStartup" -) diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro index 1f56ad6ee6..a5fe146e80 100644 --- a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro +++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro @@ -1,7 +1,6 @@ CONFIG += benchmark CONFIG -= qt CONFIG += cmdline -winrt: QMAKE_LFLAGS += /ENTRY:mainCRTStartup SOURCES = main.cpp DESTDIR = ./ diff --git a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp index 751fd9ce7c..b94d6ee619 100644 --- a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp +++ b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp @@ -75,18 +75,12 @@ void NativeMutexUnlock(NativeMutexType *mutex) } #endif #elif defined(Q_OS_WIN) -# ifndef Q_OS_WINRT -# define _WIN32_WINNT 0x0400 -# endif +# define _WIN32_WINNT 0x0400 # include <windows.h> typedef CRITICAL_SECTION NativeMutexType; void NativeMutexInitialize(NativeMutexType *mutex) { -#ifndef Q_OS_WINRT InitializeCriticalSection(mutex); -#else - InitializeCriticalSectionEx(mutex, 0, 0); -#endif } void NativeMutexDestroy(NativeMutexType *mutex) { diff --git a/tests/manual/diaglib/diaglib.pri b/tests/manual/diaglib/diaglib.pri index dd5bfa5330..617e4e72a9 100644 --- a/tests/manual/diaglib/diaglib.pri +++ b/tests/manual/diaglib/diaglib.pri @@ -10,7 +10,7 @@ HEADERS += \ $$PWD/qwindowdump.h \ $$PWD/nativewindowdump.h -win32:!winrt: { +win32: { SOURCES += $$PWD/nativewindowdump_win.cpp QMAKE_USE += user32 } else { diff --git a/tests/manual/embeddedintoforeignwindow/CMakeLists.txt b/tests/manual/embeddedintoforeignwindow/CMakeLists.txt index c07c8dec5d..2de0ff3bfb 100644 --- a/tests/manual/embeddedintoforeignwindow/CMakeLists.txt +++ b/tests/manual/embeddedintoforeignwindow/CMakeLists.txt @@ -28,14 +28,14 @@ add_qt_manual_test(embeddedintoforeignwindow ## Scopes: ##################################################################### -extend_target(embeddedintoforeignwindow CONDITION WIN32 AND NOT WINRT +extend_target(embeddedintoforeignwindow CONDITION WIN32 SOURCES ../diaglib/nativewindowdump_win.cpp PUBLIC_LIBRARIES user32 ) -extend_target(embeddedintoforeignwindow CONDITION UNIX OR WINRT +extend_target(embeddedintoforeignwindow CONDITION UNIX SOURCES ../diaglib/nativewindowdump.cpp ) diff --git a/tests/manual/foreignwindows/CMakeLists.txt b/tests/manual/foreignwindows/CMakeLists.txt index 8fa02ca607..d22636925a 100644 --- a/tests/manual/foreignwindows/CMakeLists.txt +++ b/tests/manual/foreignwindows/CMakeLists.txt @@ -29,14 +29,14 @@ add_qt_manual_test(foreignwindows ## Scopes: ##################################################################### -extend_target(foreignwindows CONDITION WIN32 AND NOT WINRT +extend_target(foreignwindows CONDITION WIN32 SOURCES ../diaglib/nativewindowdump_win.cpp PUBLIC_LIBRARIES user32 ) -extend_target(foreignwindows CONDITION UNIX OR WINRT +extend_target(foreignwindows CONDITION UNIX SOURCES ../diaglib/nativewindowdump.cpp ) diff --git a/tests/shared/filesystem.h b/tests/shared/filesystem.h index 0e7e6ba867..76ebc485ff 100644 --- a/tests/shared/filesystem.h +++ b/tests/shared/filesystem.h @@ -79,7 +79,7 @@ public: return file.isNull() ? qint64(-1) : file->write(relativeFileName.toUtf8()); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) static DWORD createNtfsJunction(QString target, QString linkName, QString *errorMessage) { typedef struct { |