| 1662 | } |
| 1663 | |
| 1664 | void MainWindow::updateSaveStatusBasedUi(ScintillaNext *editor) |
| 1665 | { |
| 1666 | qInfo(Q_FUNC_INFO); |
| 1667 | |
| 1668 | bool isDirty = !editor->isSavedToDisk(); |
| 1669 | |
| 1670 | setWindowModified(isDirty); |
| 1671 | |
| 1672 | ui->actionSave->setEnabled(isDirty); |
| 1673 | ui->actionSaveAll->setEnabled(isDirty || isAnyUnsaved()); |
| 1674 | |
| 1675 | if (editorCount() == 1) { |
| 1676 | bool ableToClose = editor->isFile() || isDirty; |
| 1677 | ui->actionClose->setEnabled(ableToClose); |
| 1678 | ui->actionCloseAll->setEnabled(ableToClose); |
| 1679 | } |
| 1680 | else { |
| 1681 | ui->actionClose->setEnabled(true); |
| 1682 | ui->actionCloseAll->setEnabled(true); |
| 1683 | } |
| 1684 | } |
| 1685 | |
| 1686 | void MainWindow::updateEditorPositionBasedUi() |
| 1687 | { |
nothing calls this directly
no test coverage detected