| 1694 | } |
| 1695 | |
| 1696 | void MainWindow::updateLanguageBasedUi(ScintillaNext *editor) |
| 1697 | { |
| 1698 | qInfo(Q_FUNC_INFO); |
| 1699 | |
| 1700 | const QString language_name = editor->languageName; |
| 1701 | |
| 1702 | for (QAction *action : languageActionGroup->actions()) { |
| 1703 | if (action->data().toString() == language_name) { |
| 1704 | action->setChecked(true); |
| 1705 | |
| 1706 | // Found one, so we are completely done |
| 1707 | return; |
| 1708 | } |
| 1709 | } |
| 1710 | |
| 1711 | // The above loop did not set any action as checked, so make sure they are all unchecked now |
| 1712 | for (QAction *action : languageActionGroup->actions()) { |
| 1713 | if (action->isChecked()) { |
| 1714 | action->setChecked(false); |
| 1715 | } |
| 1716 | } |
| 1717 | } |
| 1718 | |
| 1719 | void MainWindow::updateGui(ScintillaNext *editor) |
| 1720 | { |