From f38e8394eae20f7290688629ab66720ebacd64c9 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 14 Oct 2010 15:21:28 +0200 Subject: Workaround for QFileSystemWatcher regression Don't call removePath() when it was not added before. Reviewed-by: con Task-number: QTBUG-14435 --- tools/designer/src/lib/shared/qtresourcemodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/designer/src/lib/shared/qtresourcemodel.cpp b/tools/designer/src/lib/shared/qtresourcemodel.cpp index 709f389..e3fc805 100644 --- a/tools/designer/src/lib/shared/qtresourcemodel.cpp +++ b/tools/designer/src/lib/shared/qtresourcemodel.cpp @@ -428,10 +428,10 @@ void QtResourceModelPrivate::removeOldPaths(QtResourceSet *resourceSet, const QS void QtResourceModelPrivate::setWatcherEnabled(const QString &path, bool enable) { - m_fileWatcher->removePath(path); - - if (!enable) + if (!enable) { + m_fileWatcher->removePath(path); return; + } QFileInfo fi(path); if (fi.exists()) -- cgit v0.12