Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KCalendarCore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Frameworks
KCalendarCore
Commits
aab7955c
Commit
aab7955c
authored
Dec 18, 2020
by
Albert Astals Cid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ifdefs, we require Qt 5.14 now
parent
bb635324
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
28 deletions
+0
-28
autotests/testdateserialization.cpp
autotests/testdateserialization.cpp
+0
-8
autotests/testfreebusyperiod.cpp
autotests/testfreebusyperiod.cpp
+0
-4
autotests/testicalformat.cpp
autotests/testicalformat.cpp
+0
-4
autotests/testtimesininterval.cpp
autotests/testtimesininterval.cpp
+0
-12
No files found.
autotests/testdateserialization.cpp
View file @
aab7955c
...
...
@@ -20,11 +20,7 @@ using namespace KCalendarCore;
// See bug 345498.
void
TestDateSerialization
::
testNewRecurringTodo
()
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QDateTime
startDate
=
QDate
(
2015
,
3
,
24
).
startOfDay
();
#else
QDateTime
startDate
{
QDate
(
2015
,
3
,
24
)
};
#endif
QDateTime
dueDate
{
startDate
.
addDays
(
1
)
};
Todo
::
Ptr
todo
(
new
Todo
);
...
...
@@ -55,11 +51,7 @@ void TestDateSerialization::testNewRecurringTodo()
// See bug 345565.
void
TestDateSerialization
::
testTodoCompletedOnce
()
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QDateTime
startDate
=
QDate
::
currentDate
().
startOfDay
();
#else
QDateTime
startDate
{
QDate
::
currentDate
()
};
#endif
QDateTime
dueDate
{
startDate
.
addDays
(
1
)
};
Todo
::
Ptr
todo
(
new
Todo
);
...
...
autotests/testfreebusyperiod.cpp
View file @
aab7955c
...
...
@@ -84,11 +84,7 @@ void FreeBusyPeriodTest::testDataStreamOut()
void
FreeBusyPeriodTest
::
testDataStreamIn
()
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
const
QDateTime
p1DateTime
=
QDate
(
2006
,
8
,
30
).
startOfDay
();
#else
const
QDateTime
p1DateTime
(
QDate
(
2006
,
8
,
30
));
#endif
const
Duration
duration
(
24
*
60
*
60
);
FreeBusyPeriod
p1
(
p1DateTime
,
duration
);
p1
.
setSummary
(
QStringLiteral
(
"I can haz summary?"
));
...
...
autotests/testicalformat.cpp
View file @
aab7955c
...
...
@@ -217,11 +217,7 @@ void ICalFormatTest::testAlarm()
ICalFormat
format
;
Event
::
Ptr
event
(
new
Event
);
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
event
->
setDtStart
(
QDate
(
2017
,
03
,
24
).
startOfDay
());
#else
event
->
setDtStart
(
QDateTime
(
QDate
(
2017
,
03
,
24
)));
#endif
Alarm
::
Ptr
alarm
=
event
->
newAlarm
();
alarm
->
setType
(
Alarm
::
Display
);
alarm
->
setStartOffset
(
Duration
(
0
));
...
...
autotests/testtimesininterval.cpp
View file @
aab7955c
...
...
@@ -204,11 +204,7 @@ void TimesInIntervalTest::testLocalTimeHandlingAllDay()
:
QTimeZone
(
QByteArray
(
"America/Toronto"
)));
Event
event
;
event
.
setAllDay
(
true
);
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
event
.
setDtStart
(
QDate
(
2019
,
10
,
11
).
startOfDay
());
#else
event
.
setDtStart
(
QDateTime
(
QDate
(
2019
,
10
,
11
)));
#endif
RecurrenceRule
*
const
rule
=
new
RecurrenceRule
();
rule
->
setRecurrenceType
(
RecurrenceRule
::
rDaily
);
...
...
@@ -227,11 +223,7 @@ void TimesInIntervalTest::testLocalTimeHandlingAllDay()
// A simple date, will apply.
recurrence
->
addExDate
(
QDate
(
2019
,
10
,
14
));
// A date only local time, will apply.
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
recurrence
->
addExDateTime
(
QDate
(
2019
,
10
,
15
).
startOfDay
());
#else
recurrence
->
addExDateTime
(
QDateTime
(
QDate
(
2019
,
10
,
15
)));
#endif
// A date time starting at 00:00 in another zone, will not apply.
recurrence
->
addExDateTime
(
QDateTime
(
QDate
(
2019
,
10
,
17
),
QTime
(),
anotherZone
));
// A date time starting at 00:00 in the system time zone, will apply.
...
...
@@ -246,11 +238,7 @@ void TimesInIntervalTest::testLocalTimeHandlingAllDay()
// nor either of the exception date times.
const
QList
<
int
>
expectedDays
{
11
,
16
,
17
,
18
,
21
,
22
,
23
,
25
};
for
(
int
day
:
expectedDays
)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QVERIFY
(
timesInInterval
.
contains
(
QDate
(
2019
,
10
,
day
).
startOfDay
()));
#else
QVERIFY
(
timesInInterval
.
contains
(
QDateTime
(
QDate
(
2019
,
10
,
day
))));
#endif
}
QCOMPARE
(
timesInInterval
.
size
(),
expectedDays
.
size
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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