Commit 9e1b111a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add message error when we can't save as empty name

parent fc8de29b
Pipeline #54536 failed with stage
in 8 minutes and 39 seconds
......@@ -206,7 +206,7 @@ void KDebugSettingsDialog::slotInsertCategories()
void KDebugSettingsDialog::slotSaveAsGroup()
{
const QString groupPath = LoadGroupMenu::defaultWritableGroupPath();
const QString name = QInputDialog::getText(this, i18n("Group Name"), i18n("Name"));
const QString name = QInputDialog::getText(this, i18n("Group Name"), i18n("Name:"));
const QString trimmedName = name.trimmed();
if (!trimmedName.isEmpty()) {
if (mLoadToolButton->groupNames().contains(trimmedName)) {
......@@ -215,6 +215,8 @@ void KDebugSettingsDialog::slotSaveAsGroup()
saveRules(groupPath + QLatin1Char('/') + trimmedName, true);
Q_EMIT updateLoadGroupMenu();
}
} else {
KMessageBox::error(this, i18n("Can not save as empty name. Please use a new one."));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment