diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-03-08 15:51:15 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-04-07 10:24:45 +0000 |
commit | 115d4fc8cc1816d70f41c839d7eaa4e24ff86db2 (patch) | |
tree | a79244d8bb42aa7cd675cd6748c737e2559311c0 /tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | |
parent | 4cb795cbdbc4d117c9de623b086975ebdf1f9a15 (diff) | |
download | qtbase-115d4fc8cc1816d70f41c839d7eaa4e24ff86db2.tar.gz |
QtWidgets: Remove Windows CE.
Remove Windows CE-specific files, #ifdef sections for Q_OS_WINCE and wince
.pro file clauses in library, examples and tests.
Task-number: QTBUG-51673
Change-Id: I102745aaca9d9737f2108fe7618111743d5ae980
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index b7e8cded7a..2a03070139 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -52,10 +52,6 @@ #include <QtWidgets/private/qapplication_p.h> #include <QtWidgets/QStyle> -#ifdef Q_OS_WINCE -#include <windows.h> -#endif - #include <qpa/qwindowsysteminterface.h> #include <private/qhighdpiscaling_p.h> @@ -235,10 +231,6 @@ static char *argv0; tst_QApplication::tst_QApplication() : quitApplicationTriggered(false) { -#ifdef Q_OS_WINCE - // Clean up environment previously to launching test - qputenv("QT_PLUGIN_PATH", QByteArray()); -#endif } void tst_QApplication::cleanup() @@ -897,19 +889,8 @@ bool isPathListIncluded(const QStringList &l, const QStringList &r) #define QT_TST_QAPP_DEBUG void tst_QApplication::libraryPaths() { -#ifndef Q_OS_WINCE const QString testDir = QFileInfo(QFINDTESTDATA("test/test.pro")).absolutePath(); QVERIFY(!testDir.isEmpty()); -#else // !Q_OS_WINCE - // On Windows CE we need QApplication object to have valid - // current Path. Therefore we need to identify it ourselves - // here for the test. - QFileInfo filePath; - wchar_t module_name[MAX_PATH]; - GetModuleFileName(0, module_name, MAX_PATH); - filePath = QString::fromWCharArray(module_name); - const QString testDir = filePath.path() + "/test"; -#endif // Q_OS_WINCE { QApplication::setLibraryPaths(QStringList() << testDir); QCOMPARE(QApplication::libraryPaths(), (QStringList() << testDir)); @@ -1000,11 +981,7 @@ void tst_QApplication::libraryPaths() QString appDirPath = app.applicationDirPath(); app.addLibraryPath(appDirPath); -#ifdef Q_OS_WINCE - app.addLibraryPath(appDirPath + "/../.."); -#else app.addLibraryPath(appDirPath + "/.."); -#endif #ifdef QT_TST_QAPP_DEBUG qDebug() << "appDirPath" << appDirPath; qDebug() << "After adding appDirPath && appDirPath + /..:" << app.libraryPaths(); @@ -1044,15 +1021,9 @@ void tst_QApplication::libraryPaths_qt_plugin_path_2() QByteArray nonExistentPath = "/nonexistent"; QByteArray pluginPath = validPath + ':' + nonExistentPath; #elif defined(Q_OS_WIN) -# ifdef Q_OS_WINCE - QByteArray validPath = "/Temp"; - QByteArray nonExistentPath = "/nonexistent"; - QByteArray pluginPath = validPath + ';' + nonExistentPath; -# else QByteArray validPath = "C:\\windows"; QByteArray nonExistentPath = "Z:\\nonexistent"; QByteArray pluginPath = validPath + ';' + nonExistentPath; -# endif #endif { @@ -1069,9 +1040,7 @@ void tst_QApplication::libraryPaths_qt_plugin_path_2() << QLibraryInfo::location(QLibraryInfo::PluginsPath) << QDir(app.applicationDirPath()).canonicalPath() << QDir(QDir::fromNativeSeparators(QString::fromLatin1(validPath))).canonicalPath(); -# ifdef Q_OS_WINCE - expected = QSet<QString>::fromList(expected).toList(); -# endif + QVERIFY2(isPathListIncluded(app.libraryPaths(), expected), qPrintable("actual:\n - " + app.libraryPaths().join("\n - ") + "\nexpected:\n - " + expected.join("\n - "))); @@ -1091,9 +1060,6 @@ void tst_QApplication::libraryPaths_qt_plugin_path_2() QStringList() << QLibraryInfo::location(QLibraryInfo::PluginsPath) << app.applicationDirPath(); -# ifdef Q_OS_WINCE - expected = QSet<QString>::fromList(expected).toList(); -# endif QVERIFY(isPathListIncluded(app.libraryPaths(), expected)); qputenv("QT_PLUGIN_PATH", QByteArray()); @@ -1479,10 +1445,6 @@ void tst_QApplication::desktopSettingsAware() } QVERIFY2(!path.isEmpty(), "Cannot locate desktopsettingsaware helper application"); path += "desktopsettingsaware"; -#ifdef Q_OS_WINCE - int argc = 0; - QApplication tmpApp(argc, 0); -#endif QProcess testProcess; testProcess.start(path); QVERIFY2(testProcess.waitForStarted(), |