diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-09-30 11:41:07 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-10-04 07:37:12 +0000 |
commit | d6b6c15d338320a8f9fb3299121c3b338f2b6481 (patch) | |
tree | 5f30da8d8f4932f488b72871ef88838fd477bcde /src/widgets/dialogs | |
parent | c62f71722639c39f210ddbec0c4d832521b3f187 (diff) | |
download | qtbase-d6b6c15d338320a8f9fb3299121c3b338f2b6481.tar.gz |
QFileSystemModel: fix unused variable with QT_NO_FILESYSTEMWATCHER
The QFileInfo 'info' is only used in code conditional on
QT_NO_FILESYSTEMWATCHER, so move the definiton into the
conditionally-compiled block, too.
Turn it into an rvalue while at it.
Change-Id: I9983bfdcd0b32d0abecf7c588973a60df9de8cbc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 441a54bd7d..a4d4230044 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -889,11 +889,10 @@ bool QFileSystemModel::setData(const QModelIndex &idx, const QVariant &value, in parentNode->visibleChildren.removeAt(visibleLocation); QFileSystemModelPrivate::QFileSystemNode * oldValue = parentNode->children.value(oldName); parentNode->children[newName] = oldValue; - QFileInfo info(parentPath, newName); oldValue->fileName = newName; oldValue->parent = parentNode; #ifndef QT_NO_FILESYSTEMWATCHER - oldValue->populate(d->fileInfoGatherer.getInfo(info)); + oldValue->populate(d->fileInfoGatherer.getInfo(QFileInfo(parentPath, newName))); #endif oldValue->isVisible = true; |