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
a82bef9f
Commit
a82bef9f
authored
Aug 08, 2015
by
Sergio Martins
Browse files
Use secsTo instead of secsTo_long, the later is deprecated
parent
685af727
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/datetime.cpp
View file @
a82bef9f
...
...
@@ -321,7 +321,7 @@ int DateTime::secsTo(const DateTime &dt) const
qint64
DateTime
::
secsTo_long
(
const
DateTime
&
dt
)
const
{
return
d
->
mDateTime
.
secsTo
_long
(
dt
.
d
->
mDateTime
);
return
d
->
mDateTime
.
secsTo
(
dt
.
d
->
mDateTime
);
}
QString
DateTime
::
toString
(
Qt
::
DateFormat
f
)
const
...
...
src/repetition.cpp
View file @
a82bef9f
...
...
@@ -147,14 +147,14 @@ int Repetition::nextRepeatCount(const KDateTime &from, const KDateTime &preDateT
{
return
d
->
mInterval
.
isDaily
()
?
from
.
daysTo
(
preDateTime
)
/
d
->
mInterval
.
asDays
()
+
1
:
static_cast
<
int
>
(
from
.
secsTo
_long
(
preDateTime
)
/
d
->
mInterval
.
asSeconds
())
+
1
;
:
static_cast
<
int
>
(
from
.
secsTo
(
preDateTime
)
/
d
->
mInterval
.
asSeconds
())
+
1
;
}
int
Repetition
::
previousRepeatCount
(
const
KDateTime
&
from
,
const
KDateTime
&
afterDateTime
)
const
{
return
d
->
mInterval
.
isDaily
()
?
from
.
daysTo
(
afterDateTime
.
addSecs
(
-
1
))
/
d
->
mInterval
.
asDays
()
:
static_cast
<
int
>
((
from
.
secsTo
_long
(
afterDateTime
)
-
1
)
/
d
->
mInterval
.
asSeconds
());
:
static_cast
<
int
>
((
from
.
secsTo
(
afterDateTime
)
-
1
)
/
d
->
mInterval
.
asSeconds
());
}
}
// namespace KAlarmCal
...
...
Write
Preview
Supports
Markdown
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