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
parent
156e3981db
commit
b5662ba603
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue