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
d33febce
Commit
d33febce
authored
Sep 24, 2022
by
Laurent Montel
Browse files
We depend against kf5.98
parent
3cdcfffe
Pipeline
#236398
passed with stage
in 4 minutes and 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/printing/calprintpluginbase.cpp
View file @
d33febce
...
...
@@ -19,7 +19,6 @@
#include
<KConfig>
#include
<KConfigGroup>
#include
<KWordWrap>
#include
<kcalendarcore_version.h>
#include
<KLocalizedString>
#include
<QAbstractTextDocumentLayout>
...
...
@@ -1779,11 +1778,7 @@ void CalPrintPluginBase::drawTodo(int &count,
for
(
const
KCalendarCore
::
Todo
::
Ptr
&
todo
:
std
::
as_const
(
t
))
{
tl
.
append
(
todo
);
}
#if KCALENDARCORE_VERSION < QT_VERSION_CHECK(5, 95, 0)
KCalendarCore
::
Todo
::
List
sl
=
mCalendar
->
sortTodos
(
tl
,
sortField
,
sortDir
);
#else
KCalendarCore
::
Todo
::
List
sl
=
mCalendar
->
sortTodos
(
std
::
move
(
tl
),
sortField
,
sortDir
);
#endif
#endif
int
subcount
=
0
;
...
...
src/utils.cpp
View file @
d33febce
...
...
@@ -9,7 +9,6 @@
#include
"utils.h"
#include
"calendarsupport_debug.h"
#include
"kcalprefs.h"
#include
<kholidays_version.h>
#include
<Akonadi/AgentInstance>
#include
<Akonadi/AgentManager>
...
...
@@ -526,11 +525,7 @@ QList<QDate> CalendarSupport::workDays(QDate startDate, QDate endDate)
for
(
const
QString
&
regionStr
:
holidays
)
{
KHolidays
::
HolidayRegion
region
(
regionStr
);
if
(
region
.
isValid
())
{
#if KHOLIDAYS_VERSION < QT_VERSION_CHECK(5, 95, 0)
for
(
auto
const
&
h
:
region
.
holidays
(
startDate
,
endDate
))
{
#else
for
(
auto
const
&
h
:
region
.
rawHolidaysWithAstroSeasons
(
startDate
,
endDate
))
{
#endif
if
(
h
.
dayType
()
==
KHolidays
::
Holiday
::
NonWorkday
)
{
for
(
int
i
=
0
;
i
<
h
.
duration
();
i
++
)
{
result
.
removeOne
(
h
.
observedStartDate
().
addDays
(
i
));
...
...
@@ -553,11 +548,7 @@ QStringList CalendarSupport::holiday(QDate date)
for
(
const
QString
&
regionStr
:
holidays
)
{
KHolidays
::
HolidayRegion
region
(
regionStr
);
if
(
region
.
isValid
())
{
#if KHOLIDAYS_VERSION < QT_VERSION_CHECK(5, 95, 0)
const
KHolidays
::
Holiday
::
List
list
=
region
.
holidays
(
date
);
#else
const
KHolidays
::
Holiday
::
List
list
=
region
.
rawHolidaysWithAstroSeasons
(
date
);
#endif
const
int
listCount
=
list
.
count
();
for
(
int
i
=
0
;
i
<
listCount
;
++
i
)
{
// don't add duplicates.
...
...
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