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>
This commit is contained in:
parent
46588fbb51
commit
38dbd75164
@ -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
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
x
Reference in New Issue
Block a user