summaryrefslogtreecommitdiff
path: root/core/settings/citytime/citytime.cpp
authorar <ar>2004-05-02 17:31:50 (UTC)
committer ar <ar>2004-05-02 17:31:50 (UTC)
commita210b9a597ba0c929d95c38ffbaf972916c7b8a7 (patch) (side-by-side diff)
treece121d5017eb054222c86e0afb6057a28ea7bf8a /core/settings/citytime/citytime.cpp
parent18759e9156c96795831120408a9da0d3b4ec71a4 (diff)
downloadopie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.zip
opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.tar.gz
opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.tar.bz2
- convert qDebug to odebug
Diffstat (limited to 'core/settings/citytime/citytime.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/citytime/citytime.cpp94
1 files changed, 49 insertions, 45 deletions
diff --git a/core/settings/citytime/citytime.cpp b/core/settings/citytime/citytime.cpp
index 721285d..d73bda1 100644
--- a/core/settings/citytime/citytime.cpp
+++ b/core/settings/citytime/citytime.cpp
@@ -25,2 +25,3 @@
+/* OPIE */
#include <qpe/qpeapplication.h>
@@ -31,3 +32,5 @@
#endif
+#include <opie2/odebug.h>
+/* QT */
#include <qlabel.h>
@@ -37,2 +40,3 @@
+/* STD */
#include <stdlib.h>
@@ -48,3 +52,3 @@ CityTime::CityTime( QWidget *parent, const char* name,
bWhichClock = config.readBoolEntry( "AMPM", TRUE );
- qDebug( QString("%1").arg(bWhichClock) );
+ odebug << QString("%1").arg(bWhichClock) << oendl;
frmMap->changeClock( bWhichClock );
@@ -120,29 +124,29 @@ CityTime::~CityTime()
if ( changed ) {
- Config cfg("CityTime");
- cfg.setGroup("TimeZones");
- QListIterator<QToolButton> itCity( listCities );
- int i;
- bool realTzWritten = FALSE;
- for ( i = 0, itCity.toFirst(); i < CITIES; i++, ++itCity ) {
- if ( !strCityTz[i].isNull() ) {
- cfg.writeEntry("Zone"+QString::number(i), strCityTz[i]);
- cfg.writeEntry("ZoneName"+QString::number(i), itCity.current()->text());
- if ( strCityTz[i] == strRealTz )
- realTzWritten = TRUE;
- }
- }
- if ( realTzWritten ) {
- cfg.removeEntry("Zone"+QString::number(CITIES));
- cfg.removeEntry("ZoneName"+QString::number(CITIES));
- } else {
- cfg.writeEntry("Zone"+QString::number(CITIES), strRealTz);
- if ( nameRealTz.isEmpty() ) {
- int i = strRealTz.find( '/' );
- nameRealTz = strRealTz.mid( i+1 );
- }
- cfg.writeEntry("ZoneName"+QString::number(CITIES), nameRealTz);
- }
- QCopEnvelope ( "QPE/System", "timeZoneListChange()" );
+ Config cfg("CityTime");
+ cfg.setGroup("TimeZones");
+ QListIterator<QToolButton> itCity( listCities );
+ int i;
+ bool realTzWritten = FALSE;
+ for ( i = 0, itCity.toFirst(); i < CITIES; i++, ++itCity ) {
+ if ( !strCityTz[i].isNull() ) {
+ cfg.writeEntry("Zone"+QString::number(i), strCityTz[i]);
+ cfg.writeEntry("ZoneName"+QString::number(i), itCity.current()->text());
+ if ( strCityTz[i] == strRealTz )
+ realTzWritten = TRUE;
+ }
+ }
+ if ( realTzWritten ) {
+ cfg.removeEntry("Zone"+QString::number(CITIES));
+ cfg.removeEntry("ZoneName"+QString::number(CITIES));
+ } else {
+ cfg.writeEntry("Zone"+QString::number(CITIES), strRealTz);
+ if ( nameRealTz.isEmpty() ) {
+ int i = strRealTz.find( '/' );
+ nameRealTz = strRealTz.mid( i+1 );
+ }
+ cfg.writeEntry("ZoneName"+QString::number(CITIES), nameRealTz);
+ }
+ QCopEnvelope ( "QPE/System", "timeZoneListChange()" );
- changed = FALSE;
+ changed = FALSE;
}
@@ -160,3 +164,3 @@ void CityTime::timerEvent( QTimerEvent *e )
if ( e )
- killTimer( timerId );
+ killTimer( timerId );
// change the time again!!
@@ -182,3 +186,3 @@ void CityTime::showTime( void )
if ( setenv( "TZ", strCityTz[i], true ) == 0 ) {
- itTime.current()->setText( TimeString::shortTime( bWhichClock ) );
+ itTime.current()->setText( TimeString::shortTime( bWhichClock ) );
} else {
@@ -225,3 +229,3 @@ void CityTime::slotNewTz( const QString & strNewCountry,
// that is ever pressed!
- changed = TRUE;
+ changed = TRUE;
break;
@@ -243,11 +247,11 @@ void CityTime::readInTimes( void )
for ( ; i < CITIES ; i++ ) {
- zn = cfg.readEntry("Zone"+QString::number(i), QString::null);
- if ( zn.isNull() )
- break;
- QString nm = cfg.readEntry("ZoneName"+QString::number(i));
- strCityTz[i] = zn;
- itCity.current()->setText(nm);
- if ( zn == strRealTz )
- nameRealTz = nm;
- ++itCity;
+ zn = cfg.readEntry("Zone"+QString::number(i), QString::null);
+ if ( zn.isNull() )
+ break;
+ QString nm = cfg.readEntry("ZoneName"+QString::number(i));
+ strCityTz[i] = zn;
+ itCity.current()->setText(nm);
+ if ( zn == strRealTz )
+ nameRealTz = nm;
+ ++itCity;
}
@@ -265,8 +269,8 @@ void CityTime::readInTimes( void )
if ( nameRealTz.isEmpty() ) {
- //remember the current time zone even if we don't have room
- //to show it.
- zn = cfg.readEntry("Zone"+QString::number(CITIES), QString::null);
- if ( zn == strRealTz )
- nameRealTz = cfg.readEntry("ZoneName"+QString::number(CITIES));
- i++;
+ //remember the current time zone even if we don't have room
+ //to show it.
+ zn = cfg.readEntry("Zone"+QString::number(CITIES), QString::null);
+ if ( zn == strRealTz )
+ nameRealTz = cfg.readEntry("ZoneName"+QString::number(CITIES));
+ i++;
}