Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KDE PIM Add-ons
Commits
48400d2a
Commit
48400d2a
authored
May 15, 2017
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor
parent
d99fb0e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
plugins/messageviewer/bodypartformatter/calendar/memorycalendarmemento.cpp
...ewer/bodypartformatter/calendar/memorycalendarmemento.cpp
+1
-1
plugins/messageviewer/bodypartformatter/calendar/syncitiphandler.cpp
...sageviewer/bodypartformatter/calendar/syncitiphandler.cpp
+2
-1
plugins/messageviewer/bodypartformatter/calendar/text_calendar.cpp
...essageviewer/bodypartformatter/calendar/text_calendar.cpp
+12
-10
No files found.
plugins/messageviewer/bodypartformatter/calendar/memorycalendarmemento.cpp
View file @
48400d2a
...
...
@@ -72,5 +72,5 @@ Akonadi::CalendarBase::Ptr MemoryCalendarMemento::calendar() const
void
MemoryCalendarMemento
::
detach
()
{
disconnect
(
this
,
&
MemoryCalendarMemento
::
update
,
0
,
0
);
disconnect
(
this
,
&
MemoryCalendarMemento
::
update
,
nullptr
,
nullptr
);
}
plugins/messageviewer/bodypartformatter/calendar/syncitiphandler.cpp
View file @
48400d2a
...
...
@@ -35,7 +35,8 @@
using
namespace
Akonadi
;
SyncItipHandler
::
SyncItipHandler
(
const
QString
&
receiver
,
const
QString
&
iCal
,
const
QString
&
type
,
const
Akonadi
::
CalendarBase
::
Ptr
&
calendar
,
QObject
*
parent
)
:
QObject
(
parent
)
SyncItipHandler
::
SyncItipHandler
(
const
QString
&
receiver
,
const
QString
&
iCal
,
const
QString
&
type
,
const
Akonadi
::
CalendarBase
::
Ptr
&
calendar
,
QObject
*
parent
)
:
QObject
(
parent
)
,
m_result
(
Akonadi
::
ITIPHandler
::
ResultSuccess
)
{
Q_ASSERT
(
calendar
);
...
...
plugins/messageviewer/bodypartformatter/calendar/text_calendar.cpp
View file @
48400d2a
...
...
@@ -296,7 +296,7 @@ public:
Attendee
::
Ptr
findMyself
(
const
Incidence
::
Ptr
&
incidence
,
const
QString
&
receiver
)
const
{
Attendee
::
List
attendees
=
incidence
->
attendees
();
const
Attendee
::
List
attendees
=
incidence
->
attendees
();
Attendee
::
List
::
ConstIterator
it
;
Attendee
::
Ptr
myself
;
// Find myself. There will always be all attendees listed, even if
...
...
@@ -317,7 +317,7 @@ public:
static
bool
heuristicalRSVP
(
const
Incidence
::
Ptr
&
incidence
)
{
bool
rsvp
=
true
;
// better send superfluously than not at all
Attendee
::
List
attendees
=
incidence
->
attendees
();
const
Attendee
::
List
attendees
=
incidence
->
attendees
();
Attendee
::
List
::
ConstIterator
it
;
Attendee
::
List
::
ConstIterator
end
(
attendees
.
constEnd
());
for
(
it
=
attendees
.
constBegin
();
it
!=
end
;
++
it
)
{
...
...
@@ -336,7 +336,7 @@ public:
static
Attendee
::
Role
heuristicalRole
(
const
Incidence
::
Ptr
&
incidence
)
{
Attendee
::
Role
role
=
Attendee
::
OptParticipant
;
Attendee
::
List
attendees
=
incidence
->
attendees
();
const
Attendee
::
List
attendees
=
incidence
->
attendees
();
Attendee
::
List
::
ConstIterator
it
;
Attendee
::
List
::
ConstIterator
end
=
attendees
.
constEnd
();
...
...
@@ -715,15 +715,17 @@ public:
// If result is ResultCancelled, then we don't show the message box and return false so kmail
// doesn't delete the e-mail.
qCDebug
(
TEXT_CALENDAR_LOG
)
<<
"ITIPHandler result was "
<<
itipHandler
->
result
();
if
(
itipHandler
->
result
()
==
Akonadi
::
ITIPHandler
::
ResultError
)
{
const
Akonadi
::
ITIPHandler
::
Result
res
=
itipHandler
->
result
();
if
(
res
==
Akonadi
::
ITIPHandler
::
ResultError
)
{
const
QString
errorMessage
=
itipHandler
->
errorMessage
();
if
(
!
errorMessage
.
isEmpty
())
{
qCCritical
(
TEXT_CALENDAR_LOG
)
<<
"Error while processing invitation: "
<<
errorMessage
;
KMessageBox
::
error
(
nullptr
,
errorMessage
);
}
return
false
;
}
return
itipHandler
->
result
()
==
Akonadi
::
ITIPHandler
::
ResultSucces
s
;
return
re
s
;
}
bool
cancelPastInvites
(
const
Incidence
::
Ptr
incidence
,
const
QString
&
path
)
const
...
...
@@ -933,7 +935,7 @@ public:
// find our delegator, we need to inform him as well
QString
delegator
;
if
(
status
!=
Attendee
::
NeedsAction
&&
myself
&&
!
myself
->
delegator
().
isEmpty
())
{
Attendee
::
List
attendees
=
incidence
->
attendees
();
const
Attendee
::
List
attendees
=
incidence
->
attendees
();
Attendee
::
List
::
ConstIterator
end
=
attendees
.
constEnd
();
for
(
Attendee
::
List
::
ConstIterator
it
=
attendees
.
constBegin
();
it
!=
end
;
++
it
)
{
...
...
@@ -1022,7 +1024,7 @@ public:
QDesktopServices
::
openUrl
(
QUrl
(
attachment
->
uri
()));
}
else
{
// put the attachment in a temporary file and launch it
QTemporaryFile
*
file
;
QTemporaryFile
*
file
{
nullptr
}
;
QMimeDatabase
db
;
QStringList
patterns
=
db
.
mimeTypeForName
(
attachment
->
mimeType
()).
globPatterns
();
if
(
!
patterns
.
empty
())
{
...
...
@@ -1059,7 +1061,7 @@ public:
if
(
saveAsFile
.
isEmpty
()
||
(
QFileInfo
::
exists
(
saveAsFile
)
&&
(
KMessageBox
::
warningContinueCancel
(
0
,
nullptr
,
xi18nc
(
"@info"
,
"File <filename>%1</filename> exists.<nl/> Do you want to replace it?"
,
saveAsFile
))
!=
KMessageBox
::
Continue
)))
{
...
...
@@ -1073,7 +1075,7 @@ public:
stat
=
job
->
exec
();
}
else
{
// put the attachment in a temporary file and save it
QTemporaryFile
*
file
;
QTemporaryFile
*
file
{
nullptr
}
;
QMimeDatabase
db
;
QStringList
patterns
=
db
.
mimeTypeForName
(
a
->
mimeType
()).
globPatterns
();
if
(
!
patterns
.
empty
())
{
...
...
@@ -1327,7 +1329,7 @@ public:
QString
summary
;
int
response
=
KMessageBox
::
questionYesNoCancel
(
0
,
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
"
...
...
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