diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp
index f87c1c1e0b2fa1718c9df26de4b791a1d13a8fad..9d9e6114521be02a229250e25d8df1685808bc2e 100644
--- a/src/plugins/coreplugin/editormanager/editorview.cpp
+++ b/src/plugins/coreplugin/editormanager/editorview.cpp
@@ -464,7 +464,6 @@ void EditorView::updateEditorHistory(IEditor *editor)
     if (!file)
         return;
 
-    QString fileName = file->fileName();
     QByteArray state = editor->saveState();
 
     EditLocation location;
@@ -499,7 +498,6 @@ void EditorView::addCurrentPositionToNavigationHistory(IEditor *editor, const QB
     if (!file)
         return;
 
-    QString fileName = file->fileName();
     QByteArray state;
     if (saveState.isNull()) {
         state = editor->saveState();