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
KAlarm
Commits
387acf33
Commit
387acf33
authored
May 10, 2014
by
Laurent Montel
Browse files
Convert kglobal::locale
parent
5b0a596d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/alarmtext.cpp
View file @
387acf33
...
...
@@ -29,6 +29,7 @@
#include
<kglobal.h>
#include
<QStringList>
#include
<QDateTime>
#include
<KLocale>
namespace
KAlarmCal
{
...
...
@@ -157,8 +158,8 @@ void AlarmText::setTodo(const KCalCore::Todo::Ptr& todo)
KDateTime
due
=
todo
->
dtDue
(
false
);
// fetch the next due date
if
(
todo
->
hasStartDate
()
&&
todo
->
dtStart
()
!=
due
)
{
d
->
mTime
=
todo
->
allDay
()
?
K
Glob
al
::
lo
c
al
e
()
->
formatDate
(
due
.
date
(),
KLocale
::
ShortDate
)
:
K
Glob
al
::
lo
c
al
e
()
->
formatDateTime
(
due
.
dateTime
());
d
->
mTime
=
todo
->
allDay
()
?
K
Loc
al
e
::
g
lo
b
al
()
->
formatDate
(
due
.
date
(),
KLocale
::
ShortDate
)
:
K
Loc
al
e
::
g
lo
b
al
()
->
formatDateTime
(
due
.
dateTime
());
}
}
}
...
...
src/datetime.cpp
View file @
387acf33
...
...
@@ -27,6 +27,7 @@
#include
<ktimezone.h>
#include
<QDateTime>
#include
<KLocale>
namespace
KAlarmCal
{
...
...
@@ -345,7 +346,7 @@ QString DateTime::toString(const QString& format) const
QString
DateTime
::
formatLocale
(
bool
shortFormat
)
const
{
return
K
Glob
al
::
lo
c
al
e
()
->
formatDateTime
(
d
->
mDateTime
,
(
shortFormat
?
KLocale
::
ShortDate
:
KLocale
::
LongDate
));
return
K
Loc
al
e
::
g
lo
b
al
()
->
formatDateTime
(
d
->
mDateTime
,
(
shortFormat
?
KLocale
::
ShortDate
:
KLocale
::
LongDate
));
}
void
DateTime
::
setStartOfDay
(
const
QTime
&
sod
)
...
...
src/karecurrence.cpp
View file @
387acf33
...
...
@@ -31,6 +31,7 @@
#include
<QBitArray>
#include
<QDate>
#include
<KLocale>
using
namespace
KCalCore
;
namespace
KAlarmCal
...
...
@@ -1044,7 +1045,7 @@ Duration KARecurrence::longestInterval() const
int
maxgap
=
1
;
// Use the user's definition of the week, starting at the
// day of the week specified by the user's locale.
int
weekStart
=
K
Glob
al
::
lo
c
al
e
()
->
weekStartDay
()
-
1
;
// zero-based
int
weekStart
=
K
Loc
al
e
::
g
lo
b
al
()
->
weekStartDay
()
-
1
;
// zero-based
for
(
int
i
=
0
;
i
<
7
;
++
i
)
{
// Get the standard KDE day-of-week number (zero-based)
...
...
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