diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-09-02 11:36:14 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-09-02 13:21:57 +0200 |
commit | 60bea1c85a4efa21e34b374ca54b6a3635680acb (patch) | |
tree | 702281f07491a4ba45bcf1a040dc05da02876de9 /src/widgets/dialogs/qfilesystemmodel.cpp | |
parent | 8ce653e048746d65ae46773f555ee8786b10ff68 (diff) |
QFileSystemModel: Fix naming of Option enumeration
Fix an API review finding in 5.14, amending
6b9d319b26da2e4b6f939ee92a176f8604c1c539.
Change-Id: I6c67ebde91021b87a43a86ff831b724f098019aa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/dialogs/qfilesystemmodel.cpp')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 212223359a..e9e49e0c33 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -1267,7 +1267,7 @@ Qt::DropActions QFileSystemModel::supportedDropActions() const \enum QFileSystemModel::Option \since 5.14 - \value DontWatch Do not add file watchers to the paths. + \value DontWatchForChanges Do not add file watchers to the paths. This reduces overhead when using the model for simple tasks like line edit completion. @@ -1331,8 +1331,8 @@ void QFileSystemModel::setOptions(Options options) #if QT_CONFIG(filesystemwatcher) Q_D(QFileSystemModel); - if (changed.testFlag(DontWatch)) - d->fileInfoGatherer.setWatching(!options.testFlag(DontWatch)); + if (changed.testFlag(DontWatchForChanges)) + d->fileInfoGatherer.setWatching(!options.testFlag(DontWatchForChanges)); #endif if (changed.testFlag(DontUseCustomDirectoryIcons)) { @@ -1353,9 +1353,9 @@ QFileSystemModel::Options QFileSystemModel::options() const result.setFlag(DontResolveSymlinks, !resolveSymlinks()); #if QT_CONFIG(filesystemwatcher) Q_D(const QFileSystemModel); - result.setFlag(DontWatch, !d->fileInfoGatherer.isWatching()); + result.setFlag(DontWatchForChanges, !d->fileInfoGatherer.isWatching()); #else - result.setFlag(DontWatch); + result.setFlag(DontWatchForChanges); #endif if (auto provider = iconProvider()) { result.setFlag(DontUseCustomDirectoryIcons, |