summaryrefslogtreecommitdiffstats
path: root/libkdepim/kpimprefs.cpp
diff options
context:
space:
mode:
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 1de00f92..730ed8f5 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;