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 <david.schulz@theqtcompany.com>
This commit is contained in:
Eike Ziller
2016-04-06 17:32:03 +02:00
parent 25919d9020
commit afbfe18e67
2 changed files with 6 additions and 2 deletions

View File

@@ -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"));
}
}

View File

@@ -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()));