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 --- kpilot/lib/pilot.cc | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'kpilot/lib/pilot.cc') diff --git a/kpilot/lib/pilot.cc b/kpilot/lib/pilot.cc index 2585445c..6a1267a9 100644 --- a/kpilot/lib/pilot.cc +++ b/kpilot/lib/pilot.cc @@ -31,8 +31,8 @@ #include "options.h" -#include -#include +#include +#include #include #include @@ -44,41 +44,41 @@ namespace Pilot { -static QTextCodec *codec = 0L; -static QMutex* mutex = 0L; +static TQTextCodec *codec = 0L; +static TQMutex* mutex = 0L; -QString fromPilot( const char *c, int len ) +TQString fromPilot( const char *c, int len ) { mutex->lock(); - QString str = codec->toUnicode(c,len); + TQString str = codec->toUnicode(c,len); mutex->unlock(); return str; } -QString fromPilot( const char *c ) +TQString fromPilot( const char *c ) { mutex->lock(); - QString str = codec->toUnicode(c); + TQString str = codec->toUnicode(c); mutex->unlock(); return str; } -QCString toPilot( const QString &s ) +TQCString toPilot( const TQString &s ) { mutex->lock(); - QCString str = codec->fromUnicode(s); + TQCString str = codec->fromUnicode(s); mutex->unlock(); return str; } -int toPilot( const QString &s, char *buf, int len) +int toPilot( const TQString &s, char *buf, int len) { mutex->lock(); // See toPilot() below. memset( buf, 0, len ); int used = len; - QCString cbuf = codec->fromUnicode(s,used); + TQCString cbuf = codec->fromUnicode(s,used); if (used > len) { used=len; @@ -88,7 +88,7 @@ int toPilot( const QString &s, char *buf, int len) return used; } -int toPilot( const QString &s, unsigned char *buf, int len) +int toPilot( const TQString &s, unsigned char *buf, int len) { mutex->lock(); // Clear the buffer @@ -96,7 +96,7 @@ int toPilot( const QString &s, unsigned char *buf, int len) // Convert to 8-bit encoding int used = len; - QCString cbuf = codec->fromUnicode(s,used); + TQCString cbuf = codec->fromUnicode(s,used); // Will it fit in the buffer? if (used > len) @@ -113,12 +113,12 @@ int toPilot( const QString &s, unsigned char *buf, int len) return used; } -bool setupPilotCodec(const QString &s) +bool setupPilotCodec(const TQString &s) { FUNCTIONSETUP; - mutex = new QMutex(); + mutex = new TQMutex(); mutex->lock(); - QString encoding(KGlobal::charsets()->encodingForName(s)); + TQString encoding(KGlobal::charsets()->encodingForName(s)); DEBUGKPILOT << fname << ": Using codec name " << s << endl; DEBUGKPILOT << fname << ": Creating codec " << encoding << endl; @@ -135,20 +135,20 @@ bool setupPilotCodec(const QString &s) return codec; } -QString codecName() +TQString codecName() { - return QString::fromLatin1(codec->name()); + return TQString::fromLatin1(codec->name()); } -QString category(const struct CategoryAppInfo *info, unsigned int i) +TQString category(const struct CategoryAppInfo *info, unsigned int i) { if (!info || (i>=CATEGORY_COUNT)) { - return QString::null; + return TQString::null; } mutex->lock(); - QString str = codec->toUnicode(info->name[i], + TQString str = codec->toUnicode(info->name[i], MIN(strlen(info->name[i]), CATEGORY_SIZE-1)); mutex->unlock(); return str; @@ -156,7 +156,7 @@ QString category(const struct CategoryAppInfo *info, unsigned int i) int findCategory(const struct CategoryAppInfo *info, - const QString &selectedCategory, + const TQString &selectedCategory, bool unknownIsUnfiled) { FUNCTIONSETUP; @@ -194,7 +194,7 @@ int findCategory(const struct CategoryAppInfo *info, } int insertCategory(struct CategoryAppInfo *info, - const QString &label, + const TQString &label, bool unknownIsUnfiled) { FUNCTIONSETUP; -- cgit v1.2.3