diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-07-11 15:14:13 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-07-11 16:42:01 +0200 |
commit | 3ef6cf060e984bca43956a23b61b32ec7347cfc7 (patch) | |
tree | 14810e4d0168c0cc3d69cb286574bf28375c07bc /src/corelib/io/qfilesystemwatcher_win_p.h | |
parent | b06304e164ba47351fa292662c1e6383c081b5ca (diff) | |
parent | 7b9d6cf844ece18fef884f51117e25ad4ac31db5 (diff) |
Merge branch 'stable' into dev
Conflicts:
qmake/generators/mac/pbuilder_pbx.cpp
src/corelib/json/qjsonwriter.cpp
src/corelib/kernel/qeventdispatcher_blackberry.cpp
src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher_win_p.h')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_win_p.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_win_p.h b/src/corelib/io/qfilesystemwatcher_win_p.h index 8937910d10..790fb954d9 100644 --- a/src/corelib/io/qfilesystemwatcher_win_p.h +++ b/src/corelib/io/qfilesystemwatcher_win_p.h @@ -128,11 +128,27 @@ private: }; +class QFileSystemWatcherPathKey : public QString +{ +public: + QFileSystemWatcherPathKey() {} + explicit QFileSystemWatcherPathKey(const QString &other) : QString(other) {} + QFileSystemWatcherPathKey(const QFileSystemWatcherPathKey &other) : QString(other) {} + bool operator==(const QFileSystemWatcherPathKey &other) const { return !compare(other, Qt::CaseInsensitive); } +}; + +Q_DECLARE_TYPEINFO(QFileSystemWatcherPathKey, Q_MOVABLE_TYPE); + +inline uint qHash(const QFileSystemWatcherPathKey &key) { return qHash(key.toCaseFolded()); } + class QWindowsFileSystemWatcherEngineThread : public QThread { Q_OBJECT public: + typedef QHash<QFileSystemWatcherPathKey, QWindowsFileSystemWatcherEngine::Handle> HandleForDirHash; + typedef QHash<QFileSystemWatcherPathKey, QWindowsFileSystemWatcherEngine::PathInfo> PathInfoHash; + QWindowsFileSystemWatcherEngineThread(); ~QWindowsFileSystemWatcherEngineThread(); void run(); @@ -143,9 +159,9 @@ public: QVector<Qt::HANDLE> handles; int msg; - QHash<QString, QWindowsFileSystemWatcherEngine::Handle> handleForDir; + HandleForDirHash handleForDir; - QHash<Qt::HANDLE, QHash<QString, QWindowsFileSystemWatcherEngine::PathInfo> > pathInfoForHandle; + QHash<Qt::HANDLE, PathInfoHash> pathInfoForHandle; Q_SIGNALS: void fileChanged(const QString &path, bool removed); |