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
PIM
Akonadi
Commits
4ee31b72
Commit
4ee31b72
authored
Jul 15, 2021
by
Laurent Montel
😁
Browse files
Make sure that we don't cancel dialog
parent
abcd477b
Pipeline
#70474
passed with stage
in 11 minutes and 2 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/widgets/collectiondialog.cpp
View file @
4ee31b72
...
...
@@ -259,8 +259,10 @@ void CollectionDialog::Private::slotAddChildCollection()
{
const
Akonadi
::
Collection
parentCollection
=
mParent
->
selectedCollection
();
if
(
canCreateCollection
(
parentCollection
))
{
const
QString
name
=
QInputDialog
::
getText
(
mParent
,
i18nc
(
"@title:window"
,
"New Folder"
),
i18nc
(
"@label:textbox, name of a thing"
,
"Name"
));
if
(
name
.
trimmed
().
isEmpty
())
{
bool
ok
=
false
;
const
QString
name
=
QInputDialog
::
getText
(
mParent
,
i18nc
(
"@title:window"
,
"New Folder"
),
i18nc
(
"@label:textbox, name of a thing"
,
"Name"
),
{},
{},
&
ok
);
if
(
name
.
trimmed
().
isEmpty
()
||
!
ok
)
{
return
;
}
...
...
src/widgets/standardactionmanager.cpp
View file @
4ee31b72
...
...
@@ -736,11 +736,15 @@ public:
return
;
}
bool
ok
=
false
;
QString
name
=
QInputDialog
::
getText
(
parentWidget
,
contextText
(
StandardActionManager
::
CreateCollection
,
StandardActionManager
::
DialogTitle
),
contextText
(
StandardActionManager
::
CreateCollection
,
StandardActionManager
::
DialogText
));
contextText
(
StandardActionManager
::
CreateCollection
,
StandardActionManager
::
DialogText
),
{},
{},
&
ok
);
name
=
name
.
trimmed
();
if
(
name
.
isEmpty
())
{
if
(
name
.
isEmpty
()
||
!
ok
)
{
return
;
}
...
...
Write
Preview
Supports
Markdown
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