From 9d6c79522dde67a1810d6a040bd40e12f8eaae44 Mon Sep 17 00:00:00 2001 From: Carlos Bohórquez Date: Fri, 11 Sep 2015 14:53:30 +0200 Subject: Several changes Use the global variable sessionsettings_config_file in all places that must be used. QSettings::setPath was already setted so it's not needed. Deleted. Instead using variable for date and time format in case user settings aren't setted, now we go to Qt::DefaultLocaleShortDate. To perform this operation, we must work with Date and Time separately. Now DirWidget::date_format is an QStringList, first item for date and second for time. The QDateTime with format "yyyyMMddhhmmsszzz" is stored on whatsThis variable for being used in sort operations. CQTreeWidgetItem operator< function has been simplified. Now, to check dates, we used the value stored in whatsThis. --- lumina-desktop/panel-plugins/clock/LClock.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lumina-desktop') diff --git a/lumina-desktop/panel-plugins/clock/LClock.cpp b/lumina-desktop/panel-plugins/clock/LClock.cpp index f704647e..2c7e3e07 100644 --- a/lumina-desktop/panel-plugins/clock/LClock.cpp +++ b/lumina-desktop/panel-plugins/clock/LClock.cpp @@ -55,9 +55,9 @@ void LClock::updateTime(bool adjustformat){ QString label; QString timelabel; QString datelabel; - if(deftime){ timelabel = CT.time().toString(Qt::SystemLocaleShortDate) ; } + if(deftime){ timelabel = CT.time().toString(Qt::DefaultLocaleShortDate) ; } else{ timelabel=CT.toString(timefmt); } - if(defdate){ datelabel = CT.date().toString(Qt::SystemLocaleLongDate); } + if(defdate){ datelabel = CT.date().toString(Qt::DefaultLocaleShortDate); } else{ datelabel = CT.toString(datefmt); } if(datetimeorder == "dateonly"){ label = datelabel; @@ -255,4 +255,4 @@ void LClock::OrientationChange(){ } updateTime(true); //re-adjust the font/spacings this->layout()->update(); -} \ No newline at end of file +} -- cgit