diff options
author | Liang Qi <liang.qi@qt.io> | 2018-09-26 08:56:36 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-09-27 08:18:55 +0000 |
commit | 555a6b5d5d2dd91a0dcf9e3d5fbadd1b31bf80f3 (patch) | |
tree | e0faaad63a8dc4055807a72ecce89cf7dc0d1cb2 /tests | |
parent | 5e64957ee4162ecf4456306a530a68761c2b127f (diff) |
Modernize the "filesystemwatcher" feature
Change-Id: If030b56ad97e047d89d442629262b4839df306d4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/io.pro | 3 | ||||
-rw-r--r-- | tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp | 6 | ||||
-rw-r--r-- | tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp | 4 |
3 files changed, 5 insertions, 8 deletions
diff --git a/tests/auto/corelib/io/io.pro b/tests/auto/corelib/io/io.pro index 5eab944fe4..3c93fd5e1f 100644 --- a/tests/auto/corelib/io/io.pro +++ b/tests/auto/corelib/io/io.pro @@ -55,6 +55,9 @@ SUBDIRS=\ win32:!qtConfig(private_tests): SUBDIRS -= \ qfilesystementry +!qtConfig(filesystemwatcher): SUBDIRS -= \ + qfilesystemwatcher + !qtConfig(processenvironment): SUBDIRS -= \ qprocessenvironment diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index 72cad92edb..67ffa91e57 100644 --- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp +++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp @@ -45,7 +45,6 @@ class tst_QFileSystemWatcher : public QObject public: tst_QFileSystemWatcher(); -#ifndef QT_NO_FILESYSTEMWATCHER private slots: void basicTest_data(); void basicTest(); @@ -77,24 +76,20 @@ private slots: private: QString m_tempDirPattern; -#endif // QT_NO_FILESYSTEMWATCHER }; tst_QFileSystemWatcher::tst_QFileSystemWatcher() { -#ifndef QT_NO_FILESYSTEMWATCHER m_tempDirPattern = QDir::tempPath(); if (!m_tempDirPattern.endsWith(QLatin1Char('/'))) m_tempDirPattern += QLatin1Char('/'); m_tempDirPattern += QStringLiteral("tst_qfilesystemwatcherXXXXXX"); -#endif // QT_NO_FILESYSTEMWATCHER #if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_EMBEDDED) QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)); #endif } -#ifndef QT_NO_FILESYSTEMWATCHER void tst_QFileSystemWatcher::basicTest_data() { QTest::addColumn<QString>("backend"); @@ -805,7 +800,6 @@ void tst_QFileSystemWatcher::watchUnicodeCharacters() QVERIFY(testDir.mkdir("creme")); QTRY_COMPARE(changedSpy.count(), 1); } -#endif // QT_NO_FILESYSTEMWATCHER QTEST_MAIN(tst_QFileSystemWatcher) #include "tst_qfilesystemwatcher.moc" diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index 5301dababc..bd4dc3d6f3 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -2259,7 +2259,7 @@ Q_GLOBAL_STATIC(QLocale, tst_qapp_locale); #if QT_CONFIG(process) Q_GLOBAL_STATIC(QProcess, tst_qapp_process); #endif -#ifndef QT_NO_FILESYSTEMWATCHER +#if QT_CONFIG(filesystemwatcher) Q_GLOBAL_STATIC(QFileSystemWatcher, tst_qapp_fileSystemWatcher); #endif #ifndef QT_NO_SHAREDMEMORY @@ -2284,7 +2284,7 @@ void tst_QApplication::globalStaticObjectDestruction() #if QT_CONFIG(process) QVERIFY(tst_qapp_process()); #endif -#ifndef QT_NO_FILESYSTEMWATCHER +#if QT_CONFIG(filesystemwatcher) QVERIFY(tst_qapp_fileSystemWatcher()); #endif #ifndef QT_NO_SHAREDMEMORY |