Commit 36913c70 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Don't save name as empty name

parent aade0828
Pipeline #45052 passed with stage
in 10 minutes and 42 seconds
......@@ -217,8 +217,9 @@ void KDebugSettingsDialog::slotSaveAsGroup()
{
const QString groupPath = LoadGroupMenu::defaultGroupPath();
const QString name = QInputDialog::getText(this, i18n("Group Name"), i18n("Name"));
if (!name.isEmpty()) {
saveRules(groupPath + QLatin1Char('/') + name, true);
const QString trimmedName = name.trimmed();
if (!trimmedName.isEmpty()) {
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