diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-09-30 11:47:40 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-09-30 23:16:18 +0000 |
commit | b5662ba6037cd27cbf276922c376a1192ba7c51e (patch) | |
tree | a85ea5faae6557d9f7d03a7ddd032351932c773d /src | |
parent | 156e3981db60ce65f941867c0f951e9714e5eabf (diff) |
QFileSystemModel: reuse an existing variable
... to improve readability.
The variable 'oldName' was defined one line up from the same
expression as the RHS of the if, so use the variable instead.
Change-Id: Ifcd119317e8c9594f5280f294bc3301f681b94be
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 11b3659990..b27cfa5805 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -873,7 +873,7 @@ bool QFileSystemModel::setData(const QModelIndex &idx, const QVariant &value, in QString newName = value.toString(); QString oldName = idx.data().toString(); - if (newName == idx.data().toString()) + if (newName == oldName) return true; const QString parentPath = filePath(parent(idx)); |