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 /kmobile/kmobileclient.cpp | |
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 'kmobile/kmobileclient.cpp')
-rw-r--r-- | kmobile/kmobileclient.cpp | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/kmobile/kmobileclient.cpp b/kmobile/kmobileclient.cpp index 6da1b919e..63910fba1 100644 --- a/kmobile/kmobileclient.cpp +++ b/kmobile/kmobileclient.cpp @@ -17,7 +17,7 @@ */ -#include <qstringlist.h> +#include <tqstringlist.h> #include <ktrader.h> #include <klocale.h> @@ -36,10 +36,10 @@ KMobileClient::KMobileClient() m_kmobileObj = "kmobileIface"; bool ok = attach(); - PRINT_DEBUG << QString("attached to DCOP server %1\n").arg(ok?"sucessful.":"failed."); + PRINT_DEBUG << TQString("attached to DCOP server %1\n").arg(ok?"sucessful.":"failed."); // m_clientAppId = registerAs("kmobileclient"); -// PRINT_DEBUG << QString("registered as DCOP client %1\n").arg(m_clientAppId); +// PRINT_DEBUG << TQString("registered as DCOP client %1\n").arg(m_clientAppId); isKMobileAvailable(); } @@ -47,14 +47,14 @@ KMobileClient::KMobileClient() KMobileClient::~KMobileClient() { detach(); - PRINT_DEBUG << QString("detached from server\n"); + PRINT_DEBUG << TQString("detached from server\n"); } bool KMobileClient::isKMobileAvailable() { bool available = isApplicationRegistered(m_kmobileApp); - PRINT_DEBUG << QString("KMobile DCOP server: %1\n").arg(available?"available.":"not available"); + PRINT_DEBUG << TQString("KMobile DCOP server: %1\n").arg(available?"available.":"not available"); if (!available) { startKMobileApplication(); // check again... @@ -65,15 +65,15 @@ bool KMobileClient::isKMobileAvailable() bool KMobileClient::startKMobileApplication() { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); - QStringList params; + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); + TQStringList params; params << "--minimized"; - arg << QString("kmobile") << params; - QCString replyType; - QByteArray replyData; - bool ok = call("klauncher", "klauncher", "kdeinit_exec_wait(QString,QStringList)", data, replyType, replyData); - PRINT_DEBUG << QString("DCOP-CALL to klauncher: %1\n").arg(ok?"ok.":"failed."); + arg << TQString("kmobile") << params; + TQCString replyType; + TQByteArray replyData; + bool ok = call("klauncher", "klauncher", "kdeinit_exec_wait(TQString,TQStringList)", data, replyType, replyData); + PRINT_DEBUG << TQString("DCOP-CALL to klauncher: %1\n").arg(ok?"ok.":"failed."); return ok; } @@ -87,17 +87,17 @@ bool KMobileClient::startKMobileApplication() #define PREPARE( FUNC, PARAMS ) \ - QByteArray data; \ - QDataStream arg(data, IO_WriteOnly); \ + TQByteArray data; \ + TQDataStream arg(data, IO_WriteOnly); \ arg << PARAMS; \ - QCString replyType; \ - QByteArray replyData; \ + TQCString replyType; \ + TQByteArray replyData; \ bool ok = call(m_kmobileApp, m_kmobileObj, FUNC, data, replyType, replyData, KMOBILECLIENT_USE_EVENTLOOP, KMOBILECLIENT_TIMEOUT); \ - PRINT_DEBUG << QString("DCOP-CALL to %1: %2\n").arg(FUNC).arg(ok?"ok.":"FAILED.") + PRINT_DEBUG << TQString("DCOP-CALL to %1: %2\n").arg(FUNC).arg(ok?"ok.":"FAILED.") #define RETURN_TYPE( FUNC, PARAMS, RETURN_TYPE ) \ PREPARE( FUNC, PARAMS ); \ - QDataStream reply(replyData, IO_ReadOnly); \ + TQDataStream reply(replyData, IO_ReadOnly); \ RETURN_TYPE ret; \ if (ok) \ reply >> ret; \ @@ -105,14 +105,14 @@ bool KMobileClient::startKMobileApplication() #define RETURN_TYPE_DEFAULT( FUNC, PARAMS, RETURN_TYPE, RETURN_DEFAULT ) \ PREPARE( FUNC, PARAMS ); \ - QDataStream reply(replyData, IO_ReadOnly); \ + TQDataStream reply(replyData, IO_ReadOnly); \ RETURN_TYPE ret = RETURN_DEFAULT; \ if (ok) \ reply >> ret; \ return ret; #define RETURN_QSTRING( FUNC, PARAMS ) \ - RETURN_TYPE( FUNC, PARAMS, QString ) + RETURN_TYPE( FUNC, PARAMS, TQString ) #define RETURN_BOOL( FUNC, PARAMS ) \ RETURN_TYPE_DEFAULT( FUNC, PARAMS, bool, false ) @@ -122,110 +122,110 @@ bool KMobileClient::startKMobileApplication() -QStringList KMobileClient::deviceNames() +TQStringList KMobileClient::deviceNames() { if (!isKMobileAvailable()) - return QStringList(); - RETURN_TYPE( "deviceNames()", QString::fromLatin1(""), QStringList ); + return TQStringList(); + RETURN_TYPE( "deviceNames()", TQString::fromLatin1(""), TQStringList ); } -void KMobileClient::removeDevice( QString deviceName ) +void KMobileClient::removeDevice( TQString deviceName ) { - PREPARE( "removeDevice(QString)", deviceName ); + PREPARE( "removeDevice(TQString)", deviceName ); Q_UNUSED(ok); } -void KMobileClient::configDevice( QString deviceName ) +void KMobileClient::configDevice( TQString deviceName ) { - PREPARE( "configDevice(QString)", deviceName ); + PREPARE( "configDevice(TQString)", deviceName ); Q_UNUSED(ok); } -bool KMobileClient::connectDevice( QString deviceName ) +bool KMobileClient::connectDevice( TQString deviceName ) { - RETURN_BOOL( "connectDevice(QString)", deviceName ); + RETURN_BOOL( "connectDevice(TQString)", deviceName ); } -bool KMobileClient::disconnectDevice( QString deviceName ) +bool KMobileClient::disconnectDevice( TQString deviceName ) { - RETURN_BOOL( "disconnectDevice(QString)", deviceName ); + RETURN_BOOL( "disconnectDevice(TQString)", deviceName ); } -bool KMobileClient::connected( QString deviceName ) +bool KMobileClient::connected( TQString deviceName ) { - RETURN_BOOL( "connected(QString)", deviceName ); + RETURN_BOOL( "connected(TQString)", deviceName ); } -QString KMobileClient::deviceClassName( QString deviceName ) +TQString KMobileClient::deviceClassName( TQString deviceName ) { - RETURN_QSTRING( "deviceClassName(QString)", deviceName ); + RETURN_QSTRING( "deviceClassName(TQString)", deviceName ); } -QString KMobileClient::deviceName( QString deviceName ) +TQString KMobileClient::deviceName( TQString deviceName ) { - RETURN_QSTRING( "deviceName(QString)", deviceName ); + RETURN_QSTRING( "deviceName(TQString)", deviceName ); } -QString KMobileClient::revision( QString deviceName ) +TQString KMobileClient::revision( TQString deviceName ) { - RETURN_QSTRING( "revision(QString)", deviceName ); + RETURN_QSTRING( "revision(TQString)", deviceName ); } -int KMobileClient::classType( QString deviceName ) +int KMobileClient::classType( TQString deviceName ) { - RETURN_INT( "classType(QString)", deviceName ); + RETURN_INT( "classType(TQString)", deviceName ); } -int KMobileClient::capabilities( QString deviceName ) +int KMobileClient::capabilities( TQString deviceName ) { - RETURN_INT( "capabilities(QString)", deviceName ); + RETURN_INT( "capabilities(TQString)", deviceName ); } -QString KMobileClient::nameForCap( QString deviceName, int cap ) +TQString KMobileClient::nameForCap( TQString deviceName, int cap ) { - RETURN_QSTRING( "nameForCap(QString,int)", deviceName << cap ); + RETURN_QSTRING( "nameForCap(TQString,int)", deviceName << cap ); } -QString KMobileClient::iconFileName( QString deviceName ) +TQString KMobileClient::iconFileName( TQString deviceName ) { - RETURN_QSTRING( "iconFileName(QString)", deviceName ); + RETURN_QSTRING( "iconFileName(TQString)", deviceName ); } -int KMobileClient::numAddresses( QString deviceName ) +int KMobileClient::numAddresses( TQString deviceName ) { - RETURN_INT( "numAddresses(QString)", deviceName ); + RETURN_INT( "numAddresses(TQString)", deviceName ); } -QString KMobileClient::readAddress( QString deviceName, int index ) +TQString KMobileClient::readAddress( TQString deviceName, int index ) { - RETURN_QSTRING( "readAddress(QString,int)", deviceName << index ); + RETURN_QSTRING( "readAddress(TQString,int)", deviceName << index ); } -bool KMobileClient::storeAddress( QString deviceName, int index, QString vcard, bool append ) +bool KMobileClient::storeAddress( TQString deviceName, int index, TQString vcard, bool append ) { - RETURN_BOOL( "storeAddress(QString,int,QString,bool)", deviceName << index << vcard << append ); + RETURN_BOOL( "storeAddress(TQString,int,TQString,bool)", deviceName << index << vcard << append ); } -int KMobileClient::numCalendarEntries( QString deviceName ) +int KMobileClient::numCalendarEntries( TQString deviceName ) { - RETURN_INT( "numCalendarEntries(QString)", deviceName ); + RETURN_INT( "numCalendarEntries(TQString)", deviceName ); } -int KMobileClient::numNotes( QString deviceName ) +int KMobileClient::numNotes( TQString deviceName ) { - RETURN_INT( "numNotes(QString)", deviceName ); + RETURN_INT( "numNotes(TQString)", deviceName ); } -QString KMobileClient::readNote( QString deviceName, int index ) +TQString KMobileClient::readNote( TQString deviceName, int index ) { - RETURN_QSTRING( "readNote(QString,int)", deviceName << index ); + RETURN_QSTRING( "readNote(TQString,int)", deviceName << index ); } -bool KMobileClient::storeNote( QString deviceName, int index, QString note ) +bool KMobileClient::storeNote( TQString deviceName, int index, TQString note ) { - RETURN_BOOL( "storeNote(QString,int,QString)", deviceName << index << note ); + RETURN_BOOL( "storeNote(TQString,int,TQString)", deviceName << index << note ); } |