summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@collabora.com>2011-12-27 18:24:57 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-02 18:19:36 +0100
commitd4514b63c7297dad8ca6710d71bee4db4431d6dc (patch)
treea6c3ac34fc09b52df495d31889d7af3c5ab81115 /tests
parent9fbfddfe8afe7a73b1136f20211da7274217b9e1 (diff)
Remove support for dnotify QFileSystemWatcher.
Inotify has been available in Linux for some ~6 years now, 7 when Qt 5 will actually be released, so I'd say it's safe to remove this fallback path now, particularly as the autotest notes that it's broken. Change-Id: I49dbb161d4765d63e92f512a6375323c7d37ccbe Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp33
1 files changed, 1 insertions, 32 deletions
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 0e7172143b..bc2b1940b9 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -56,9 +56,6 @@ class tst_QFileSystemWatcher : public QObject
{
Q_OBJECT
-public:
- tst_QFileSystemWatcher();
-
private slots:
void basicTest_data();
void basicTest();
@@ -81,37 +78,12 @@ private slots:
void cleanup();
void destroyAfterQCoreApplication();
-private:
- QStringList do_force_engines;
- bool do_force_native;
};
-tst_QFileSystemWatcher::tst_QFileSystemWatcher()
- : do_force_native(false)
-{
-#ifdef Q_OS_LINUX
- // the inotify implementation in the kernel is known to be buggy in certain versions of the linux kernel
- do_force_engines << "native";
- do_force_engines << "dnotify";
-
-#ifdef QT_NO_INOTIFY
- if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13))
- do_force_engines << "inotify";
-#else
- if (inotify_init() != -1)
- do_force_engines << "inotify";
-#endif
-#elif defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_FREEBSD)
- // we have native engines for win32, macosx and freebsd
- do_force_engines << "native";
-#endif
-}
-
void tst_QFileSystemWatcher::basicTest_data()
{
QTest::addColumn<QString>("backend");
- foreach(QString engine, do_force_engines)
- QTest::newRow(engine.toLatin1().constData()) << engine;
+ QTest::newRow("native") << "native";
QTest::newRow("poller") << "poller";
}
@@ -438,9 +410,6 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
//sequence of changes will always generate this signal.
QVERIFY(dirChangedSpy.count() < 2);
- if (backend == "dnotify")
- QSKIP("dnotify is broken, skipping the rest of the test.");
-
fileChangedSpy.clear();
dirChangedSpy.clear();
QFile secondFile(secondFileName);