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>
bb10
Marc Mutz 2016-09-30 11:47:40 +02:00
parent 156e3981db
commit b5662ba603
1 changed files with 1 additions and 1 deletions

View File

@ -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));