Skip to content
GitLab
Menu
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
00831829
Commit
00831829
authored
Aug 09, 2019
by
Laurent Montel
😁
Browse files
Make it compile without deprecated method
parent
0f5c0182
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
00831829
...
...
@@ -47,7 +47,7 @@ find_package(KF5IdentityManagement ${IDENTITYMANAGER_LIB_VERSION} CONFIG REQUIRE
find_package
(
KF5CalendarUtils
${
CALENDARUTILS_LIB_VERSION
}
CONFIG REQUIRED
)
add_definitions
(
-DQT_NO_FOREACH
)
add_definitions
(
-DQT_DISABLE_DEPRECATED_BEFORE=0x060000
)
########### Targets ###########
add_subdirectory
(
src
)
...
...
autotests/kadatetimetest.cpp
View file @
00831829
...
...
@@ -1655,7 +1655,7 @@ void KADateTimeTest::set()
// time_t
utcd
=
KADateTime
(
QDate
(
2005
,
6
,
6
),
QTime
(
12
,
15
,
20
),
KADateTime
::
UTC
);
QDateTime
qtt
=
utcd
.
qDateTime
();
uint
secs
=
qtt
.
to
Time_t
();
uint
secs
=
qtt
.
to
SecsSinceEpoch
();
KADateTime
tt
;
tt
.
setTime_t
(
static_cast
<
qint64
>
(
secs
));
QVERIFY
(
tt
.
isUtc
());
...
...
src/kadatetime.cpp
View file @
00831829
...
...
@@ -1146,7 +1146,7 @@ uint KADateTime::toTime_t() const
const
QDateTime
qdt
=
d
->
toUtc
(
local
);
if
(
!
qdt
.
isValid
())
return
uint
(
-
1
);
return
qdt
.
to
Time_t
();
return
qdt
.
to
SecsSinceEpoch
();
}
void
KADateTime
::
setTime_t
(
qint64
seconds
)
...
...
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