Commit f1429b4f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Inform that we already use this group name

parent 020db571
......@@ -219,8 +219,12 @@ void KDebugSettingsDialog::slotSaveAsGroup()
const QString name = QInputDialog::getText(this, i18n("Group Name"), i18n("Name"));
const QString trimmedName = name.trimmed();
if (!trimmedName.isEmpty()) {
saveRules(groupPath + QLatin1Char('/') + trimmedName, true);
Q_EMIT updateLoadGroupMenu();
if (mLoadToolButton->groupNames().contains(trimmedName)) {
KMessageBox::error(this, i18n("%1 is already used as a group name.", trimmedName));
} else {
saveRules(groupPath + QLatin1Char('/') + trimmedName, true);
Q_EMIT updateLoadGroupMenu();
}
}
}
......
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