summaryrefslogtreecommitdiffstats
path: root/libkdepim/kpimprefs.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /libkdepim/kpimprefs.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/kpimprefs.cpp')
-rw-r--r--libkdepim/kpimprefs.cpp36
1 files changed, 18 insertions, 18 deletions
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 <unistd.h>
#include <stdlib.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kstandarddirs.h>
#include <kglobal.h>
@@ -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;