diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index f1db1acbda1..e7ff06cff02 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1662,7 +1662,7 @@ bool EditorManagerPrivate::saveDocument(IDocument *document) document->checkPermissions(); - const QString &fileName = document->filePath().toString(); + const QString fileName = document->filePath().toString(); if (fileName.isEmpty()) return saveDocumentAs(document); diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index 022d99a99ed..0d4b91048a4 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -490,7 +490,7 @@ QStringList SessionManagerPrivate::dependenciesOrder() const // copy the map to a temporary list foreach (Project *pro, m_projects) { - const QString &proName = pro->projectFilePath().toString(); + const QString proName = pro->projectFilePath().toString(); unordered << QPair(proName, m_depMap.value(proName)); } diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index ee5ad4f5a26..342eceb8ed1 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -7201,7 +7201,7 @@ void TextEditorWidget::configureGenericHighlighter() setCodeFoldingSupported(true); } } else { - const QString &fileName = textDocument()->filePath().toString(); + const QString fileName = textDocument()->filePath().toString(); if (TextEditorSettings::highlighterSettings().isIgnoredFilePattern(fileName)) d->m_isMissingSyntaxDefinition = false; }