diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index f910f8da691c08640d19e12201dec994d4f077e1..19bc92c9448efa9d93837054b63bff789119c31a 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -1877,9 +1877,9 @@ void EditorManager::updateWindowTitle()
         windowTitle.prepend(d->m_titleAddition);
     }
     if (document) {
-        QString editorName = document->displayName();
-        if (!editorName.isEmpty())
-            windowTitle.prepend(editorName + vcsTopic + dashSep);
+        const QString documentName = document->displayName();
+        if (!documentName.isEmpty())
+            windowTitle.prepend(documentName + vcsTopic + dashSep);
         QString filePath = QFileInfo(document->filePath()).absoluteFilePath();
         if (!filePath.isEmpty())
             ICore::mainWindow()->setWindowFilePath(filePath);