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
2492c255
Commit
2492c255
authored
Jul 17, 2016
by
David Jarvie
Browse files
KLocale -> QLocale
parent
0b7f400e
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/alarmtext.cpp
View file @
2492c255
...
...
@@ -2,7 +2,7 @@
* alarmtext.cpp - text/email alarm text conversion
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2004,2005,2007-201
3
by David Jarvie <djarvie@kde.org>
* Copyright © 2004,2005,2007-201
6
by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as published
...
...
@@ -24,11 +24,11 @@
#include
"kaevent.h"
#include
<klocale.h>
#include
<klocalizedstring.h>
#include
<QStringList>
#include
<QDateTime>
#include
<QLocale>
namespace
{
...
...
@@ -164,8 +164,8 @@ void AlarmText::setTodo(const KCalCore::Todo::Ptr &todo)
if
(
todo
->
hasDueDate
())
{
KDateTime
due
=
todo
->
dtDue
(
false
);
// fetch the next due date
if
(
todo
->
hasStartDate
()
&&
todo
->
dtStart
()
!=
due
)
{
d
->
mTime
=
todo
->
allDay
()
?
K
Locale
::
global
()
->
formatDate
(
due
.
date
(),
K
Locale
::
Short
D
at
e
)
:
K
Locale
::
global
()
->
formatDateTime
(
due
.
dateTime
()
);
d
->
mTime
=
todo
->
allDay
()
?
Q
Locale
().
toString
(
due
.
date
(),
Q
Locale
::
Short
Form
at
)
:
Q
Locale
().
toString
(
due
.
dateTime
(),
QLocale
::
ShortFormat
);
}
}
}
...
...
src/datetime.cpp
View file @
2492c255
...
...
@@ -2,7 +2,7 @@
* datetime.cpp - date/time with start-of-day time for date-only values
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2003,2005-2007,2009-2011 by David Jarvie <djarvie@kde.org>
* Copyright © 2003,2005-2007,2009-2011
,2016
by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as published
...
...
@@ -21,11 +21,11 @@
*/
#include
"datetime.h"
#include
<klocale.h>
#include
<klocalizedstring.h>
#include
<ktimezone.h>
#include
<QDateTime>
#include
<QLocale>
namespace
KAlarmCal
{
...
...
@@ -344,7 +344,9 @@ QString DateTime::toString(const QString &format) const
QString
DateTime
::
formatLocale
(
bool
shortFormat
)
const
{
return
KLocale
::
global
()
->
formatDateTime
(
d
->
mDateTime
,
(
shortFormat
?
KLocale
::
ShortDate
:
KLocale
::
LongDate
));
QLocale
::
FormatType
format
=
shortFormat
?
QLocale
::
ShortFormat
:
QLocale
::
LongFormat
;
return
d
->
mDateTime
.
isDateOnly
()
?
QLocale
().
toString
(
d
->
mDateTime
.
date
(),
format
)
:
QLocale
().
toString
(
d
->
mDateTime
.
dateTime
(),
format
);
}
void
DateTime
::
setStartOfDay
(
const
QTime
&
sod
)
...
...
src/karecurrence.cpp
View file @
2492c255
...
...
@@ -2,7 +2,7 @@
* karecurrence.cpp - recurrence with special yearly February 29th handling
* This file is part of kalarmcal library, which provides access to KAlarm
* calendar data.
* Copyright © 2005-201
3
by David Jarvie <djarvie@kde.org>
* Copyright © 2005-201
6
by David Jarvie <djarvie@kde.org>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as published
...
...
@@ -30,7 +30,7 @@
#include
<QBitArray>
#include
<QDate>
#include
<
K
Locale>
#include
<
Q
Locale>
using
namespace
KCalCore
;
namespace
KAlarmCal
...
...
@@ -1035,7 +1035,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.
const
int
weekStart
=
K
Locale
::
global
()
->
weekStartDay
()
-
1
;
// zero-based
const
int
weekStart
=
Q
Locale
().
firstDayOfWeek
()
-
1
;
// zero-based
for
(
int
i
=
0
;
i
<
7
;
++
i
)
{
// Get the standard KDE day-of-week number (zero-based)
// for the day-of-week number in the user's locale.
...
...
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