From d91c533ffc42d7bf48fa1326754894b2c30b6831 Mon Sep 17 00:00:00 2001 From: ulf69 Date: Fri, 09 Jul 2004 08:02:25 +0000 Subject: changed the IntDateFormat from type int to enum, for easier categorization --- (limited to 'korganizer') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index c3c3d47..58b3d70 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1776,7 +1776,7 @@ void CalendarView::writeLocale() { KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime ); KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday ); - KGlobal::locale()->setIntDateFormat( KOPrefs::instance()->mPreferredDate ); + KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate ); KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage ); QString dummy = KOPrefs::instance()->mUserDateFormatLong; KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 0547a2e..b2001ec 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -450,12 +450,9 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) if ( ((Todo*)ev)->dtDue().date() < QDate::currentDate() ) { // mText +="" + i18n("O-due!") + ""; QString dfs = KGlobal::locale()->dateFormatShort(); - KGlobal::locale()->setIntDateFormat( 3 ); KGlobal::locale()->setDateFormatShort("%d.%b"); - mText +="" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true) + ""; - + mText +="" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + ""; KGlobal::locale()->setDateFormatShort(dfs); - KGlobal::locale()->setIntDateFormat( KOPrefs::instance()->mPreferredDate ); } else { if (!ev->doesFloat() ) if( ( (Todo*)ev)->dtDue() < cdt ) { @@ -567,12 +564,9 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) if ( QDateTime::currentDateTime().date().year() != ye ) year = QString::number( ye ); QString dfs = KGlobal::locale()->dateFormatShort(); - KGlobal::locale()->setIntDateFormat( 3 ); KGlobal::locale()->setDateFormatShort("%d.%b"); - mText +=" [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true) + "."+ year +"]"; - + mText +=" [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]"; KGlobal::locale()->setDateFormatShort(dfs); - KGlobal::locale()->setIntDateFormat( KOPrefs::instance()->mPreferredDate ); } if ( KOPrefs::instance()->mWNViewShowLocation ) if ( !ev->location().isEmpty() ) -- cgit v0.9.0.2