diff options
Diffstat (limited to 'kitchensync/opensyncdbus/dbusclient.cpp')
-rw-r--r-- | kitchensync/opensyncdbus/dbusclient.cpp | 36 |
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; |