diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 21:31:21 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 21:31:21 +0000 |
commit | a1bd60b34891ccc77056c190d7871bc4b14fe654 (patch) | |
tree | 713f2f72c8f08a18df12f5bbeef7f9b61b19d4f1 /kweather/weatherlib.cpp | |
parent | 8d92c3c2a4131996726cc7b625d3cd3caec296de (diff) | |
download | tdetoys-a1bd60b34891ccc77056c190d7871bc4b14fe654.tar.gz tdetoys-a1bd60b34891ccc77056c190d7871bc4b14fe654.zip |
TQt4 port kdetoys
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdetoys@1238103 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kweather/weatherlib.cpp')
-rw-r--r-- | kweather/weatherlib.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kweather/weatherlib.cpp b/kweather/weatherlib.cpp index c06e89a..1fee670 100644 --- a/kweather/weatherlib.cpp +++ b/kweather/weatherlib.cpp @@ -65,7 +65,7 @@ WeatherLib::Data::Data() void WeatherLib::Data::clear() { - age = TQDateTime::currentDateTime(); + age = TQDateTime::tqcurrentDateTime(); downloading = false; updated = false; job = 0; @@ -77,8 +77,8 @@ void WeatherLib::Data::clear() } } -WeatherLib::WeatherLib(StationDatabase *stationDB, TQObject *parent, const char *name) - : TQObject (parent, name) +WeatherLib::WeatherLib(StationDatabase *stationDB, TQObject *tqparent, const char *name) + : TQObject (tqparent, name) { KGlobal::locale()->insertCatalogue("kweather"); @@ -124,7 +124,7 @@ void WeatherLib::slotCopyDone(KIO::Job* job) //TQTextStream *t = d->target->textStream(); if( t ) { - TQString s = TQString::null; + TQString s = TQString(); while ( !t->eof() ) { s += " " + t->readLine(); @@ -135,7 +135,7 @@ void WeatherLib::slotCopyDone(KIO::Job* job) kdDebug( 12006 ) << "Parse: " << s << endl; MetarParser parser(m_StationDb, KGlobal::locale()->measureSystem()); d->wi = parser.processData(d->wi.reportLocation, s); - d->age = TQDateTime::currentDateTime().addSecs(1800); + d->age = TQDateTime::tqcurrentDateTime().addSecs(1800); emit fileUpdate(d->wi.reportLocation); d->updated = true; } @@ -144,7 +144,7 @@ void WeatherLib::slotCopyDone(KIO::Job* job) // File error kdDebug( 12006 ) << "File empty error..." << endl; KPassivePopup::message( i18n("KWeather Error!"), - i18n("The temp file %1 was empty.").arg(d->target->name()), 0L,"error" ); + i18n("The temp file %1 was empty.").tqarg(d->target->name()), 0L,"error" ); d->updated = false; } } @@ -153,7 +153,7 @@ void WeatherLib::slotCopyDone(KIO::Job* job) // File error kdDebug( 12006 ) << "File read error..." << endl; KPassivePopup::message( i18n("KWeather Error!"), - i18n("Could not read the temp file %1.").arg(d->target->name()), 0L,"error" ); + i18n("Could not read the temp file %1.").tqarg(d->target->name()), 0L,"error" ); d->updated = false; } delete d->target; @@ -197,7 +197,7 @@ void WeatherLib::getData(Data *d, bool force /* try even if host was down last t u += d->wi.reportLocation.upper().stripWhiteSpace(); u += ".TXT"; - d->target = new KTempFile(TQString::null, "-weather"); + d->target = new KTempFile(TQString(), "-weather"); d->target->setAutoDelete(true); d->target->file(); @@ -322,7 +322,7 @@ void WeatherLib::update(const TQString &stationID) // Only grab new data if its more than 50 minutes old Data *d = findData(stationID); - TQDateTime timeout = TQDateTime::currentDateTime(); + TQDateTime timeout = TQDateTime::tqcurrentDateTime(); kdDebug (12006) << "Current Time: " << KGlobal::locale()->formatDateTime(timeout, false, false) << " Update at: " << KGlobal::locale()->formatDateTime(d->age, false, false) << endl; |