Commit 387acf33 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Convert kglobal::locale

parent 5b0a596d
......@@ -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() ? KGlobal::locale()->formatDate(due.date(), KLocale::ShortDate)
: KGlobal::locale()->formatDateTime(due.dateTime());
d->mTime = todo->allDay() ? KLocale::global()->formatDate(due.date(), KLocale::ShortDate)
: KLocale::global()->formatDateTime(due.dateTime());
}
}
}
......
......@@ -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 KGlobal::locale()->formatDateTime(d->mDateTime, (shortFormat ? KLocale::ShortDate : KLocale::LongDate));
return KLocale::global()->formatDateTime(d->mDateTime, (shortFormat ? KLocale::ShortDate : KLocale::LongDate));
}
void DateTime::setStartOfDay(const QTime& sod)
......
......@@ -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 = KGlobal::locale()->weekStartDay() - 1; // zero-based
int weekStart = KLocale::global()->weekStartDay() - 1; // zero-based
for (int i = 0; i < 7; ++i)
{
// Get the standard KDE day-of-week number (zero-based)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment