diff options
author | Riccardo Ferrazzo <rferrazz@develer.com> | 2013-08-29 12:36:34 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 09:13:57 +0200 |
commit | 31db8728cf038f0a38c42d64c375403fde8598c9 (patch) | |
tree | d90706ae06b54e08f18313962f2ac6f2803e65f6 /src/corelib/io/qfilesystemwatcher_inotify_p.h | |
parent | 73b88fccedfe3912649d119bedf8490ab6c41812 (diff) |
Fix QFileSystemWatcher inotify
On linux using QFileSystemWatcher with inotify backend when a watched
file is moved and added again to the watched files its path is not
replaced with the new one. This behavior prevents the emission of
the fileChanged signal with the wrong file path.
Task-number: QTBUG-33211
Change-Id: Ib45d8efdf5afbf8b8f6b4b26e43f3d6ee740aca6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher_inotify_p.h')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_inotify_p.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_inotify_p.h b/src/corelib/io/qfilesystemwatcher_inotify_p.h index 959d9edc12..d02f04eed6 100644 --- a/src/corelib/io/qfilesystemwatcher_inotify_p.h +++ b/src/corelib/io/qfilesystemwatcher_inotify_p.h @@ -79,10 +79,13 @@ private Q_SLOTS: void readFromInotify(); private: + QString getPathFromID(int id) const; + +private: QInotifyFileSystemWatcherEngine(int fd, QObject *parent); int inotifyFd; QHash<QString, int> pathToID; - QHash<int, QString> idToPath; + QMultiHash<int, QString> idToPath; QSocketNotifier notifier; }; |