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
Libraries
KOpeningHours
Commits
ddeb603f
Commit
ddeb603f
authored
Oct 27, 2022
by
Volker Krause
Browse files
Compile with KF deprecation level 5.95 or higher as well
parent
4642d3ca
Pipeline
#256474
passed with stage
in 7 minutes and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/lib/holidaycache.cpp
View file @
ddeb603f
...
...
@@ -6,6 +6,7 @@
#include
"holidaycache_p.h"
#include
<kholidays_version.h>
#include
<KHolidays/HolidayRegion>
#include
<QDate>
...
...
@@ -69,7 +70,11 @@ KHolidays::Holiday HolidayCache::nextHoliday(const KHolidays::HolidayRegion ®
entry
.
begin
=
std
::
min
(
it
.
value
().
begin
,
entry
.
begin
);
entry
.
end
=
std
::
max
(
it
.
value
().
end
,
entry
.
end
);
}
#if KHOLIDAYS_VERSION >= QT_VERSION_CHECK(5, 95, 0)
entry
.
holidays
=
region
.
rawHolidays
(
entry
.
begin
,
entry
.
end
);
#else
entry
.
holidays
=
region
.
holidays
(
entry
.
begin
,
entry
.
end
);
#endif
entry
.
holidays
.
erase
(
std
::
remove_if
(
entry
.
holidays
.
begin
(),
entry
.
holidays
.
end
(),
[](
const
auto
&
h
)
{
return
h
.
dayType
()
!=
KHolidays
::
Holiday
::
NonWorkday
;
}),
entry
.
holidays
.
end
());
...
...
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