summaryrefslogtreecommitdiffstats
path: root/kitchensync/opensyncdbus/dbusclient.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 /kitchensync/opensyncdbus/dbusclient.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 'kitchensync/opensyncdbus/dbusclient.cpp')
-rw-r--r--kitchensync/opensyncdbus/dbusclient.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kitchensync/opensyncdbus/dbusclient.cpp b/kitchensync/opensyncdbus/dbusclient.cpp
index fcf6eda30..f992350cf 100644
--- a/kitchensync/opensyncdbus/dbusclient.cpp
+++ b/kitchensync/opensyncdbus/dbusclient.cpp
@@ -29,8 +29,8 @@
#include <dbus/qdbusmessage.h>
#include <dbus/qdbusproxy.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include <iostream>
@@ -58,7 +58,7 @@ bool OpenSyncService::handleMethodCall( const QDBusMessage &message )
QDBusMessage reply;
- QString function = message.member();
+ TQString function = message.member();
if ( function == "hello" ) {
reply = hello( message );
} else if ( function == "randomNumber" ) {
@@ -84,11 +84,11 @@ QDBusMessage OpenSyncService::showMember( const QDBusMessage &message )
{
if ( message.count() != 2 ) {
return error( message, "arg_count",
- QString("Wrong number of arguments. Expected 2, got %1.")
+ TQString("Wrong number of arguments. Expected 2, got %1.")
.arg( message.count() ) );
}
- QString groupName = message[ 0 ].toString();
+ TQString groupName = message[ 0 ].toString();
if ( groupName.isEmpty() ) {
return error( message, "missing_arg", "Missing argument: group name." );
}
@@ -110,14 +110,14 @@ QDBusMessage OpenSyncService::showMember( const QDBusMessage &message )
QSync::Group group = env.groupByName( groupName );
if ( !group.isValid() ) {
- return error( message, "group_name", QString("Unknown group '%1'.")
+ return error( message, "group_name", TQString("Unknown group '%1'.")
.arg( groupName ) );
}
QSync::Member member = group.memberById( memberId );
if ( !member.isValid() ) {
return error( message, "member_id",
- QString("Unknown member id '%1' in group '%2'.").arg( groupName )
+ TQString("Unknown member id '%1' in group '%2'.").arg( groupName )
.arg( memberId ) );
}
@@ -135,11 +135,11 @@ QDBusMessage OpenSyncService::showGroup( const QDBusMessage &message )
{
if ( message.count() != 1 ) {
return error( message, "arg_count",
- QString("Wrong number of arguments. Expected 1, got %1")
+ TQString("Wrong number of arguments. Expected 1, got %1")
.arg( message.count() ) );
}
- QString groupName = message[ 0 ].toString();
+ TQString groupName = message[ 0 ].toString();
if ( groupName.isEmpty() ) {
return error( message, "missing_arg", "Missing argument group name." );
}
@@ -155,14 +155,14 @@ QDBusMessage OpenSyncService::showGroup( const QDBusMessage &message )
QSync::Group group = env.groupByName( groupName );
if ( !group.isValid() ) {
- return error( message, "group_name", QString("Unknown group '%1'")
+ return error( message, "group_name", TQString("Unknown group '%1'")
.arg( groupName ) );
}
QSync::Group::Iterator it( &group );
for( it = group.begin(); it != group.end(); ++it ) {
QSync::Member member = *it;
- reply.append( QVariant( member.id() ) );
+ reply.append( TQVariant( member.id() ) );
}
env.finalize();
@@ -172,8 +172,8 @@ QDBusMessage OpenSyncService::showGroup( const QDBusMessage &message )
}
QDBusMessage OpenSyncService::error( const QDBusMessage &message,
- const QString &errorCode,
- const QString &errorMessage )
+ const TQString &errorCode,
+ const TQString &errorMessage )
{
QDBusError error( "org.opensync." + errorCode, errorMessage );
return QDBusMessage::methodError( message, error );
@@ -193,7 +193,7 @@ QDBusMessage OpenSyncService::listPlugins( const QDBusMessage &message )
QSync::Environment::PluginIterator it( env.pluginBegin() );
for ( ; it != env.pluginEnd(); ++it ) {
- reply.append( QVariant( (*it).name() ) );
+ reply.append( TQVariant( (*it).name() ) );
}
env.finalize();
@@ -216,7 +216,7 @@ QDBusMessage OpenSyncService::listGroups( const QDBusMessage &message )
QSync::Environment::GroupIterator it( env.groupBegin() );
for ( ; it != env.groupEnd(); ++it ) {
- reply.append( QVariant( (*it).name() ) );
+ reply.append( TQVariant( (*it).name() ) );
}
env.finalize();
@@ -232,7 +232,7 @@ QDBusMessage OpenSyncService::hello( const QDBusMessage &message )
// QDBusError error;
// reply = QDBusMessage::methodError( message, error );
- reply.append( QVariant( QString( "Hello!" ) ) );
+ reply.append( TQVariant( TQString( "Hello!" ) ) );
return reply;
}
@@ -243,14 +243,14 @@ QDBusMessage OpenSyncService::randomNumber( const QDBusMessage &message )
int number = rand();
- reply.append( QVariant( number ) );
+ reply.append( TQVariant( number ) );
return reply;
}
int main( int argc, char *argv[] )
{
- QApplication app(argc, argv);
+ TQApplication app(argc, argv);
std::cout << "Hello" << std::endl;