aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmljstools
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2019-01-17 01:54:13 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2019-01-28 11:03:39 +0000
commitf5974ad993863290ff11407b6fbcd025e8e9b9ba (patch)
tree9904b2209196f9bfc69bb873a366fac9dc321734 /src/plugins/qmljstools
parent3fdb5f53e31f615836b8ed13cecb9527ba165e3c (diff)
Fix warning: "Don't call QVector::first() on temporary QList/QVector"
[-Wclazy-detaching-temporary] Change-Id: I23f5cbd80bb92d3f9f1bfb5ae07493818958c5b0 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/qmljstools')
-rw-r--r--src/plugins/qmljstools/qmljsmodelmanager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp
index 53262a880a..d328886f9e 100644
--- a/src/plugins/qmljstools/qmljsmodelmanager.cpp
+++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp
@@ -253,7 +253,7 @@ ModelManagerInterface::WorkingCopy ModelManager::workingCopyInternal() const
const QString key = document->filePath().toString();
if (auto textDocument = qobject_cast<const TextEditor::TextDocument *>(document)) {
// TODO the language should be a property on the document, not the editor
- if (DocumentModel::editorsForDocument(document).first()
+ if (DocumentModel::editorsForDocument(document).constFirst()
->context().contains(ProjectExplorer::Constants::QMLJS_LANGUAGE_ID)) {
workingCopy.insert(key, textDocument->plainText(),
textDocument->document()->revision());