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
PIM IncidenceEditor
Commits
587898fa
Commit
587898fa
authored
Oct 18, 2022
by
Laurent Montel
Browse files
Make compile without deprecated methods
parent
8281eef0
Pipeline
#249899
passed with stage
in 8 minutes and 58 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/incidenceattendee.cpp
View file @
587898fa
...
...
@@ -213,7 +213,11 @@ void IncidenceAttendee::save(const KCalendarCore::Incidence::Ptr &incidence)
i18nc
(
"@title:window"
,
"Invalid Email Address"
),
KGuiItem
(
i18nc
(
"@action:button"
,
"Invite"
),
QStringLiteral
(
"dialog-ok"
)),
KGuiItem
(
i18nc
(
"@action:button"
,
"Do Not Invite"
),
QStringLiteral
(
"dialog-cancel"
)))
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
!=
KMessageBox
::
ButtonCode
::
PrimaryAction
)
{
#else
!=
KMessageBox
::
Yes
)
{
#endif
skip
=
true
;
}
}
...
...
@@ -793,7 +797,11 @@ void IncidenceAttendee::slotOrganizerChanged(const QString &newOrganizer)
KGuiItem
(
i18nc
(
"@action:button"
,
"Change Attendee"
),
QStringLiteral
(
"dialog-ok"
)),
KGuiItem
(
i18nc
(
"@action:button"
,
"Do Not Change"
),
QStringLiteral
(
"dialog-cancel"
)));
}
else
{
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
answer
=
KMessageBox
::
ButtonCode
::
PrimaryAction
;
#else
answer
=
KMessageBox
::
Yes
;
#endif
}
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
...
...
src/individualmailcomponentfactory.cpp
View file @
587898fa
...
...
@@ -11,6 +11,7 @@
#include
<CalendarSupport/KCalPrefs>
#include
<KMessageBox>
#include
<kwidgetsaddons_version.h>
#include
<QDBusConnection>
#include
<QDBusConnectionInterface>
...
...
@@ -156,19 +157,35 @@ void IndividualMailITIPHandlerDialogDelegate::openDialog(const QString &question
switch
(
action
)
{
case
ActionSendMessage
:
Q_EMIT
setUpdate
(
mIncidence
,
attendees
);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
Q_EMIT
dialogClosed
(
KMessageBox
::
ButtonCode
::
PrimaryAction
,
mMethod
,
mIncidence
);
#else
Q_EMIT
dialogClosed
(
KMessageBox
::
Yes
,
mMethod
,
mIncidence
);
#endif
break
;
case
ActionDontSendMessage
:
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
Q_EMIT
dialogClosed
(
KMessageBox
::
ButtonCode
::
SecondaryAction
,
mMethod
,
mIncidence
);
#else
Q_EMIT
dialogClosed
(
KMessageBox
::
No
,
mMethod
,
mIncidence
);
#endif
break
;
default:
switch
(
CalendarSupport
::
KCalPrefs
::
instance
()
->
sendPolicy
())
{
case
(
CalendarSupport
::
KCalPrefs
::
InvitationPolicySend
):
Q_EMIT
setUpdate
(
mIncidence
,
attendees
);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
Q_EMIT
dialogClosed
(
KMessageBox
::
ButtonCode
::
PrimaryAction
,
mMethod
,
mIncidence
);
#else
Q_EMIT
dialogClosed
(
KMessageBox
::
Yes
,
mMethod
,
mIncidence
);
#endif
break
;
case
(
CalendarSupport
::
KCalPrefs
::
InvitationPolicyDontSend
):
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
Q_EMIT
dialogClosed
(
KMessageBox
::
ButtonCode
::
SecondaryAction
,
mMethod
,
mIncidence
);
#else
Q_EMIT
dialogClosed
(
KMessageBox
::
No
,
mMethod
,
mIncidence
);
#endif
break
;
case
(
CalendarSupport
::
KCalPrefs
::
InvitationPolicyAsk
):
default:
...
...
@@ -230,9 +247,17 @@ void IndividualMailITIPHandlerDialogDelegate::onDialogClosed(int result)
if
(
result
==
QDialogButtonBox
::
Yes
)
{
Q_EMIT
setEdit
(
mIncidence
,
mDialog
->
editAttendees
());
Q_EMIT
setUpdate
(
mIncidence
,
mDialog
->
updateAttendees
());
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
Q_EMIT
dialogClosed
(
KMessageBox
::
ButtonCode
::
PrimaryAction
,
mMethod
,
mIncidence
);
#else
Q_EMIT
dialogClosed
(
KMessageBox
::
Yes
,
mMethod
,
mIncidence
);
#endif
}
else
{
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
Q_EMIT
dialogClosed
(
KMessageBox
::
ButtonCode
::
SecondaryAction
,
mMethod
,
mIncidence
);
#else
Q_EMIT
dialogClosed
(
KMessageBox
::
No
,
mMethod
,
mIncidence
);
#endif
}
}
...
...
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