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
KAlarm
Commits
f1b3d8c7
Commit
f1b3d8c7
authored
Sep 24, 2022
by
Laurent Montel
Browse files
We depend against kf5.98
parent
d6c9eea4
Pipeline
#236406
passed with stage
in 1 minute and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/daymatrix.cpp
View file @
f1b3d8c7
...
...
@@ -22,7 +22,6 @@
#include
"lib/synchtimer.h"
#include
<KHolidays/HolidayRegion>
#include
<kholidays_version.h>
#include
<KLocalizedString>
#include
<QMenu>
...
...
@@ -194,12 +193,9 @@ void DayMatrix::updateView()
updateEvents
();
// Find which holidays occur for the dates in the matrix.
const
KHolidays
::
HolidayRegion
&
region
=
Preferences
::
holidays
();
#if KHOLIDAYS_VERSION < QT_VERSION_CHECK(5, 95, 0)
const
KHolidays
::
Holiday
::
List
list
=
region
.
holidays
(
mStartDate
,
mStartDate
.
addDays
(
NUMDAYS
-
1
));
#else
const
KHolidays
::
Holiday
::
List
list
=
region
.
rawHolidaysWithAstroSeasons
(
mStartDate
,
mStartDate
.
addDays
(
NUMDAYS
-
1
));
#endif
const
KHolidays
::
HolidayRegion
&
region
=
Preferences
::
holidays
();
const
KHolidays
::
Holiday
::
List
list
=
region
.
rawHolidaysWithAstroSeasons
(
mStartDate
,
mStartDate
.
addDays
(
NUMDAYS
-
1
));
QHash
<
QDate
,
QStringList
>
holidaysByDate
;
for
(
const
KHolidays
::
Holiday
&
holiday
:
list
)
...
...
@@ -486,15 +482,12 @@ void DayMatrix::paintEvent(QPaintEvent*)
// Find holidays which are non-work days.
QSet
<
QDate
>
nonWorkHolidays
;
{
const
KHolidays
::
HolidayRegion
&
region
=
Preferences
::
holidays
();
#if KHOLIDAYS_VERSION < QT_VERSION_CHECK(5, 95, 0)
const
KHolidays
::
Holiday
::
List
list
=
region
.
holidays
(
mStartDate
,
mStartDate
.
addDays
(
NUMDAYS
-
1
));
#else
const
KHolidays
::
Holiday
::
List
list
=
region
.
rawHolidaysWithAstroSeasons
(
mStartDate
,
mStartDate
.
addDays
(
NUMDAYS
-
1
));
#endif
for
(
const
KHolidays
::
Holiday
&
holiday
:
list
)
if
(
holiday
.
dayType
()
==
KHolidays
::
Holiday
::
NonWorkday
)
nonWorkHolidays
+=
holiday
.
observedStartDate
();
const
KHolidays
::
HolidayRegion
&
region
=
Preferences
::
holidays
();
const
KHolidays
::
Holiday
::
List
list
=
region
.
rawHolidaysWithAstroSeasons
(
mStartDate
,
mStartDate
.
addDays
(
NUMDAYS
-
1
));
for
(
const
KHolidays
::
Holiday
&
holiday
:
list
)
if
(
holiday
.
dayType
()
==
KHolidays
::
Holiday
::
NonWorkday
)
nonWorkHolidays
+=
holiday
.
observedStartDate
();
}
const
QBitArray
workDays
=
Preferences
::
workDays
();
...
...
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