From afbfe18e6754f43d9aa1b2165fd4d2b0e69d7b18 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 6 Apr 2016 17:32:03 +0200 Subject: [PATCH] EditorManager: Reset save/save as/revert action texts The old file name was still hanging around after all files were closed. Also reduce number of translated strings. Task-number: QTCREATORBUG-14800 Change-Id: I437072be0f7dcd26f55a7895d20cf8fe6e3cd8b5 Reviewed-by: David Schulz --- src/plugins/coreplugin/editormanager/editormanager.cpp | 4 ++++ src/plugins/coreplugin/mainwindow.cpp | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 3a09911e7bf..994da5f9e0a 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1536,6 +1536,10 @@ void EditorManagerPrivate::setupSaveActions(IDocument *document, QAction *saveAc revertToSavedAction->setText(document->isModified() ? tr("Revert %1 to Saved").arg(quotedName) : tr("Reload %1").arg(quotedName)); + } else { + saveAction->setText(EditorManager::tr("&Save")); + saveAsAction->setText(EditorManager::tr("Save &As...")); + revertToSavedAction->setText(EditorManager::tr("Revert to Saved")); } } diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 374cb87da1f..347bf72226a 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -538,7 +538,7 @@ void MainWindow::registerDefaultActions() // Save Action icon = QIcon::fromTheme(QLatin1String("document-save"), Icons::SAVEFILE.icon()); - QAction *tmpaction = new QAction(icon, tr("&Save"), this); + QAction *tmpaction = new QAction(icon, EditorManager::tr("&Save"), this); tmpaction->setEnabled(false); cmd = ActionManager::registerAction(tmpaction, Constants::SAVE); cmd->setDefaultKeySequence(QKeySequence::Save); @@ -548,7 +548,7 @@ void MainWindow::registerDefaultActions() // Save As Action icon = QIcon::fromTheme(QLatin1String("document-save-as")); - tmpaction = new QAction(icon, tr("Save &As..."), this); + tmpaction = new QAction(icon, EditorManager::tr("Save &As..."), this); tmpaction->setEnabled(false); cmd = ActionManager::registerAction(tmpaction, Constants::SAVEAS); cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Ctrl+Shift+S") : QString()));