forked from qt-creator/qt-creator
Disable "Save All" when there are no documents to be saved
Fixes: QTCREATORBUG-22072 Change-Id: I6c84e0004d1ada27bfcec59f509d066f1b03ca2c Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -549,11 +549,7 @@ void MainWindow::registerDefaultActions()
|
||||
mfile->addAction(cmd, Constants::G_FILE_SAVE);
|
||||
|
||||
// SaveAll Action
|
||||
m_saveAllAction = new QAction(tr("Save A&ll"), this);
|
||||
cmd = ActionManager::registerAction(m_saveAllAction, Constants::SAVEALL);
|
||||
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? QString() : tr("Ctrl+Shift+S")));
|
||||
mfile->addAction(cmd, Constants::G_FILE_SAVE);
|
||||
connect(m_saveAllAction, &QAction::triggered, this, &MainWindow::saveAll);
|
||||
DocumentManager::registerSaveAllAction();
|
||||
|
||||
// Print Action
|
||||
icon = QIcon::fromTheme(QLatin1String("document-print"));
|
||||
@@ -897,11 +893,6 @@ void MainWindow::setFocusToEditor()
|
||||
EditorManagerPrivate::doEscapeKeyFocusMoveMagic();
|
||||
}
|
||||
|
||||
void MainWindow::saveAll()
|
||||
{
|
||||
DocumentManager::saveAllModifiedDocumentsSilently();
|
||||
}
|
||||
|
||||
void MainWindow::exit()
|
||||
{
|
||||
// this function is most likely called from a user action
|
||||
|
||||
Reference in New Issue
Block a user