Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
4.6.0
-
None
-
$ uname -a
Linux Ain 2.6.26 #1 SMP Wed Nov 26 06:10:27 CET 2008 i686 GNU/Linux$ qmake -version
QMake version 2.01a
Using Qt version 4.6.0 in /usr/lib
Description
On Linux, QFileSystemWatcher will use inotify if available. However, inotify doesn't support notifications for changes to files on network mounts (for instance, an NFS mounted directory).
QFileSystemWatcher contains a polling engine, which would solve this problem. However, there is no public API to force QFileSystemWatcher to use its polling engine, nor does it auto-detect whether a file is on an NFS share or not.
The ideal solution would be for Qt to detect whether a file is "supported" by inotify and fall back on its polling engine only for non-supported file locations. I don't know whether that's possible however. Another solution would be to provide a public API to force the use of the poller engine.
Note: you can force QFileSystemWatcher to use the poller engine using watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_poller"));, but this is not in the public API so it may break with future releases (works with 4.6.0).