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 Runtime
Commits
34d38977
Commit
34d38977
authored
Aug 16, 2020
by
Shashwat Jolly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix collection names - journal uid instead of name
parent
f3b1329d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
resources/etesync/calendartaskbasehandler.cpp
resources/etesync/calendartaskbasehandler.cpp
+2
-0
resources/etesync/etesyncresource.cpp
resources/etesync/etesyncresource.cpp
+6
-2
No files found.
resources/etesync/calendartaskbasehandler.cpp
View file @
34d38977
...
...
@@ -52,6 +52,8 @@ void CalendarTaskBaseHandler::getItemListFromEntries(std::vector<EteSyncEntryPtr
KCalendarCore
::
ICalFormat
format
;
const
KCalendarCore
::
Incidence
::
Ptr
incidence
=
format
.
fromString
(
QStringFromCharPtr
(
contentStr
));
qCDebug
(
ETESYNC_LOG
)
<<
"Entry parsed into incidence - UID"
<<
incidence
->
uid
();
const
QString
action
=
QStringFromCharPtr
(
CharPtr
(
etesync_sync_entry_get_action
(
syncEntry
.
get
())));
if
(
action
==
QStringLiteral
(
ETESYNC_SYNC_ENTRY_ACTION_ADD
)
||
action
==
QStringLiteral
(
ETESYNC_SYNC_ENTRY_ACTION_CHANGE
))
{
incidences
[
incidence
->
uid
()]
=
incidence
;
...
...
resources/etesync/etesyncresource.cpp
View file @
34d38977
...
...
@@ -191,21 +191,25 @@ void EteSyncResource::setupCollection(Collection &collection, EteSyncJournal *jo
auto
attr
=
collection
.
attribute
<
EntityDisplayAttribute
>
(
Collection
::
AddIfMissing
);
const
QString
displayName
=
QStringFromCharPtr
(
CharPtr
(
etesync_collection_info_get_display_name
(
info
.
get
())));
if
(
type
==
QStringLiteral
(
ETESYNC_COLLECTION_TYPE_ADDRESS_BOOK
))
{
mimeTypes
.
push_back
(
KContacts
::
Addressee
::
mimeType
());
attr
->
setDisplayName
(
displayName
);
attr
->
setIconName
(
QStringLiteral
(
"view-pim-contacts"
));
}
else
if
(
type
==
QStringLiteral
(
ETESYNC_COLLECTION_TYPE_CALENDAR
))
{
mimeTypes
.
push_back
(
KCalendarCore
::
Event
::
eventMimeType
());
attr
->
setDisplayName
(
displayName
);
attr
->
setIconName
(
QStringLiteral
(
"view-calendar"
));
}
else
if
(
type
==
QStringLiteral
(
ETESYNC_COLLECTION_TYPE_TASKS
))
{
mimeTypes
.
push_back
(
KCalendarCore
::
Todo
::
todoMimeType
());
attr
->
setDisplayName
(
displayName
);
attr
->
setIconName
(
QStringLiteral
(
"view-pim-tasks"
));
}
else
{
qCWarning
(
ETESYNC_LOG
)
<<
"Unknown journal type. Cannot set collection mime type."
;
}
const
QString
journalUid
=
QStringFromCharPtr
(
CharPtr
(
etesync_journal_get_uid
(
journal
)));
const
QString
displayName
=
QStringFromCharPtr
(
CharPtr
(
etesync_collection_info_get_display_name
(
info
.
get
())));
auto
collectionColor
=
etesync_collection_info_get_color
(
info
.
get
());
auto
colorAttr
=
collection
.
attribute
<
Akonadi
::
CollectionColorAttribute
>
(
Collection
::
AddIfMissing
);
colorAttr
->
setColor
(
collectionColor
);
...
...
@@ -215,7 +219,7 @@ void EteSyncResource::setupCollection(Collection &collection, EteSyncJournal *jo
}
collection
.
setRemoteId
(
journalUid
);
collection
.
setName
(
displayName
);
collection
.
setName
(
journalUid
);
collection
.
setContentMimeTypes
(
mimeTypes
);
mJournalsCache
[
journalUid
]
=
EteSyncJournalPtr
(
journal
);
...
...
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