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>
This commit is contained in:
parent
c62f717226
commit
d6b6c15d33
@ -889,11 +889,10 @@ bool QFileSystemModel::setData(const QModelIndex &idx, const QVariant &value, in
|
|||||||
parentNode->visibleChildren.removeAt(visibleLocation);
|
parentNode->visibleChildren.removeAt(visibleLocation);
|
||||||
QFileSystemModelPrivate::QFileSystemNode * oldValue = parentNode->children.value(oldName);
|
QFileSystemModelPrivate::QFileSystemNode * oldValue = parentNode->children.value(oldName);
|
||||||
parentNode->children[newName] = oldValue;
|
parentNode->children[newName] = oldValue;
|
||||||
QFileInfo info(parentPath, newName);
|
|
||||||
oldValue->fileName = newName;
|
oldValue->fileName = newName;
|
||||||
oldValue->parent = parentNode;
|
oldValue->parent = parentNode;
|
||||||
#ifndef QT_NO_FILESYSTEMWATCHER
|
#ifndef QT_NO_FILESYSTEMWATCHER
|
||||||
oldValue->populate(d->fileInfoGatherer.getInfo(info));
|
oldValue->populate(d->fileInfoGatherer.getInfo(QFileInfo(parentPath, newName)));
|
||||||
#endif
|
#endif
|
||||||
oldValue->isVisible = true;
|
oldValue->isVisible = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user