From d4514b63c7297dad8ca6710d71bee4db4431d6dc Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Tue, 27 Dec 2011 18:24:57 +0100 Subject: Remove support for dnotify QFileSystemWatcher. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Bradley T. Hughes --- .../qfilesystemwatcher/tst_qfilesystemwatcher.cpp | 33 +--------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'tests') 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("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); -- cgit v1.2.3