summaryrefslogtreecommitdiffstats
path: root/src/gui/itemmodels/qfilesystemmodel.cpp
diff options
context:
space:
mode:
authorNodir Temirkhodjaev <nodir.temir@gmail.com>2023-12-18 13:26:42 +0300
committerNodir Temirkhodjaev <nodir.temir@gmail.com>2023-12-19 18:41:29 +0000
commit38dbd751640399a7887cf91fed73688df209a38d (patch)
tree071b08619f07fd541943d4440717c8b21fb577c4 /src/gui/itemmodels/qfilesystemmodel.cpp
parent46588fbb516b980f0f6b11ce814ecf15d71967d3 (diff)
qfilesystemmodel.cpp: Fix building with -no-feature-filesystemwatcher
Pick-to: 6.7 6.6 Fixes: QTBUG-120062 Change-Id: I2d4d0ff06b8088af81330ed0956b86f292c21cac Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
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
}
/*!