Git commit 9f3612f9adc290ab7c242d03c496afeed6be89d7 by John Layt. Committed on 31/03/2012 at 23:56. Pushed by jlayt into branch 'master'. Plasma Clock: Use correct date format api Use the proper format api rather than a temp locale. KF5 prep. M +2 -6 plasma/generic/applets/digital-clock/clock.cpp http://commits.kde.org/kde-workspace/9f3612f9adc290ab7c242d03c496afeed6be89= d7 diff --git a/plasma/generic/applets/digital-clock/clock.cpp b/plasma/generi= c/applets/digital-clock/clock.cpp index 0af6a03..1331776 100644 --- a/plasma/generic/applets/digital-clock/clock.cpp +++ b/plasma/generic/applets/digital-clock/clock.cpp @@ -472,12 +472,8 @@ void Clock::paintInterface(QPainter *p, const QStyleOp= tionGraphicsItem *option, //Create the localized date string if needed if (m_dateStyle) { // JPL This needs a complete rewrite for l10n issues - KLocale tmpLocale(*KGlobal::locale()); - tmpLocale.setCalendar(calendar()->calendarType()); = - tmpLocale.setDateFormat("%e"); // day number of the month - QString day =3D tmpLocale.formatDate(m_date); - tmpLocale.setDateFormat("%m"); // short form of the month - QString month =3D tmpLocale.formatDate(m_date); + QString day =3D KGlobal::locale()->calendar()->formatDate(m_da= te, KLocale::Day, KLocale::ShortNumber); + QString month =3D KGlobal::locale()->calendar()->formatDate(m_= date, KLocale::Month, KLocale::LongNumber); = if (m_dateStyle =3D=3D 1) { //compact date dateString =3D i18nc("@label Compact date: "