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
KDE PIM Add-ons
Commits
b806ecc8
Commit
b806ecc8
authored
Oct 17, 2022
by
Laurent Montel
Browse files
Port to KMessageBox::questionTwoActionsCancel
parent
814f38d2
Pipeline
#249429
passed with stage
in 32 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/messageviewer/bodypartformatter/calendar/text_calendar.cpp
View file @
b806ecc8
...
...
@@ -26,6 +26,7 @@
#include
<MessageViewer/Viewer>
#include
<MimeTreeParser/BodyPart>
#include
<MimeTreeParser/MessagePart>
#include
<kwidgetsaddons_version.h>
using
namespace
MessageViewer
;
#include
<KCalendarCore/ICalFormat>
...
...
@@ -1260,20 +1261,28 @@ public:
}
else
if
(
path
==
QLatin1String
(
"record"
))
{
incidence
=
stringToIncidence
(
iCal
);
QString
summary
;
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
int
response
=
KMessageBox
::
questionTwoActionsCancel
(
nullptr
,
#else
int
response
=
KMessageBox
::
questionYesNoCancel
(
nullptr
,
i18nc
(
"@info"
,
"The organizer is not expecting a reply to this invitation "
"but you can send them an email message if you desire.
\n\n
"
"Would you like to send the organizer a message regarding this invitation?
\n
"
"Press the [Cancel] button to cancel the recording operation."
),
i18nc
(
"@title:window"
,
"Send Email to Organizer"
),
KGuiItem
(
i18n
(
"Do Not Send"
)),
KGuiItem
(
i18n
(
"Send EMail"
)));
#endif
i18nc
(
"@info"
,
"The organizer is not expecting a reply to this invitation "
"but you can send them an email message if you desire.
\n\n
"
"Would you like to send the organizer a message regarding this invitation?
\n
"
"Press the [Cancel] button to cancel the recording operation."
),
i18nc
(
"@title:window"
,
"Send Email to Organizer"
),
KGuiItem
(
i18n
(
"Do Not Send"
)),
KGuiItem
(
i18n
(
"Send EMail"
)));
switch
(
response
)
{
case
KMessageBox
::
Cancel
:
break
;
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
case
KMessageBox
::
ButtonCode
::
SecondaryAction
:
{
// means "send email"
#else
case
KMessageBox
::
No
:
{
// means "send email"
#endif
summary
=
incidence
->
summary
();
if
(
!
summary
.
isEmpty
())
{
summary
=
i18n
(
"Re: %1"
,
summary
);
...
...
@@ -1288,7 +1297,11 @@ public:
QDesktopServices
::
openUrl
(
url
);
}
// fall through
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
case
KMessageBox
::
ButtonCode
::
PrimaryAction
:
// means "do not send"
#else
case
KMessageBox
::
Yes
:
// means "do not send"
#endif
if
(
saveFile
(
QStringLiteral
(
"Receiver Not Searched"
),
iCal
,
QStringLiteral
(
"reply"
),
part
))
{
if
(
MessageViewer
::
MessageViewerSettings
::
self
()
->
deleteInvitationEmailsAfterSendingReply
())
{
viewerInstance
->
deleteMessage
();
...
...
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