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 Calendar Support
Commits
7198ddfa
Commit
7198ddfa
authored
Jul 31, 2022
by
Volker Krause
Browse files
Port KCalPrefs::categoryColor to Akonadi::TagCache::tagColor
parent
0d96f02a
Pipeline
#214150
passed with stage
in 4 minutes and 26 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/printing/calprintpluginbase.cpp
View file @
7198ddfa
...
...
@@ -13,6 +13,7 @@
#include
"utils.h"
#include
<Akonadi/Item>
#include
<Akonadi/TagCache>
#include
"calendarsupport_debug.h"
#include
<KConfig>
...
...
@@ -268,18 +269,13 @@ void CalPrintPluginBase::setColorsByIncidenceCategory(QPainter &p, const KCalend
QColor
CalPrintPluginBase
::
categoryColor
(
const
QStringList
&
categories
)
const
{
if
(
categories
.
isEmpty
())
{
return
KCalPrefs
::
instance
()
->
unsetCategoryColor
();
}
// FIXME: Correctly treat events with multiple categories
const
QString
cat
=
categories
.
at
(
0
);
QColor
bgColor
;
if
(
cat
.
isEmpty
())
{
bgColor
=
KCalPrefs
::
instance
()
->
unsetCategoryColor
();
}
else
{
bgColor
=
KCalPrefs
::
instance
()
->
categoryColor
(
cat
);
if
(
!
categories
.
isEmpty
())
{
bgColor
=
Akonadi
::
TagCache
::
instance
()
->
tagColor
(
categories
.
at
(
0
));
}
return
bgColor
;
return
bgColor
.
isValid
()
?
bgColor
:
KCalPrefs
::
instance
()
->
unsetCategoryColor
();
}
QColor
CalPrintPluginBase
::
categoryBgColor
(
const
KCalendarCore
::
Incidence
::
Ptr
&
incidence
)
const
...
...
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