Commit a4738f1e authored by Volker Krause's avatar Volker Krause
Browse files

Port away from KLocale.

parent a73cce41
...@@ -94,7 +94,6 @@ ...@@ -94,7 +94,6 @@
#include <QApplication> #include <QApplication>
#include <QTimer> #include <QTimer>
#include <KSharedConfig> #include <KSharedConfig>
#include <KLocale>
#include <QStandardPaths> #include <QStandardPaths>
KOWindowList *ActionManager::mWindowList = Q_NULLPTR; KOWindowList *ActionManager::mWindowList = Q_NULLPTR;
...@@ -1793,7 +1792,7 @@ void ActionManager::goDate(const QDate &date) ...@@ -1793,7 +1792,7 @@ void ActionManager::goDate(const QDate &date)
void ActionManager::goDate(const QString &date) void ActionManager::goDate(const QString &date)
{ {
goDate(KLocale::global()->readDate(date)); goDate(QLocale().toDate(date));
} }
void ActionManager::showDate(const QDate &date) void ActionManager::showDate(const QDate &date)
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "../kodaymatrix.h" #include "../kodaymatrix.h"
#include <qtest.h> #include <qtest.h>
#include <KLocale> #include <QLocale>
QTEST_MAIN(KODayMatrixTest) QTEST_MAIN(KODayMatrixTest)
typedef QPair<QDate, QDate> DateRange; typedef QPair<QDate, QDate> DateRange;
...@@ -31,7 +31,7 @@ typedef QPair<QDate, QDate> DateRange; ...@@ -31,7 +31,7 @@ typedef QPair<QDate, QDate> DateRange;
void KODayMatrixTest::testMatrixLimits() void KODayMatrixTest::testMatrixLimits()
{ {
QMap<QDate, DateRange> dates; QMap<QDate, DateRange> dates;
KLocale::global()->setWeekStartDay(1); // Monday QLocale::setDefault(QLocale(QStringLiteral("de_DE"))); // week start on Monday
dates.insert(QDate(2011, 1, 1), DateRange(QDate(2010, 12, 27), QDate(2011, 2, 6))); dates.insert(QDate(2011, 1, 1), DateRange(QDate(2010, 12, 27), QDate(2011, 2, 6)));
dates.insert(QDate(2011, 2, 1), DateRange(QDate(2011, 1, 31), QDate(2011, 3, 13))); dates.insert(QDate(2011, 2, 1), DateRange(QDate(2011, 1, 31), QDate(2011, 3, 13)));
dates.insert(QDate(2011, 3, 1), DateRange(QDate(2011, 2, 28), QDate(2011, 4, 10))); dates.insert(QDate(2011, 3, 1), DateRange(QDate(2011, 2, 28), QDate(2011, 4, 10)));
...@@ -47,8 +47,7 @@ void KODayMatrixTest::testMatrixLimits() ...@@ -47,8 +47,7 @@ void KODayMatrixTest::testMatrixLimits()
} }
QMap<QDate, DateRange> dates2; QMap<QDate, DateRange> dates2;
KLocale::global()->setWeekStartDay(1); // Monday QLocale::setDefault(QLocale(QStringLiteral("en_US"))); // week start on Sunday
KLocale::global()->setWeekStartDay(7); // Sunday
dates2.insert(QDate(2011, 1, 1), DateRange(QDate(2010, 12, 26), QDate(2011, 2, 5))); dates2.insert(QDate(2011, 1, 1), DateRange(QDate(2010, 12, 26), QDate(2011, 2, 5)));
dates2.insert(QDate(2011, 2, 1), DateRange(QDate(2011, 1, 30), QDate(2011, 3, 12))); dates2.insert(QDate(2011, 2, 1), DateRange(QDate(2011, 1, 30), QDate(2011, 3, 12)));
dates2.insert(QDate(2011, 3, 1), DateRange(QDate(2011, 2, 27), QDate(2011, 4, 9))); dates2.insert(QDate(2011, 3, 1), DateRange(QDate(2011, 2, 27), QDate(2011, 4, 9)));
......
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