aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlpreview/qmlpreviewapplication.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-11-13 14:22:59 +0100
committerUlf Hermann <ulf.hermann@qt.io>2018-11-14 10:50:55 +0000
commit80d26c15080c92012f0a51f7675d3c70ad56a8bd (patch)
treedc913a0550686c0f8424525990e9fcc325b9f2bc /tools/qmlpreview/qmlpreviewapplication.h
parent1613e32042a8e710c3105b926422827ccaad1c5c (diff)
qmlpreview: Use a better file system watcher
We need to keep watching files even if they are removed and re-added as editors frequently do when manipulating text files. QFileSystemWatcher cannot do this by itself, and our simplistic timeout-based attempt didn't work work properly either. Fixes: QTBUG-71768 Change-Id: I21e914138179ad8adf07f0196fec8ddcda2cbfca Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'tools/qmlpreview/qmlpreviewapplication.h')
-rw-r--r--tools/qmlpreview/qmlpreviewapplication.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/qmlpreview/qmlpreviewapplication.h b/tools/qmlpreview/qmlpreviewapplication.h
index eb363b0eb6..7da4a9ab5c 100644
--- a/tools/qmlpreview/qmlpreviewapplication.h
+++ b/tools/qmlpreview/qmlpreviewapplication.h
@@ -29,13 +29,14 @@
#ifndef QMLPREVIEWAPPLICATION_H
#define QMLPREVIEWAPPLICATION_H
+#include "qmlpreviewfilesystemwatcher.h"
+
#include <private/qqmlpreviewclient_p.h>
#include <private/qqmldebugconnection_p.h>
#include <QtCore/qcoreapplication.h>
#include <QtCore/qprocess.h>
#include <QtCore/qtimer.h>
-#include <QtCore/qfilesystemwatcher.h>
#include <QtNetwork/qabstractsocket.h>
@@ -71,13 +72,11 @@ private:
QScopedPointer<QQmlDebugConnection> m_connection;
QScopedPointer<QQmlPreviewClient> m_qmlPreviewClient;
- QFileSystemWatcher m_watcher;
+ QmlPreviewFileSystemWatcher m_watcher;
QTimer m_loadTimer;
QTimer m_connectTimer;
uint m_connectionAttempts;
-
- QStringList m_pendingFiles;
};
#endif // QMLPREVIEWAPPLICATION_H