Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
KDebugSettings
Commits
9e1b111a
Commit
9e1b111a
authored
Mar 16, 2021
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/kdebugsettingsdialog.cpp
View file @
9e1b111a
...
...
@@ -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."
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment