summaryrefslogtreecommitdiffstats
path: root/src/gui/itemmodels/qfilesystemmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemmodels/qfilesystemmodel.cpp')
-rw-r--r--src/gui/itemmodels/qfilesystemmodel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/itemmodels/qfilesystemmodel.cpp b/src/gui/itemmodels/qfilesystemmodel.cpp
index 2000afc5b2..482b8537d5 100644
--- a/src/gui/itemmodels/qfilesystemmodel.cpp
+++ b/src/gui/itemmodels/qfilesystemmodel.cpp
@@ -2069,12 +2069,15 @@ QStringList QFileSystemModelPrivate::unwatchPathsAt(const QModelIndex &index)
#endif // filesystemwatcher && Q_OS_WIN
QFileSystemModelPrivate::QFileSystemModelPrivate()
+#if QT_CONFIG(filesystemwatcher)
: fileInfoGatherer(new QFileInfoGatherer)
+#endif // filesystemwatcher
{
}
QFileSystemModelPrivate::~QFileSystemModelPrivate()
{
+#if QT_CONFIG(filesystemwatcher)
fileInfoGatherer->requestInterruption();
if (!fileInfoGatherer->wait(1000)) {
// If the thread hangs, perhaps because the network was disconnected
@@ -2085,6 +2088,7 @@ QFileSystemModelPrivate::~QFileSystemModelPrivate()
auto *rawGatherer = fileInfoGatherer.release();
rawGatherer->deleteLater();
}
+#endif // filesystemwatcher
}
/*!