Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Akonadi Mime
Commits
4a6bfb8c
Commit
4a6bfb8c
authored
Oct 15, 2022
by
Laurent Montel
Browse files
Adapt to new api (scripted)
parent
c9e7a176
Pipeline
#248502
passed with stage
in 2 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/markascommand.cpp
View file @
4a6bfb8c
...
...
@@ -15,6 +15,7 @@
#include
<KLocalizedString>
#include
<KMessageBox>
#include
<kwidgetsaddons_version.h>
using
namespace
Akonadi
;
...
...
@@ -117,12 +118,21 @@ void MarkAsCommand::slotFetchDone(KJob *job)
void
MarkAsCommand
::
execute
()
{
if
(
d
->
mRecursive
&&
!
d
->
mFolders
.
isEmpty
())
{
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
if
(
KMessageBox
::
questionTwoActions
(
qobject_cast
<
QWidget
*>
(
parent
()),
#else
if
(
KMessageBox
::
questionYesNo
(
qobject_cast
<
QWidget
*>
(
parent
()),
i18n
(
"Are you sure you want to mark all messages in this folder and all its subfolders?"
),
i18n
(
"Mark All Recursively"
),
KGuiItem
(
i18nc
(
"@action:button"
,
"Mark All"
)),
KStandardGuiItem
::
cancel
())
#endif
i18n
(
"Are you sure you want to mark all messages in this folder and all its subfolders?"
),
i18n
(
"Mark All Recursively"
),
KGuiItem
(
i18nc
(
"@action:button"
,
"Mark All"
)),
KStandardGuiItem
::
cancel
())
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
==
KMessageBox
::
ButtonCode
::
PrimaryAction
)
{
#else
==
KMessageBox
::
Yes
)
{
#endif
auto
job
=
new
Akonadi
::
CollectionFetchJob
(
d
->
mFolders
.
constFirst
());
connect
(
job
,
&
Akonadi
::
CollectionFetchJob
::
result
,
this
,
&
MarkAsCommand
::
slotCollectionFetchDone
);
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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