From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkdepim/kpimprefs.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'libkdepim/kpimprefs.cpp') diff --git a/libkdepim/kpimprefs.cpp b/libkdepim/kpimprefs.cpp index 1de00f921..730ed8f52 100644 --- a/libkdepim/kpimprefs.cpp +++ b/libkdepim/kpimprefs.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include @@ -35,7 +35,7 @@ #include "kpimprefs.h" -KPimPrefs::KPimPrefs( const QString &name ) +KPimPrefs::KPimPrefs( const TQString &name ) : KConfigSkeleton( name ) { } @@ -59,14 +59,14 @@ void KPimPrefs::usrReadConfig() mCustomCategories.sort(); } -const QString KPimPrefs::timezone() +const TQString KPimPrefs::timezone() { - QString zone = ""; + TQString zone = ""; // Read TimeZoneId from korganizerrc. KConfig korgcfg( locate( "config", "korganizerrc" ) ); korgcfg.setGroup( "Time & Date" ); - QString tz( korgcfg.readEntry( "TimeZoneId" ) ); + TQString tz( korgcfg.readEntry( "TimeZoneId" ) ); if ( !tz.isEmpty() ) { zone = tz; kdDebug(5300) << "timezone from korganizerrc is " << zone << endl; @@ -78,7 +78,7 @@ const QString KPimPrefs::timezone() int len = readlink( "/etc/localtime", zonefilebuf, PATH_MAX ); if ( len > 0 && len < PATH_MAX ) { - zone = QString::fromLocal8Bit( zonefilebuf, len ); + zone = TQString::fromLocal8Bit( zonefilebuf, len ); zone = zone.mid( zone.find( "zoneinfo/" ) + 9 ); kdDebug(5300) << "system timezone from /etc/localtime is " << zone << endl; @@ -92,10 +92,10 @@ const QString KPimPrefs::timezone() return( zone ); } -QDateTime KPimPrefs::utcToLocalTime( const QDateTime &_dt, - const QString &timeZoneId ) +TQDateTime KPimPrefs::utcToLocalTime( const TQDateTime &_dt, + const TQString &timeZoneId ) { - QDateTime dt(_dt); + TQDateTime dt(_dt); // kdDebug() << "--- UTC: " << dt.toString() << endl; int yearCorrection = 0; @@ -112,7 +112,7 @@ QDateTime KPimPrefs::utcToLocalTime( const QDateTime &_dt, // kdDebug() << "--- Adjusted UTC: " << dt.toString() << endl; } - QCString origTz = getenv("TZ"); + TQCString origTz = getenv("TZ"); setenv( "TZ", "UTC", 1 ); time_t utcTime = dt.toTime_t(); @@ -127,18 +127,18 @@ QDateTime KPimPrefs::utcToLocalTime( const QDateTime &_dt, } tzset(); - QDateTime result( QDate( local->tm_year + 1900 - yearCorrection, + TQDateTime result( TQDate( local->tm_year + 1900 - yearCorrection, local->tm_mon + 1, local->tm_mday ), - QTime( local->tm_hour, local->tm_min, local->tm_sec ) ); + TQTime( local->tm_hour, local->tm_min, local->tm_sec ) ); // kdDebug() << "--- LOCAL: " << result.toString() << endl; return result; } -QDateTime KPimPrefs::localTimeToUtc( const QDateTime &_dt, - const QString &timeZoneId ) +TQDateTime KPimPrefs::localTimeToUtc( const TQDateTime &_dt, + const TQString &timeZoneId ) { - QDateTime dt(_dt); + TQDateTime dt(_dt); // kdDebug() << "--- LOCAL: " << dt.toString() << endl; int yearCorrection = 0; @@ -156,7 +156,7 @@ QDateTime KPimPrefs::localTimeToUtc( const QDateTime &_dt, // kdDebug() << "--- Adjusted LOCAL: " << dt.toString() << endl; } - QCString origTz = getenv("TZ"); + TQCString origTz = getenv("TZ"); setenv( "TZ", timeZoneId.local8Bit(), 1 ); time_t localTime = dt.toTime_t(); @@ -171,9 +171,9 @@ QDateTime KPimPrefs::localTimeToUtc( const QDateTime &_dt, } tzset(); - QDateTime result( QDate( utc->tm_year + 1900 - yearCorrection, + TQDateTime result( TQDate( utc->tm_year + 1900 - yearCorrection, utc->tm_mon + 1, utc->tm_mday ), - QTime( utc->tm_hour, utc->tm_min, utc->tm_sec ) ); + TQTime( utc->tm_hour, utc->tm_min, utc->tm_sec ) ); // kdDebug() << "--- UTC: " << result.toString() << endl; -- cgit v1.2.1