qfilesystemmodel.cpp: Fix building with -no-feature-filesystemwatcher
Fixes: QTBUG-120062 Change-Id: I2d4d0ff06b8088af81330ed0956b86f292c21cac Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 38dbd751640399a7887cf91fed73688df209a38d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 95acccea1ffd175a4b3ffdd364e9628a38e1ec27)
This commit is contained in:
parent
060cb0be9f
commit
57f02a814a
@ -2069,12 +2069,15 @@ QStringList QFileSystemModelPrivate::unwatchPathsAt(const QModelIndex &index)
|
|||||||
#endif // filesystemwatcher && Q_OS_WIN
|
#endif // filesystemwatcher && Q_OS_WIN
|
||||||
|
|
||||||
QFileSystemModelPrivate::QFileSystemModelPrivate()
|
QFileSystemModelPrivate::QFileSystemModelPrivate()
|
||||||
|
#if QT_CONFIG(filesystemwatcher)
|
||||||
: fileInfoGatherer(new QFileInfoGatherer)
|
: fileInfoGatherer(new QFileInfoGatherer)
|
||||||
|
#endif // filesystemwatcher
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QFileSystemModelPrivate::~QFileSystemModelPrivate()
|
QFileSystemModelPrivate::~QFileSystemModelPrivate()
|
||||||
{
|
{
|
||||||
|
#if QT_CONFIG(filesystemwatcher)
|
||||||
fileInfoGatherer->requestInterruption();
|
fileInfoGatherer->requestInterruption();
|
||||||
if (!fileInfoGatherer->wait(1000)) {
|
if (!fileInfoGatherer->wait(1000)) {
|
||||||
// If the thread hangs, perhaps because the network was disconnected
|
// If the thread hangs, perhaps because the network was disconnected
|
||||||
@ -2085,6 +2088,7 @@ QFileSystemModelPrivate::~QFileSystemModelPrivate()
|
|||||||
auto *rawGatherer = fileInfoGatherer.release();
|
auto *rawGatherer = fileInfoGatherer.release();
|
||||||
rawGatherer->deleteLater();
|
rawGatherer->deleteLater();
|
||||||
}
|
}
|
||||||
|
#endif // filesystemwatcher
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user