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
Itinerary
Commits
00f940aa
Commit
00f940aa
authored
Oct 29, 2022
by
Volker Krause
Browse files
Fix building with KF deprecation level 5.95 or higher
parent
c1608ebf
Pipeline
#257463
passed with stage
in 11 minutes and 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/timelinesectiondelegatecontroller.cpp
View file @
00f940aa
...
...
@@ -10,6 +10,7 @@
#include
"timelinemodel.h"
#if HAVE_KHOLIDAYS
#include
<kholidays_version.h>
#include
<KHolidays/HolidayRegion>
#endif
...
...
@@ -114,7 +115,11 @@ void TimelineSectionDelegateController::recheckHoliday()
const
auto
holidayRegion
=
KHolidays
::
HolidayRegion
(
holidayRegionCode
);
if
(
holidayRegion
.
isValid
())
{
#if KHOLIDAYS_VERSION < QT_VERSION_CHECK(5, 95, 0)
m_holidays
=
holidayRegion
.
holidays
(
m_date
);
#else
m_holidays
=
holidayRegion
.
rawHolidaysWithAstroSeasons
(
m_date
);
#endif
// prioritize non-workdays
std
::
sort
(
m_holidays
.
begin
(),
m_holidays
.
end
(),
[](
const
auto
&
lhs
,
const
auto
&
rhs
)
{
return
lhs
.
dayType
()
==
KHolidays
::
Holiday
::
NonWorkday
&&
rhs
.
dayType
()
==
KHolidays
::
Holiday
::
Workday
;
...
...
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