diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kpilot/lib/pilot.cc | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-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 'kpilot/lib/pilot.cc')
-rw-r--r-- | kpilot/lib/pilot.cc | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/kpilot/lib/pilot.cc b/kpilot/lib/pilot.cc index 2585445c1..6a1267a9b 100644 --- a/kpilot/lib/pilot.cc +++ b/kpilot/lib/pilot.cc @@ -31,8 +31,8 @@ #include "options.h" -#include <qtextcodec.h> -#include <qmutex.h> +#include <tqtextcodec.h> +#include <tqmutex.h> #include <kcharsets.h> #include <kglobal.h> @@ -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; |