Don't detach temporaries

[-Wclazy-detaching-temporary]

Change-Id: I278873fff8592249f0c4519a4e4a6faff2dff6e3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Alessandro Portale
2019-01-30 20:54:57 +01:00
parent e70a7fa6f1
commit 672bee2ed1
5 changed files with 42 additions and 42 deletions

View File

@@ -1621,7 +1621,7 @@ Core::IEditor *VcsBaseEditor::locateEditorByTag(const QString &tag)
foreach (Core::IDocument *document, Core::DocumentModel::openedDocuments()) {
const QVariant tagPropertyValue = document->property(tagPropertyC);
if (tagPropertyValue.type() == QVariant::String && tagPropertyValue.toString() == tag)
return Core::DocumentModel::editorsForDocument(document).first();
return Core::DocumentModel::editorsForDocument(document).constFirst();
}
return nullptr;
}