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 --- kresources/egroupware/debugdialog.cpp | 20 +- kresources/egroupware/debugdialog.h | 8 +- kresources/egroupware/kabc_resourcexmlrpc.cpp | 202 ++++++------ kresources/egroupware/kabc_resourcexmlrpc.h | 46 +-- .../egroupware/kabc_resourcexmlrpcconfig.cpp | 18 +- kresources/egroupware/kabc_resourcexmlrpcconfig.h | 2 +- kresources/egroupware/kcal_resourcexmlrpc.cpp | 346 ++++++++++----------- kresources/egroupware/kcal_resourcexmlrpc.h | 70 ++--- .../egroupware/kcal_resourcexmlrpcconfig.cpp | 18 +- kresources/egroupware/kcal_resourcexmlrpcconfig.h | 2 +- kresources/egroupware/knotes_resourcexmlrpc.cpp | 94 +++--- kresources/egroupware/knotes_resourcexmlrpc.h | 30 +- .../egroupware/knotes_resourcexmlrpcconfig.cpp | 18 +- .../egroupware/knotes_resourcexmlrpcconfig.h | 2 +- kresources/egroupware/synchronizer.cpp | 4 +- kresources/egroupware/synchronizer.h | 6 +- kresources/egroupware/todostatemapper.cpp | 38 +-- kresources/egroupware/todostatemapper.h | 34 +- kresources/egroupware/xmlrpciface.cpp | 280 ++++++++--------- kresources/egroupware/xmlrpciface.h | 160 +++++----- 20 files changed, 699 insertions(+), 699 deletions(-) (limited to 'kresources/egroupware') diff --git a/kresources/egroupware/debugdialog.cpp b/kresources/egroupware/debugdialog.cpp index 117db3243..9d45dab75 100644 --- a/kresources/egroupware/debugdialog.cpp +++ b/kresources/egroupware/debugdialog.cpp @@ -18,9 +18,9 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include @@ -37,8 +37,8 @@ DebugDialog::DebugDialog() "Debug Dialog", false, i18n("Debug Dialog"), User1 | User2 | Ok, Ok, true ) { - QWidget *page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() ); + TQWidget *page = plainPage(); + TQVBoxLayout *layout = new TQVBoxLayout( page, marginHint(), spacingHint() ); mView = new KTextBrowser( page ); layout->addWidget( mView ); @@ -68,7 +68,7 @@ DebugDialog::~DebugDialog() mSelf = 0; } -void DebugDialog::addMessage( const QString &msg, Type type ) +void DebugDialog::addMessage( const TQString &msg, Type type ) { if ( mSelf ) mSelf->addText( msg, type ); @@ -82,11 +82,11 @@ void DebugDialog::clear() void DebugDialog::save() { - QString fileName = QFileDialog::getSaveFileName(); + TQString fileName = TQFileDialog::getSaveFileName(); if ( fileName.isEmpty() ) return; - QFile file( fileName ); + TQFile file( fileName ); if ( !file.open( IO_WriteOnly ) ) { qWarning( "Couldn't open file %s", file.name().latin1() ); return; @@ -106,9 +106,9 @@ void DebugDialog::slotUser2() clear(); } -void DebugDialog::addText( const QString &text, Type type ) +void DebugDialog::addText( const TQString &text, Type type ) { - QString htmlCode( text ); + TQString htmlCode( text ); htmlCode.replace( "<", "<" ); htmlCode.replace( ">", ">" ); htmlCode.replace( "\n", "
" ); diff --git a/kresources/egroupware/debugdialog.h b/kresources/egroupware/debugdialog.h index c5f91377f..c28987711 100644 --- a/kresources/egroupware/debugdialog.h +++ b/kresources/egroupware/debugdialog.h @@ -53,7 +53,7 @@ class DebugDialog : public KDialogBase /** Adds a message, which will be shown by the dialog. */ - static void addMessage( const QString &msg, Type type ); + static void addMessage( const TQString &msg, Type type ); private slots: void clear(); @@ -67,10 +67,10 @@ class DebugDialog : public KDialogBase DebugDialog(); static DebugDialog *mSelf; - void addText( const QString&, Type ); + void addText( const TQString&, Type ); - QStringList mMessages; - QStringList mHTMLMessages; + TQStringList mMessages; + TQStringList mHTMLMessages; KTextBrowser *mView; }; diff --git a/kresources/egroupware/kabc_resourcexmlrpc.cpp b/kresources/egroupware/kabc_resourcexmlrpc.cpp index eba630cc3..ee1e74bea 100644 --- a/kresources/egroupware/kabc_resourcexmlrpc.cpp +++ b/kresources/egroupware/kabc_resourcexmlrpc.cpp @@ -18,7 +18,7 @@ Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -41,15 +41,15 @@ using namespace KABC; -static const QString SearchContactsCommand = "addressbook.boaddressbook.search"; -static const QString AddContactCommand = "addressbook.boaddressbook.write"; -static const QString DeleteContactCommand = "addressbook.boaddressbook.delete"; -static const QString LoadCategoriesCommand = "addressbook.boaddressbook.categories"; -static const QString LoadCustomFieldsCommand = "addressbook.boaddressbook.customfields"; +static const TQString SearchContactsCommand = "addressbook.boaddressbook.search"; +static const TQString AddContactCommand = "addressbook.boaddressbook.write"; +static const TQString DeleteContactCommand = "addressbook.boaddressbook.delete"; +static const TQString LoadCategoriesCommand = "addressbook.boaddressbook.categories"; +static const TQString LoadCustomFieldsCommand = "addressbook.boaddressbook.customfields"; static void setRights( KABC::Addressee &addr, int rights ) { - addr.insertCustom( "EGWRESOURCE", "RIGHTS", QString::number( rights ) ); + addr.insertCustom( "EGWRESOURCE", "RIGHTS", TQString::number( rights ) ); } static int rights( const KABC::Addressee &addr ) @@ -70,8 +70,8 @@ ResourceXMLRPC::ResourceXMLRPC( const KConfig *config ) initEGroupware(); } -ResourceXMLRPC::ResourceXMLRPC( const QString &url, const QString &domain, - const QString &user, const QString &password ) +ResourceXMLRPC::ResourceXMLRPC( const TQString &url, const TQString &domain, + const TQString &user, const TQString &password ) : ResourceCached( 0 ), mServer( 0 ) { init(); @@ -150,14 +150,14 @@ bool ResourceXMLRPC::doOpen() mServer->setUrl( KURL( mPrefs->url() ) ); mServer->setUserAgent( "KDE-AddressBook" ); - QMap args; + TQMap args; args.insert( "domain", mPrefs->domain() ); args.insert( "username", mPrefs->user() ); args.insert( "password", mPrefs->password() ); - mServer->call( "system.login", QVariant( args ), - this, SLOT( loginFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( "system.login", TQVariant( args ), + this, TQT_SLOT( loginFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); mSynchronizer->start(); @@ -166,13 +166,13 @@ bool ResourceXMLRPC::doOpen() void ResourceXMLRPC::doClose() { - QMap args; + TQMap args; args.insert( "sessionid", mSessionID ); args.insert( "kp3", mKp3 ); - mServer->call( "system.logout", QVariant( args ), - this, SLOT( logoutFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( "system.logout", TQVariant( args ), + this, TQT_SLOT( logoutFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); mSynchronizer->start(); } @@ -193,7 +193,7 @@ bool ResourceXMLRPC::asyncLoad() loadCache(); - QMap args; + TQMap args; args.insert( "start", "0" ); args.insert( "query", "" ); args.insert( "filter", "" ); @@ -202,16 +202,16 @@ bool ResourceXMLRPC::asyncLoad() args.insert( "include_users", "calendar" ); mServer->call( SearchContactsCommand, args, - this, SLOT( listContactsFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + this, TQT_SLOT( listContactsFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); - mServer->call( LoadCategoriesCommand, QVariant( false, 0 ), - this, SLOT( loadCategoriesFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( LoadCategoriesCommand, TQVariant( false, 0 ), + this, TQT_SLOT( loadCategoriesFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); - mServer->call( LoadCustomFieldsCommand, QVariant( QValueList() ), - this, SLOT( loadCustomFieldsFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( LoadCustomFieldsCommand, TQVariant( TQValueList() ), + this, TQT_SLOT( loadCustomFieldsFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); return true; } @@ -246,13 +246,13 @@ bool ResourceXMLRPC::asyncSave( Ticket* ) void ResourceXMLRPC::addContact( const Addressee& addr ) { - QMap args; + TQMap args; writeContact( addr, args ); mServer->call( AddContactCommand, args, - this, SLOT( addContactFinished( const QValueList&, const QVariant& ) ), - this, SLOT( addContactFault( int, const QString&, const QVariant& ) ), - QVariant( addr.uid() ) ); + this, TQT_SLOT( addContactFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( addContactFault( int, const TQString&, const TQVariant& ) ), + TQVariant( addr.uid() ) ); } void ResourceXMLRPC::updateContact( const Addressee& addr ) @@ -262,14 +262,14 @@ void ResourceXMLRPC::updateContact( const Addressee& addr ) return; } - QMap args; + TQMap args; writeContact( addr, args ); args.insert( "id", idMapper().remoteId( addr.uid() ) ); mServer->call( AddContactCommand, args, - this, SLOT( updateContactFinished( const QValueList&, const QVariant& ) ), - this, SLOT( updateContactFault( int, const QString&, const QVariant& ) ), - QVariant( addr.uid() ) ); + this, TQT_SLOT( updateContactFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( updateContactFault( int, const TQString&, const TQVariant& ) ), + TQVariant( addr.uid() ) ); } void ResourceXMLRPC::deleteContact( const Addressee& addr ) @@ -281,15 +281,15 @@ void ResourceXMLRPC::deleteContact( const Addressee& addr ) } mServer->call( DeleteContactCommand, idMapper().remoteId( addr.uid() ), - this, SLOT( deleteContactFinished( const QValueList&, const QVariant& ) ), - this, SLOT( deleteContactFault( int, const QString&, const QVariant& ) ), - QVariant( addr.uid() ) ); + this, TQT_SLOT( deleteContactFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( deleteContactFault( int, const TQString&, const TQVariant& ) ), + TQVariant( addr.uid() ) ); } -void ResourceXMLRPC::loginFinished( const QValueList &variant, - const QVariant& ) +void ResourceXMLRPC::loginFinished( const TQValueList &variant, + const TQVariant& ) { - QMap map = variant[0].toMap(); + TQMap map = variant[0].toMap(); KURL url( mPrefs->url() ); if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed @@ -307,10 +307,10 @@ void ResourceXMLRPC::loginFinished( const QValueList &variant, mSynchronizer->stop(); } -void ResourceXMLRPC::logoutFinished( const QValueList &variant, - const QVariant& ) +void ResourceXMLRPC::logoutFinished( const TQValueList &variant, + const TQVariant& ) { - QMap map = variant[0].toMap(); + TQMap map = variant[0].toMap(); if ( map[ "GOODBYE" ].toString() != "XOXO" ) addressBook()->error( i18n( "Logout failed, please check your username and password." ) ); @@ -324,18 +324,18 @@ void ResourceXMLRPC::logoutFinished( const QValueList &variant, mSynchronizer->stop(); } -void ResourceXMLRPC::listContactsFinished( const QValueList &mapList, - const QVariant& ) +void ResourceXMLRPC::listContactsFinished( const TQValueList &mapList, + const TQVariant& ) { - const QValueList contactList = mapList[ 0 ].toList(); - QValueList::ConstIterator contactIt; + const TQValueList contactList = mapList[ 0 ].toList(); + TQValueList::ConstIterator contactIt; KABC::Addressee::List serverContacts; for ( contactIt = contactList.begin(); contactIt != contactList.end(); ++contactIt ) { - const QMap map = (*contactIt).toMap(); + const TQMap map = (*contactIt).toMap(); Addressee addr; - QString uid; + TQString uid; readContact( map, addr, uid ); @@ -343,7 +343,7 @@ void ResourceXMLRPC::listContactsFinished( const QValueList &mapList, addr.setResource( this ); addr.setChanged( false ); - QString local = idMapper().localId( uid ); + TQString local = idMapper().localId( uid ); if ( local.isEmpty() ) { // new entry idMapper().setRemoteId( addr.uid(), uid ); } else { @@ -361,8 +361,8 @@ void ResourceXMLRPC::listContactsFinished( const QValueList &mapList, emit loadingFinished( this ); } -void ResourceXMLRPC::addContactFinished( const QValueList &list, - const QVariant &id ) +void ResourceXMLRPC::addContactFinished( const TQValueList &list, + const TQVariant &id ) { clearChange( id.toString() ); idMapper().setRemoteId( id.toString(), list[ 0 ].toString() ); @@ -370,16 +370,16 @@ void ResourceXMLRPC::addContactFinished( const QValueList &list, saveCache(); } -void ResourceXMLRPC::updateContactFinished( const QValueList&, - const QVariant &id ) +void ResourceXMLRPC::updateContactFinished( const TQValueList&, + const TQVariant &id ) { clearChange( id.toString() ); saveCache(); } -void ResourceXMLRPC::deleteContactFinished( const QValueList&, - const QVariant &id ) +void ResourceXMLRPC::deleteContactFinished( const TQValueList&, + const TQVariant &id ) { clearChange( id.toString() ); idMapper().removeRemoteId( idMapper().remoteId( id.toString() ) ); @@ -387,38 +387,38 @@ void ResourceXMLRPC::deleteContactFinished( const QValueList&, saveCache(); } -void ResourceXMLRPC::fault( int error, const QString &errorMsg, - const QVariant& ) +void ResourceXMLRPC::fault( int error, const TQString &errorMsg, + const TQVariant& ) { - QString msg = i18n( "Server sent error %1: %2" ).arg( error ).arg( errorMsg ); + TQString msg = i18n( "Server sent error %1: %2" ).arg( error ).arg( errorMsg ); if ( addressBook() ) addressBook()->error( msg ); mSynchronizer->stop(); } -void ResourceXMLRPC::addContactFault( int, const QString &errorMsg, - const QVariant &id ) +void ResourceXMLRPC::addContactFault( int, const TQString &errorMsg, + const TQVariant &id ) { KABC::Addressee addr = mAddrMap[ id.toString() ]; mAddrMap.remove( addr.uid() ); - QString msg = i18n( "Unable to add contact %1 to server. (%2)" ); + TQString msg = i18n( "Unable to add contact %1 to server. (%2)" ); addressBook()->error( msg.arg( addr.formattedName(), errorMsg ) ); } -void ResourceXMLRPC::updateContactFault( int, const QString &errorMsg, - const QVariant &id ) +void ResourceXMLRPC::updateContactFault( int, const TQString &errorMsg, + const TQVariant &id ) { KABC::Addressee addr = mAddrMap[ id.toString() ]; - QString msg = i18n( "Unable to update contact %1 on server. (%2)" ); + TQString msg = i18n( "Unable to update contact %1 on server. (%2)" ); addressBook()->error( msg.arg( addr.formattedName(), errorMsg ) ); } -void ResourceXMLRPC::deleteContactFault( int, const QString &errorMsg, - const QVariant &id ) +void ResourceXMLRPC::deleteContactFault( int, const TQString &errorMsg, + const TQVariant &id ) { KABC::Addressee addr; @@ -433,14 +433,14 @@ void ResourceXMLRPC::deleteContactFault( int, const QString &errorMsg, mAddrMap.insert( addr.uid(), addr ); - QString msg = i18n( "Unable to delete contact %1 from server. (%2)" ); + TQString msg = i18n( "Unable to delete contact %1 from server. (%2)" ); addressBook()->error( msg.arg( addr.formattedName(), errorMsg ) ); } -QString ResourceXMLRPC::addrTypesToTypeStr( int typeMask ) +TQString ResourceXMLRPC::addrTypesToTypeStr( int typeMask ) { - QStringList types; - QMap::ConstIterator it; + TQStringList types; + TQMap::ConstIterator it; for ( it = mAddrTypes.begin(); it != mAddrTypes.end(); ++it ) if ( it.data() & typeMask ) types.append( it.key() ); @@ -448,7 +448,7 @@ QString ResourceXMLRPC::addrTypesToTypeStr( int typeMask ) return types.join( ";" ); } -void ResourceXMLRPC::writeContact( const Addressee &addr, QMap &args ) +void ResourceXMLRPC::writeContact( const Addressee &addr, TQMap &args ) { args.insert( "access", ( addr.secrecy().type() == Secrecy::Private ? "private" : "public" ) ); args.insert( "fn", addr.formattedName() ); @@ -470,17 +470,17 @@ void ResourceXMLRPC::writeContact( const Addressee &addr, QMap catMap; + TQMap catMap; int counter = 0; for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { - QMap::ConstIterator it = mCategoryMap.find( *catIt ); + TQMap::ConstIterator it = mCategoryMap.find( *catIt ); if ( it == mCategoryMap.end() ) // new category - catMap.insert( QString::number( counter-- ), *catIt ); + catMap.insert( TQString::number( counter-- ), *catIt ); else - catMap.insert( QString::number( it.data() ), *catIt ); + catMap.insert( TQString::number( it.data() ), *catIt ); } args.insert( "cat_id", catMap ); @@ -569,15 +569,15 @@ void ResourceXMLRPC::writeContact( const Addressee &addr, QMapreadUrl( addr.preferredEmail() ); + TQString url = KCal::FreeBusyUrlStore::self()->readUrl( addr.preferredEmail() ); if ( !url.isEmpty() ) args.insert( "freebusy_url", url ); } -void ResourceXMLRPC::readContact( const QMap &args, Addressee &addr, QString &uid ) +void ResourceXMLRPC::readContact( const TQMap &args, Addressee &addr, TQString &uid ) { Address addrOne, addrTwo; - QMap::ConstIterator it; + TQMap::ConstIterator it; for ( it = args.begin(); it != args.end(); ++it ) { if ( it.key() == "id" ) { uid = it.data().toString(); @@ -647,7 +647,7 @@ void ResourceXMLRPC::readContact( const QMap &args, Addressee } else if ( it.key() == "adr_one_countryname" ) { addrOne.setCountry( it.data().toString() ); } else if ( it.key() == "adr_one_type" ) { - QStringList types = QStringList::split( ';', it.data().toString() ); + TQStringList types = TQStringList::split( ';', it.data().toString() ); int type = Address::Work; for ( uint i = 0; i < types.count(); ++i ) @@ -667,7 +667,7 @@ void ResourceXMLRPC::readContact( const QMap &args, Addressee } else if ( it.key() == "adr_two_countryname" ) { addrTwo.setCountry( it.data().toString() ); } else if ( it.key() == "adr_two_type" ) { - QStringList types = QStringList::split( ';', it.data().toString() ); + TQStringList types = TQStringList::split( ';', it.data().toString() ); int type = Address::Home; for ( uint i = 0; i < types.count(); ++i ) @@ -707,8 +707,8 @@ void ResourceXMLRPC::readContact( const QMap &args, Addressee addr.insertEmail( it.data().toString(), false ); } else if ( it.key() == "email_home_type" ) { } else if ( it.key() == "cat_id" ) { - const QMap categories = it.data().toMap(); - QMap::ConstIterator it; + const TQMap categories = it.data().toMap(); + TQMap::ConstIterator it; for ( it = categories.begin(); it != categories.end(); ++it ) addr.insertCategory( it.data().toString() ); @@ -717,7 +717,7 @@ void ResourceXMLRPC::readContact( const QMap &args, Addressee } } - QMap::ConstIterator cfIt; + TQMap::ConstIterator cfIt; for ( cfIt = mCustomFieldsMap.begin(); cfIt != mCustomFieldsMap.end(); ++cfIt ) { if ( args[ cfIt.key() ].toString().isEmpty() ) continue; @@ -736,19 +736,19 @@ void ResourceXMLRPC::readContact( const QMap &args, Addressee addr.insertAddress( addrTwo ); } -void ResourceXMLRPC::loadCategoriesFinished( const QValueList &mapList, - const QVariant& ) +void ResourceXMLRPC::loadCategoriesFinished( const TQValueList &mapList, + const TQVariant& ) { mCategoryMap.clear(); - const QMap map = mapList[ 0 ].toMap(); - QMap::ConstIterator it; + const TQMap map = mapList[ 0 ].toMap(); + TQMap::ConstIterator it; KABPrefs *prefs = KABPrefs::instance(); for ( it = map.begin(); it != map.end(); ++it ) { mCategoryMap.insert( it.data().toString(), it.key().toInt() ); - QStringList categories = prefs->customCategories(); + TQStringList categories = prefs->customCategories(); if ( categories.find( it.data().toString() ) == categories.end() ) categories.append( it.data().toString() ); @@ -756,13 +756,13 @@ void ResourceXMLRPC::loadCategoriesFinished( const QValueList &mapList } } -void ResourceXMLRPC::loadCustomFieldsFinished( const QValueList &mapList, - const QVariant& ) +void ResourceXMLRPC::loadCustomFieldsFinished( const TQValueList &mapList, + const TQVariant& ) { mCustomFieldsMap.clear(); - const QMap map = mapList[ 0 ].toMap(); - QMap::ConstIterator it; + const TQMap map = mapList[ 0 ].toMap(); + TQMap::ConstIterator it; for ( it = map.begin(); it != map.end(); ++it ) mCustomFieldsMap.insert( it.key(), it.data().toString() ); diff --git a/kresources/egroupware/kabc_resourcexmlrpc.h b/kresources/egroupware/kabc_resourcexmlrpc.h index 57bbd903a..0ce56a038 100644 --- a/kresources/egroupware/kabc_resourcexmlrpc.h +++ b/kresources/egroupware/kabc_resourcexmlrpc.h @@ -21,7 +21,7 @@ #ifndef KABC_RESOURCEXMLRPC_H #define KABC_RESOURCEXMLRPC_H -#include +#include #include #include "libkdepim/kabcresourcecached.h" @@ -43,8 +43,8 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached public: ResourceXMLRPC( const KConfig* ); - ResourceXMLRPC( const QString &url, const QString &domain, - const QString &user, const QString &password ); + ResourceXMLRPC( const TQString &url, const TQString &domain, + const TQString &user, const TQString &password ); ~ResourceXMLRPC(); virtual void writeConfig( KConfig* ); @@ -66,20 +66,20 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached void init(); protected slots: - void loginFinished( const QValueList&, const QVariant& ); - void logoutFinished( const QValueList&, const QVariant& ); + void loginFinished( const TQValueList&, const TQVariant& ); + void logoutFinished( const TQValueList&, const TQVariant& ); - void listContactsFinished( const QValueList&, const QVariant& ); - void addContactFinished( const QValueList&, const QVariant& ); - void updateContactFinished( const QValueList&, const QVariant& ); - void deleteContactFinished( const QValueList&, const QVariant& ); - void loadCategoriesFinished( const QValueList&, const QVariant& ); - void loadCustomFieldsFinished( const QValueList&, const QVariant& ); + void listContactsFinished( const TQValueList&, const TQVariant& ); + void addContactFinished( const TQValueList&, const TQVariant& ); + void updateContactFinished( const TQValueList&, const TQVariant& ); + void deleteContactFinished( const TQValueList&, const TQVariant& ); + void loadCategoriesFinished( const TQValueList&, const TQVariant& ); + void loadCustomFieldsFinished( const TQValueList&, const TQVariant& ); - void fault( int, const QString&, const QVariant& ); - void addContactFault( int, const QString&, const QVariant& ); - void updateContactFault( int, const QString&, const QVariant& ); - void deleteContactFault( int, const QString&, const QVariant& ); + void fault( int, const TQString&, const TQVariant& ); + void addContactFault( int, const TQString&, const TQVariant& ); + void updateContactFault( int, const TQString&, const TQVariant& ); + void deleteContactFault( int, const TQString&, const TQVariant& ); void addContact( const KABC::Addressee& ); void updateContact( const KABC::Addressee& ); @@ -88,19 +88,19 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached private: void initEGroupware(); - QString addrTypesToTypeStr( int ); + TQString addrTypesToTypeStr( int ); - void writeContact( const Addressee&, QMap& ); - void readContact( const QMap&, Addressee &addr, QString& ); + void writeContact( const Addressee&, TQMap& ); + void readContact( const TQMap&, Addressee &addr, TQString& ); EGroupwarePrefs *mPrefs; - QString mSessionID; - QString mKp3; + TQString mSessionID; + TQString mKp3; - QMap mCategoryMap; - QMap mAddrTypes; - QMap mCustomFieldsMap; + TQMap mCategoryMap; + TQMap mAddrTypes; + TQMap mCustomFieldsMap; KXMLRPC::Server *mServer; Synchronizer *mSynchronizer; diff --git a/kresources/egroupware/kabc_resourcexmlrpcconfig.cpp b/kresources/egroupware/kabc_resourcexmlrpcconfig.cpp index cd2075c71..02a2f1ad3 100644 --- a/kresources/egroupware/kabc_resourcexmlrpcconfig.cpp +++ b/kresources/egroupware/kabc_resourcexmlrpcconfig.cpp @@ -18,8 +18,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -33,32 +33,32 @@ using namespace KABC; -ResourceXMLRPCConfig::ResourceXMLRPCConfig( QWidget* parent, const char* name ) +ResourceXMLRPCConfig::ResourceXMLRPCConfig( TQWidget* parent, const char* name ) : KRES::ConfigWidget( parent, name ) { - QGridLayout *mainLayout = new QGridLayout( this, 4, 2, 0, KDialog::spacingHint() ); + TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2, 0, KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "URL:" ), this ); + TQLabel *label = new TQLabel( i18n( "URL:" ), this ); mURL = new KURLRequester( this ); mainLayout->addWidget( label, 0, 0 ); mainLayout->addWidget( mURL, 0, 1 ); - label = new QLabel( i18n( "Domain:" ), this ); + label = new TQLabel( i18n( "Domain:" ), this ); mDomain = new KLineEdit( this ); mainLayout->addWidget( label, 1, 0 ); mainLayout->addWidget( mDomain, 1, 1 ); - label = new QLabel( i18n( "User:" ), this ); + label = new TQLabel( i18n( "User:" ), this ); mUser = new KLineEdit( this ); mainLayout->addWidget( label, 2, 0 ); mainLayout->addWidget( mUser, 2, 1 ); - label = new QLabel( i18n( "Password:" ), this ); + label = new TQLabel( i18n( "Password:" ), this ); mPassword = new KLineEdit( this ); - mPassword->setEchoMode( QLineEdit::Password ); + mPassword->setEchoMode( TQLineEdit::Password ); mainLayout->addWidget( label, 3, 0 ); mainLayout->addWidget( mPassword, 3, 1 ); diff --git a/kresources/egroupware/kabc_resourcexmlrpcconfig.h b/kresources/egroupware/kabc_resourcexmlrpcconfig.h index 6e0ddfdb8..f73b2e0aa 100644 --- a/kresources/egroupware/kabc_resourcexmlrpcconfig.h +++ b/kresources/egroupware/kabc_resourcexmlrpcconfig.h @@ -34,7 +34,7 @@ class KDE_EXPORT ResourceXMLRPCConfig : public KRES::ConfigWidget Q_OBJECT public: - ResourceXMLRPCConfig( QWidget* parent = 0, const char* name = 0 ); + ResourceXMLRPCConfig( TQWidget* parent = 0, const char* name = 0 ); public slots: void loadSettings( KRES::Resource* ); diff --git a/kresources/egroupware/kcal_resourcexmlrpc.cpp b/kresources/egroupware/kcal_resourcexmlrpc.cpp index af4f019c1..bb92b2d5f 100644 --- a/kresources/egroupware/kcal_resourcexmlrpc.cpp +++ b/kresources/egroupware/kcal_resourcexmlrpc.cpp @@ -22,11 +22,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -83,19 +83,19 @@ typedef KRES::PluginFactory XMLRPCFactory; K_EXPORT_COMPONENT_FACTORY( kcal_xmlrpc, XMLRPCFactory ) -static const QString SearchEventsCommand = "calendar.bocalendar.search"; -static const QString AddEventCommand = "calendar.bocalendar.write"; -static const QString DeleteEventCommand = "calendar.bocalendar.delete"; -static const QString LoadEventCategoriesCommand = "calendar.bocalendar.categories"; +static const TQString SearchEventsCommand = "calendar.bocalendar.search"; +static const TQString AddEventCommand = "calendar.bocalendar.write"; +static const TQString DeleteEventCommand = "calendar.bocalendar.delete"; +static const TQString LoadEventCategoriesCommand = "calendar.bocalendar.categories"; -static const QString SearchTodosCommand = "infolog.boinfolog.search"; -static const QString AddTodoCommand = "infolog.boinfolog.write"; -static const QString DeleteTodoCommand = "infolog.boinfolog.delete"; -static const QString LoadTodoCategoriesCommand = "infolog.boinfolog.categories"; +static const TQString SearchTodosCommand = "infolog.boinfolog.search"; +static const TQString AddTodoCommand = "infolog.boinfolog.write"; +static const TQString DeleteTodoCommand = "infolog.boinfolog.delete"; +static const TQString LoadTodoCategoriesCommand = "infolog.boinfolog.categories"; static void setRights( Incidence *incidence, int rights ) { - incidence->setCustomProperty( "EGWRESOURCE", "RIGHTS", QString::number( rights ) ); + incidence->setCustomProperty( "EGWRESOURCE", "RIGHTS", TQString::number( rights ) ); } static int rights( Incidence *incidence ) @@ -188,14 +188,14 @@ bool ResourceXMLRPC::doOpen() mServer->setUrl( KURL( mPrefs->url() ) ); mServer->setUserAgent( "KDE-Calendar" ); - QMap args; + TQMap args; args.insert( "domain", mPrefs->domain() ); args.insert( "username", mPrefs->user() ); args.insert( "password", mPrefs->password() ); - mServer->call( "system.login", QVariant( args ), - this, SLOT( loginFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( "system.login", TQVariant( args ), + this, TQT_SLOT( loginFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); mSynchronizer->start(); @@ -206,13 +206,13 @@ void ResourceXMLRPC::doClose() { kdDebug(5800) << "ResourceXMLRPC::doClose()" << endl; - QMap args; + TQMap args; args.insert( "sessionid", mSessionID ); args.insert( "kp3", mKp3 ); - mServer->call( "system.logout", QVariant( args ), - this, SLOT( logoutFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( "system.logout", TQVariant( args ), + this, TQT_SLOT( logoutFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); mSynchronizer->start(); } @@ -235,13 +235,13 @@ bool ResourceXMLRPC::doLoad() mTodoStateMapper.setIdentifier( type() + "_" + identifier() ); mTodoStateMapper.load(); - QMap args, columns; - args.insert( "start", QDateTime( QDate::currentDate().addDays( -12 ) ) ); - args.insert( "end", QDateTime( QDate::currentDate().addDays( 2000 ) ) ); + TQMap args, columns; + args.insert( "start", TQDateTime( TQDate::currentDate().addDays( -12 ) ) ); + args.insert( "end", TQDateTime( TQDate::currentDate().addDays( 2000 ) ) ); mServer->call( SearchEventsCommand, args, - this, SLOT( listEventsFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + this, TQT_SLOT( listEventsFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); args.clear(); columns.insert( "type", "task" ); @@ -250,16 +250,16 @@ bool ResourceXMLRPC::doLoad() args.insert( "order", "id_parent" ); mServer->call( SearchTodosCommand, args, - this, SLOT( listTodosFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + this, TQT_SLOT( listTodosFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); - mServer->call( LoadEventCategoriesCommand, QVariant( QMap() ), - this, SLOT( loadEventCategoriesFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( LoadEventCategoriesCommand, TQVariant( TQMap() ), + this, TQT_SLOT( loadEventCategoriesFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); - mServer->call( LoadTodoCategoriesCommand, QVariant( false, 0 ), - this, SLOT( loadTodoCategoriesFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( LoadTodoCategoriesCommand, TQVariant( false, 0 ), + this, TQT_SLOT( loadTodoCategoriesFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); return true; } @@ -278,13 +278,13 @@ bool ResourceXMLRPC::doSave() uint counter = 0; for ( evIt = events.begin(); evIt != events.end(); ++evIt ) { if ( !(*evIt)->isReadOnly() ) { - QMap args; + TQMap args; writeEvent( (*evIt), args ); args.insert( "id", idMapper().remoteId( (*evIt)->uid() ).toInt() ); - mServer->call( AddEventCommand, QVariant( args ), - this, SLOT( updateEventFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( AddEventCommand, TQVariant( args ), + this, TQT_SLOT( updateEventFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); counter++; } } @@ -294,13 +294,13 @@ bool ResourceXMLRPC::doSave() for ( todoIt = todos.begin(); todoIt != todos.end(); ++todoIt ) { if ( !(*todoIt)->isReadOnly() ) { - QMap args; + TQMap args; writeTodo( (*todoIt), args ); args.insert( "id", idMapper().remoteId( (*todoIt)->uid() ).toInt() ); - mServer->call( AddTodoCommand, QVariant( args ), - this, SLOT( updateTodoFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( AddTodoCommand, TQVariant( args ), + this, TQT_SLOT( updateTodoFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); counter++; } } @@ -326,7 +326,7 @@ KABC::Lock *ResourceXMLRPC::lock() bool ResourceXMLRPC::addEvent( Event* ev ) { - QMap args; + TQMap args; disableChangeNotification(); @@ -336,9 +336,9 @@ bool ResourceXMLRPC::addEvent( Event* ev ) if ( !oldEvent->isReadOnly() ) { writeEvent( ev, args ); args.insert( "id", idMapper().remoteId( ev->uid() ).toInt() ); - mServer->call( AddEventCommand, QVariant( args ), - this, SLOT( updateEventFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( AddEventCommand, TQVariant( args ), + this, TQT_SLOT( updateEventFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); mCalendar.deleteIncidence( oldEvent ); mCalendar.addIncidence( ev ); @@ -346,10 +346,10 @@ bool ResourceXMLRPC::addEvent( Event* ev ) } } else { // new event writeEvent( ev, args ); - mServer->call( AddEventCommand, QVariant( args ), - this, SLOT( addEventFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ), - QVariant( ev->uid() ) ); + mServer->call( AddEventCommand, TQVariant( args ), + this, TQT_SLOT( addEventFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ), + TQVariant( ev->uid() ) ); mCalendar.addEvent( ev ); saveCache(); @@ -366,20 +366,20 @@ bool ResourceXMLRPC::deleteEvent( Event* ev ) return false; mServer->call( DeleteEventCommand, idMapper().remoteId( ev->uid() ).toInt(), - this, SLOT( deleteEventFinished( const QValueList&, - const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ), - QVariant( ev->uid() ) ); + this, TQT_SLOT( deleteEventFinished( const TQValueList&, + const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ), + TQVariant( ev->uid() ) ); return true; } -Event *ResourceXMLRPC::event( const QString& uid ) +Event *ResourceXMLRPC::event( const TQString& uid ) { return mCalendar.event( uid ); } -Event::List ResourceXMLRPC::rawEventsForDate( const QDate& qd, +Event::List ResourceXMLRPC::rawEventsForDate( const TQDate& qd, EventSortField sortField, SortDirection sortDirection ) { @@ -387,13 +387,13 @@ Event::List ResourceXMLRPC::rawEventsForDate( const QDate& qd, } -Event::List ResourceXMLRPC::rawEvents( const QDate& start, const QDate& end, +Event::List ResourceXMLRPC::rawEvents( const TQDate& start, const TQDate& end, bool inclusive ) { return mCalendar.rawEvents( start, end, inclusive ); } -Event::List ResourceXMLRPC::rawEventsForDate( const QDateTime& qdt ) +Event::List ResourceXMLRPC::rawEventsForDate( const TQDateTime& qdt ) { return mCalendar.rawEventsForDate( qdt.date() ); } @@ -406,7 +406,7 @@ Event::List ResourceXMLRPC::rawEvents() bool ResourceXMLRPC::addTodo( Todo *todo ) { - QMap args; + TQMap args; disableChangeNotification(); @@ -416,9 +416,9 @@ bool ResourceXMLRPC::addTodo( Todo *todo ) if ( !oldTodo->isReadOnly() ) { writeTodo( todo, args ); args.insert( "id", idMapper().remoteId( todo->uid() ).toInt() ); - mServer->call( AddTodoCommand, QVariant( args ), - this, SLOT( updateTodoFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( AddTodoCommand, TQVariant( args ), + this, TQT_SLOT( updateTodoFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); mCalendar.deleteIncidence( oldTodo ); mCalendar.addIncidence( todo ); @@ -426,10 +426,10 @@ bool ResourceXMLRPC::addTodo( Todo *todo ) } } else { // new todo writeTodo( todo, args ); - mServer->call( AddTodoCommand, QVariant( args ), - this, SLOT( addTodoFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ), - QVariant( todo->uid() ) ); + mServer->call( AddTodoCommand, TQVariant( args ), + this, TQT_SLOT( addTodoFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ), + TQVariant( todo->uid() ) ); mCalendar.addTodo( todo ); saveCache(); @@ -446,10 +446,10 @@ bool ResourceXMLRPC::deleteTodo( Todo *todo ) return false; mServer->call( DeleteTodoCommand, idMapper().remoteId( todo->uid() ).toInt(), - this, SLOT( deleteTodoFinished( const QValueList&, - const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ), - QVariant( todo->uid() ) ); + this, TQT_SLOT( deleteTodoFinished( const TQValueList&, + const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ), + TQVariant( todo->uid() ) ); return true; } @@ -458,12 +458,12 @@ Todo::List ResourceXMLRPC::rawTodos() return mCalendar.rawTodos(); } -Todo *ResourceXMLRPC::todo( const QString& uid ) +Todo *ResourceXMLRPC::todo( const TQString& uid ) { return mCalendar.todo( uid ); } -Todo::List ResourceXMLRPC::rawTodosForDate( const QDate& date ) +Todo::List ResourceXMLRPC::rawTodosForDate( const TQDate& date ) { return mCalendar.rawTodosForDate( date ); } @@ -478,23 +478,23 @@ bool ResourceXMLRPC::deleteJournal( Journal* journal ) return mCalendar.deleteJournal( journal ); } -Journal::List ResourceXMLRPC::journals( const QDate& date ) +Journal::List ResourceXMLRPC::journals( const TQDate& date ) { return mCalendar.journals( date ); } -Journal *ResourceXMLRPC::journal( const QString& uid ) +Journal *ResourceXMLRPC::journal( const TQString& uid ) { return mCalendar.journal( uid ); } -Alarm::List ResourceXMLRPC::alarmsTo( const QDateTime& to ) +Alarm::List ResourceXMLRPC::alarmsTo( const TQDateTime& to ) { return mCalendar.alarmsTo( to ); } -Alarm::List ResourceXMLRPC::alarms( const QDateTime& from, const QDateTime& to ) +Alarm::List ResourceXMLRPC::alarms( const TQDateTime& from, const TQDateTime& to ) { return mCalendar.alarms( from, to ); } @@ -510,10 +510,10 @@ void ResourceXMLRPC::reload() } -void ResourceXMLRPC::loginFinished( const QValueList& variant, - const QVariant& ) +void ResourceXMLRPC::loginFinished( const TQValueList& variant, + const TQVariant& ) { - QMap map = variant[ 0 ].toMap(); + TQMap map = variant[ 0 ].toMap(); KURL url = KURL( mPrefs->url() ); if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed @@ -530,10 +530,10 @@ void ResourceXMLRPC::loginFinished( const QValueList& variant, mSynchronizer->stop(); } -void ResourceXMLRPC::logoutFinished( const QValueList& variant, - const QVariant& ) +void ResourceXMLRPC::logoutFinished( const TQValueList& variant, + const TQVariant& ) { - QMap map = variant[ 0 ].toMap(); + TQMap map = variant[ 0 ].toMap(); if ( map[ "GOODBYE" ].toString() != "XOXO" ) kdError() << "logout failed" << endl; @@ -547,11 +547,11 @@ void ResourceXMLRPC::logoutFinished( const QValueList& variant, mSynchronizer->stop(); } -void ResourceXMLRPC::listEventsFinished( const QValueList& list, - const QVariant& ) +void ResourceXMLRPC::listEventsFinished( const TQValueList& list, + const TQVariant& ) { - const QValueList eventList = list[ 0 ].toList(); - QValueList::ConstIterator eventIt; + const TQValueList eventList = list[ 0 ].toList(); + TQValueList::ConstIterator eventIt; disableChangeNotification(); @@ -559,17 +559,17 @@ void ResourceXMLRPC::listEventsFinished( const QValueList& list, bool changed = false; for ( eventIt = eventList.begin(); eventIt != eventList.end(); ++eventIt ) { - QMap map = (*eventIt).toMap(); + TQMap map = (*eventIt).toMap(); Event *event = new Event; event->setFloats( false ); - QString uid; + TQString uid; readEvent( map, event, uid ); // do we already have this event? Event *oldEvent = 0; - QString localUid = idMapper().localId( uid ); + TQString localUid = idMapper().localId( uid ); if ( !localUid.isEmpty() ) oldEvent = mCalendar.event( localUid ); @@ -608,8 +608,8 @@ void ResourceXMLRPC::listEventsFinished( const QValueList& list, checkLoadingFinished(); } -void ResourceXMLRPC::deleteEventFinished( const QValueList&, - const QVariant& id ) +void ResourceXMLRPC::deleteEventFinished( const TQValueList&, + const TQVariant& id ) { idMapper().removeRemoteId( idMapper().remoteId( id.toString() ) ); @@ -623,26 +623,26 @@ void ResourceXMLRPC::deleteEventFinished( const QValueList&, emit resourceChanged( this ); } -void ResourceXMLRPC::updateEventFinished( const QValueList&, - const QVariant& ) +void ResourceXMLRPC::updateEventFinished( const TQValueList&, + const TQVariant& ) { mSynchronizer->stop(); } -void ResourceXMLRPC::addEventFinished( const QValueList& list, - const QVariant& id ) +void ResourceXMLRPC::addEventFinished( const TQValueList& list, + const TQVariant& id ) { idMapper().setRemoteId( id.toString(), list[ 0 ].toString() ); emit resourceChanged( this ); } -void ResourceXMLRPC::loadEventCategoriesFinished( const QValueList &mapList, const QVariant& ) +void ResourceXMLRPC::loadEventCategoriesFinished( const TQValueList &mapList, const TQVariant& ) { mEventCategoryMap.clear(); - const QMap map = mapList[ 0 ].toMap(); - QMap::ConstIterator it; + const TQMap map = mapList[ 0 ].toMap(); + TQMap::ConstIterator it; KPimPrefs prefs( "korganizerrc" ); for ( it = map.begin(); it != map.end(); ++it ) { @@ -658,11 +658,11 @@ void ResourceXMLRPC::loadEventCategoriesFinished( const QValueList &ma checkLoadingFinished(); } -void ResourceXMLRPC::listTodosFinished( const QValueList& list, - const QVariant& ) +void ResourceXMLRPC::listTodosFinished( const TQValueList& list, + const TQVariant& ) { - const QValueList todoList = list[ 0 ].toList(); - QValueList::ConstIterator todoIt; + const TQValueList todoList = list[ 0 ].toList(); + TQValueList::ConstIterator todoIt; disableChangeNotification(); @@ -670,16 +670,16 @@ void ResourceXMLRPC::listTodosFinished( const QValueList& list, bool changed = false; for ( todoIt = todoList.begin(); todoIt != todoList.end(); ++todoIt ) { - QMap map = (*todoIt).toMap(); + TQMap map = (*todoIt).toMap(); Todo *todo = new Todo; - QString uid; + TQString uid; readTodo( map, todo, uid ); // do we already have this todo? Todo *oldTodo = 0; - QString localUid = idMapper().localId( uid ); + TQString localUid = idMapper().localId( uid ); if ( !localUid.isEmpty() ) oldTodo = mCalendar.todo( localUid ); @@ -713,8 +713,8 @@ void ResourceXMLRPC::listTodosFinished( const QValueList& list, checkLoadingFinished(); } -void ResourceXMLRPC::deleteTodoFinished( const QValueList&, - const QVariant& id ) +void ResourceXMLRPC::deleteTodoFinished( const TQValueList&, + const TQVariant& id ) { idMapper().removeRemoteId( idMapper().remoteId( id.toString() ) ); mTodoStateMapper.remove( idMapper().remoteId( id.toString() ) ); @@ -728,26 +728,26 @@ void ResourceXMLRPC::deleteTodoFinished( const QValueList&, emit resourceChanged( this ); } -void ResourceXMLRPC::addTodoFinished( const QValueList& list, - const QVariant& id ) +void ResourceXMLRPC::addTodoFinished( const TQValueList& list, + const TQVariant& id ) { idMapper().setRemoteId( id.toString(), list[ 0 ].toString() ); emit resourceChanged( this ); } -void ResourceXMLRPC::updateTodoFinished( const QValueList&, - const QVariant& ) +void ResourceXMLRPC::updateTodoFinished( const TQValueList&, + const TQVariant& ) { mSynchronizer->stop(); } -void ResourceXMLRPC::loadTodoCategoriesFinished( const QValueList &mapList, const QVariant& ) +void ResourceXMLRPC::loadTodoCategoriesFinished( const TQValueList &mapList, const TQVariant& ) { mTodoCategoryMap.clear(); - const QMap map = mapList[ 0 ].toMap(); - QMap::ConstIterator it; + const TQMap map = mapList[ 0 ].toMap(); + TQMap::ConstIterator it; KPimPrefs prefs( "korganizerrc" ); for ( it = map.begin(); it != map.end(); ++it ) { @@ -763,25 +763,25 @@ void ResourceXMLRPC::loadTodoCategoriesFinished( const QValueList &map checkLoadingFinished(); } -void ResourceXMLRPC::fault( int error, const QString& errorMsg, - const QVariant& ) +void ResourceXMLRPC::fault( int error, const TQString& errorMsg, + const TQVariant& ) { kdError() << "Server send error " << error << ": " << errorMsg << endl; mSynchronizer->stop(); } -void ResourceXMLRPC::readEvent( const QMap &args, Event *event, - QString &uid ) +void ResourceXMLRPC::readEvent( const TQMap &args, Event *event, + TQString &uid ) { // for recurrence int rType = CAL_RECUR_NONE; int rInterval = 1; int rData = 0; int rights = 0; - QDateTime rEndDate; - QValueList rExceptions; + TQDateTime rEndDate; + TQValueList rExceptions; - QMap::ConstIterator it; + TQMap::ConstIterator it; for ( it = args.begin(); it != args.end(); ++it ) { if ( it.key() == "id" ) { uid = it.data().toString(); @@ -790,8 +790,8 @@ void ResourceXMLRPC::readEvent( const QMap &args, Event *even } else if ( it.key() == "start" ) { event->setDtStart( it.data().toDateTime() ); } else if ( it.key() == "end" ) { - QDateTime start = args[ "start" ].toDateTime(); - QDateTime end = it.data().toDateTime(); + TQDateTime start = args[ "start" ].toDateTime(); + TQDateTime end = it.data().toDateTime(); if ( start.time() == end.time() && start.time().hour() == 0 && start.time().minute() == 0 && start.time().second() == 0 ) { @@ -813,10 +813,10 @@ void ResourceXMLRPC::readEvent( const QMap &args, Event *even event->setSecrecy( (it.data().toString() == "public" ? Incidence::SecrecyPublic : Incidence::SecrecyPrivate) ); } else if ( it.key() == "category" ) { - const QMap categories = it.data().toMap(); - QMap::ConstIterator catIt; + const TQMap categories = it.data().toMap(); + TQMap::ConstIterator catIt; - QStringList eventCategories; + TQStringList eventCategories; for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { mEventCategoryMap.insert( catIt.data().toString(), catIt.key().toInt() ); eventCategories.append( catIt.data().toString() ); @@ -847,17 +847,17 @@ void ResourceXMLRPC::readEvent( const QMap &args, Event *even } else if ( it.key() == "recur_data" ) { rData = it.data().toInt(); } else if ( it.key() == "recur_exception" ) { - const QMap dateList = it.data().toMap(); - QMap::ConstIterator dateIt; + const TQMap dateList = it.data().toMap(); + TQMap::ConstIterator dateIt; for ( dateIt = dateList.begin(); dateIt != dateList.end(); ++dateIt ) rExceptions.append( (*dateIt).toDateTime() ); } else if ( it.key() == "participants" ) { - const QMap persons = it.data().toMap(); - QMap::ConstIterator personsIt; + const TQMap persons = it.data().toMap(); + TQMap::ConstIterator personsIt; for ( personsIt = persons.begin(); personsIt != persons.end(); ++personsIt ) { - QMap person = (*personsIt).toMap(); + TQMap person = (*personsIt).toMap(); Attendee::PartStat status = Attendee::InProcess; if ( person[ "status" ] == "A" ) status = Attendee::Accepted; @@ -875,11 +875,11 @@ void ResourceXMLRPC::readEvent( const QMap &args, Event *even event->addAttendee( attendee ); } } else if ( it.key() == "alarm" ) { - const QMap alarmList = it.data().toMap(); - QMap::ConstIterator alarmIt; + const TQMap alarmList = it.data().toMap(); + TQMap::ConstIterator alarmIt; for ( alarmIt = alarmList.begin(); alarmIt != alarmList.end(); ++alarmIt ) { - QMap alarm = (*alarmIt).toMap(); + TQMap alarm = (*alarmIt).toMap(); Alarm *vAlarm = event->newAlarm(); vAlarm->setText( event->summary() ); @@ -903,7 +903,7 @@ void ResourceXMLRPC::readEvent( const QMap &args, Event *even re->setDaily( rInterval ); break; case CAL_RECUR_WEEKLY: { - QBitArray weekMask( 7 ); + TQBitArray weekMask( 7 ); weekMask.setBit( 0, rData & CAL_MONDAY ); weekMask.setBit( 1, rData & CAL_TUESDAY ); weekMask.setBit( 2, rData & CAL_WEDNESDAY ); @@ -928,7 +928,7 @@ void ResourceXMLRPC::readEvent( const QMap &args, Event *even if ( rEndDate.date().isValid() ) re->setEndDate( rEndDate.date() ); - QValueList::ConstIterator exIt; + TQValueList::ConstIterator exIt; for ( exIt = rExceptions.begin(); exIt != rExceptions.end(); ++exIt ) re->addExDateTime( *exIt ); } @@ -937,7 +937,7 @@ void ResourceXMLRPC::readEvent( const QMap &args, Event *even setRights( event, rights ); } -void ResourceXMLRPC::writeEvent( Event *event, QMap &args ) +void ResourceXMLRPC::writeEvent( Event *event, TQMap &args ) { args.insert( "start", event->dtStart() ); @@ -956,16 +956,16 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap &args ) args.insert( "access", (event->secrecy() == Incidence::SecrecyPublic ? "public" : "private") ); // CATEGORY - const QStringList categories = event->categories(); - QStringList::ConstIterator catIt; - QMap catMap; + const TQStringList categories = event->categories(); + TQStringList::ConstIterator catIt; + TQMap catMap; int counter = 0; for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { - QMap::Iterator it = mEventCategoryMap.find( *catIt ); + TQMap::Iterator it = mEventCategoryMap.find( *catIt ); if ( it == mEventCategoryMap.end() ) // new category - catMap.insert( QString::number( counter-- ), *catIt ); + catMap.insert( TQString::number( counter-- ), *catIt ); else - catMap.insert( QString::number( it.data() ), *catIt ); + catMap.insert( TQString::number( it.data() ), *catIt ); } args.insert( "category", catMap ); @@ -985,9 +985,9 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap &args ) if ( !rec->doesRecur() ) { args.insert( "recur_type", int( 0 ) ); args.insert( "recur_interval", int( 0 ) ); - args.insert( "recur_enddate", QDateTime() ); + args.insert( "recur_enddate", TQDateTime() ); args.insert( "recur_data", int( 0 ) ); - args.insert( "recur_exception", QMap() ); + args.insert( "recur_exception", TQMap() ); } else { switch ( rec->recurrenceType() ) { case Recurrence::rDaily: @@ -1031,12 +1031,12 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap &args ) args.insert( "recur_enddate", rec->endDateTime() ); // TODO: Also use exception dates! - const QValueList dates = event->recurrence()->exDateTimes(); - QValueList::ConstIterator dateIt; - QMap exMap; + const TQValueList dates = event->recurrence()->exDateTimes(); + TQValueList::ConstIterator dateIt; + TQMap exMap; int counter = 0; for ( dateIt = dates.begin(); dateIt != dates.end(); ++dateIt, ++counter ) - exMap.insert( QString::number( counter ), *dateIt ); + exMap.insert( TQString::number( counter ), *dateIt ); args.insert( "recur_exception", exMap ); } @@ -1044,10 +1044,10 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap &args ) // PARTICIPANTS const Attendee::List attendees = event->attendees(); Attendee::List::ConstIterator attIt; - QMap persons; + TQMap persons; for ( attIt = attendees.begin(); attIt != attendees.end(); ++attIt ) { - QMap person; - QString status; + TQMap person; + TQString status; if ( (*attIt)->status() == Attendee::Accepted ) status = "A"; @@ -1069,9 +1069,9 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap &args ) // ALARMS const Alarm::List alarms = event->alarms(); Alarm::List::ConstIterator alarmIt; - QMap alarmMap; + TQMap alarmMap; for ( alarmIt = alarms.begin(); alarmIt != alarms.end(); ++alarmIt ) { - QMap alarm; + TQMap alarm; alarm.insert( "time", (*alarmIt)->time() ); alarm.insert( "offset", (*alarmIt)->startOffset().asSeconds() ); alarm.insert( "enabled", ( (*alarmIt)->enabled() ? int( 1 ) : int( 0 ) ) ); @@ -1082,7 +1082,7 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap &args ) args.insert( "alarm", alarmMap ); } -void ResourceXMLRPC::writeTodo( Todo* todo, QMap& args ) +void ResourceXMLRPC::writeTodo( Todo* todo, TQMap& args ) { args.insert( "subject", todo->summary() ); args.insert( "des", todo->description() ); @@ -1090,17 +1090,17 @@ void ResourceXMLRPC::writeTodo( Todo* todo, QMap& args ) (todo->secrecy() == Todo::SecrecyPublic ? "public" : "private" ) ); // CATEGORIES - QMap catMap; + TQMap catMap; - const QStringList categories = todo->categories(); - QStringList::ConstIterator catIt; + const TQStringList categories = todo->categories(); + TQStringList::ConstIterator catIt; int counter = 0; for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { - QMap::Iterator it = mTodoCategoryMap.find( *catIt ); + TQMap::Iterator it = mTodoCategoryMap.find( *catIt ); if ( it == mTodoCategoryMap.end() ) - catMap.insert( QString::number( counter-- ), *catIt ); + catMap.insert( TQString::number( counter-- ), *catIt ); else - catMap.insert( QString::number( it.data() ), *catIt ); + catMap.insert( TQString::number( it.data() ), *catIt ); } args.insert( "category", catMap ); @@ -1111,17 +1111,17 @@ void ResourceXMLRPC::writeTodo( Todo* todo, QMap& args ) // SUBTODO Incidence *inc = todo->relatedTo(); if ( inc ) { - QString parentUid = idMapper().remoteId( inc->uid() ); + TQString parentUid = idMapper().remoteId( inc->uid() ); args.insert( "id_parent", parentUid ); } // STATE - QString remoteId = idMapper().remoteId( todo->uid() ); - QString status = mTodoStateMapper.remoteState( remoteId, todo->percentComplete() ); + TQString remoteId = idMapper().remoteId( todo->uid() ); + TQString status = mTodoStateMapper.remoteState( remoteId, todo->percentComplete() ); args.insert( "status", status ); } -void ResourceXMLRPC::readTodo( const QMap& args, Todo *todo, QString &uid ) +void ResourceXMLRPC::readTodo( const TQMap& args, Todo *todo, TQString &uid ) { uid = args[ "id" ].toString(); @@ -1138,10 +1138,10 @@ void ResourceXMLRPC::readTodo( const QMap& args, Todo *todo, todo->setSecrecy( args[ "access" ].toString() == "public" ? Todo::SecrecyPublic : Todo::SecrecyPrivate ); // CATEGORIES - const QMap categories = args[ "category" ].toMap(); - QMap::ConstIterator it; + const TQMap categories = args[ "category" ].toMap(); + TQMap::ConstIterator it; - QStringList todoCategories; + TQStringList todoCategories; for ( it = categories.begin(); it != categories.end(); ++it ) { mTodoCategoryMap.insert( it.data().toString(), it.key().toInt() ); todoCategories.append( it.data().toString() ); @@ -1152,7 +1152,7 @@ void ResourceXMLRPC::readTodo( const QMap& args, Todo *todo, todo->setLastModified( args[ "datemodified" ].toDateTime() ); todo->setFloats( true ); - QDateTime dateTime = args[ "startdate" ].toDateTime(); + TQDateTime dateTime = args[ "startdate" ].toDateTime(); if ( dateTime.isValid() ) { todo->setDtStart( dateTime ); todo->setHasStartDate( true ); @@ -1169,9 +1169,9 @@ void ResourceXMLRPC::readTodo( const QMap& args, Todo *todo, } // SUBTODO - QString parentId = args[ "id_parent" ].toString(); + TQString parentId = args[ "id_parent" ].toString(); if ( parentId != "0" ) { // we are a sub todo - QString localParentUid = idMapper().localId( parentId ); + TQString localParentUid = idMapper().localId( parentId ); if ( !localParentUid.isEmpty() ) { // found parent todo Todo *parent = mCalendar.todo( localParentUid ); if ( parent ) @@ -1180,7 +1180,7 @@ void ResourceXMLRPC::readTodo( const QMap& args, Todo *todo, } // STATE - QString status = args[ "status" ].toString(); + TQString status = args[ "status" ].toString(); int state = TodoStateMapper::toLocal( status ); mTodoStateMapper.addTodoState( uid, state, status ); diff --git a/kresources/egroupware/kcal_resourcexmlrpc.h b/kresources/egroupware/kcal_resourcexmlrpc.h index fd9ad6826..a28202ed5 100644 --- a/kresources/egroupware/kcal_resourcexmlrpc.h +++ b/kresources/egroupware/kcal_resourcexmlrpc.h @@ -22,9 +22,9 @@ #ifndef KCAL_RESOURCEXMLRPC_H #define KCAL_RESOURCEXMLRPC_H -#include -#include -#include +#include +#include +#include #include #include @@ -81,7 +81,7 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached /** Retrieves an event on the basis of the unique string ID. */ - Event *event( const QString& uid ); + Event *event( const TQString& uid ); /** Return unfiltered list of all events in calendar. @@ -93,20 +93,20 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached date specified. useful for dayView, etc. etc. */ Event::List rawEventsForDate( - const QDate& date, + const TQDate& date, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending ); /** Get unfiltered events for date \a qdt. */ - Event::List rawEventsForDate( const QDateTime& qdt ); + Event::List rawEventsForDate( const TQDateTime& qdt ); /** Get unfiltered events in a range of dates. If inclusive is set to true, only events are returned, which are completely included in the range. */ - Event::List rawEvents( const QDate& start, const QDate& end, + Event::List rawEvents( const TQDate& start, const TQDate& end, bool inclusive = false ); @@ -124,7 +124,7 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached Searches todolist for an event with this unique string identifier, returns a pointer or null. */ - Todo *todo( const QString& uid ); + Todo *todo( const TQString& uid ); /** Return list of all todos. @@ -134,7 +134,7 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached /** Returns list of todos due on the specified date. */ - Todo::List rawTodosForDate( const QDate& date ); + Todo::List rawTodosForDate( const TQDate& date ); /** Add a Journal entry to calendar @@ -149,22 +149,22 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached /** Return Journals for given date */ - virtual Journal::List journals( const QDate& ); + virtual Journal::List journals( const TQDate& ); /** Return Journal with given UID */ - virtual Journal *journal( const QString& uid ); + virtual Journal *journal( const TQString& uid ); /** Return all alarms, which ocur in the given time interval. */ - Alarm::List alarms( const QDateTime& from, const QDateTime& to ); + Alarm::List alarms( const TQDateTime& from, const TQDateTime& to ); /** Return all alarms, which ocur before given date. */ - Alarm::List alarmsTo( const QDateTime& to ); + Alarm::List alarmsTo( const TQDateTime& to ); /** Public because needed in MultiCalendar::load() @@ -174,25 +174,25 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached void dump() const; - void setTimeZoneId( const QString& ) {} + void setTimeZoneId( const TQString& ) {} protected slots: - void loginFinished( const QValueList&, const QVariant& ); - void logoutFinished( const QValueList&, const QVariant& ); + void loginFinished( const TQValueList&, const TQVariant& ); + void logoutFinished( const TQValueList&, const TQVariant& ); - void listEventsFinished( const QValueList&, const QVariant& ); - void addEventFinished( const QValueList&, const QVariant& ); - void updateEventFinished( const QValueList&, const QVariant& ); - void deleteEventFinished( const QValueList&, const QVariant& ); - void loadEventCategoriesFinished( const QValueList&, const QVariant& ); + void listEventsFinished( const TQValueList&, const TQVariant& ); + void addEventFinished( const TQValueList&, const TQVariant& ); + void updateEventFinished( const TQValueList&, const TQVariant& ); + void deleteEventFinished( const TQValueList&, const TQVariant& ); + void loadEventCategoriesFinished( const TQValueList&, const TQVariant& ); - void listTodosFinished( const QValueList&, const QVariant& ); - void addTodoFinished( const QValueList&, const QVariant& ); - void updateTodoFinished( const QValueList&, const QVariant& ); - void deleteTodoFinished( const QValueList&, const QVariant& ); - void loadTodoCategoriesFinished( const QValueList&, const QVariant& ); + void listTodosFinished( const TQValueList&, const TQVariant& ); + void addTodoFinished( const TQValueList&, const TQVariant& ); + void updateTodoFinished( const TQValueList&, const TQVariant& ); + void deleteTodoFinished( const TQValueList&, const TQVariant& ); + void loadTodoCategoriesFinished( const TQValueList&, const TQVariant& ); - void fault( int, const QString&, const QVariant& ); + void fault( int, const TQString&, const TQVariant& ); protected: bool doLoad(); @@ -205,11 +205,11 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached void init(); void initEGroupware(); - void writeEvent( Event*, QMap& ); - void readEvent( const QMap&, Event*, QString& ); + void writeEvent( Event*, TQMap& ); + void readEvent( const TQMap&, Event*, TQString& ); - void writeTodo( Todo*, QMap& ); - void readTodo( const QMap&, Todo*, QString& ); + void writeTodo( Todo*, TQMap& ); + void readTodo( const TQMap&, Todo*, TQString& ); void checkLoadingFinished(); @@ -217,11 +217,11 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached EGroupwarePrefs *mPrefs; - QString mSessionID; - QString mKp3; + TQString mSessionID; + TQString mKp3; - QMap mEventCategoryMap; - QMap mTodoCategoryMap; + TQMap mEventCategoryMap; + TQMap mTodoCategoryMap; TodoStateMapper mTodoStateMapper; diff --git a/kresources/egroupware/kcal_resourcexmlrpcconfig.cpp b/kresources/egroupware/kcal_resourcexmlrpcconfig.cpp index 450519aa4..36e3b9486 100644 --- a/kresources/egroupware/kcal_resourcexmlrpcconfig.cpp +++ b/kresources/egroupware/kcal_resourcexmlrpcconfig.cpp @@ -18,8 +18,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -34,32 +34,32 @@ using namespace KCal; -ResourceXMLRPCConfig::ResourceXMLRPCConfig( QWidget* parent, const char* name ) +ResourceXMLRPCConfig::ResourceXMLRPCConfig( TQWidget* parent, const char* name ) : KRES::ConfigWidget( parent, name ) { - QGridLayout *mainLayout = new QGridLayout( this, 4, 2, 0, KDialog::spacingHint() ); + TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2, 0, KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "URL:" ), this ); + TQLabel *label = new TQLabel( i18n( "URL:" ), this ); mURL = new KURLRequester( this ); mainLayout->addWidget( label, 0, 0 ); mainLayout->addWidget( mURL, 0, 1 ); - label = new QLabel( i18n( "Domain:" ), this ); + label = new TQLabel( i18n( "Domain:" ), this ); mDomain = new KLineEdit( this ); mainLayout->addWidget( label, 1, 0 ); mainLayout->addWidget( mDomain, 1, 1 ); - label = new QLabel( i18n( "User:" ), this ); + label = new TQLabel( i18n( "User:" ), this ); mUser = new KLineEdit( this ); mainLayout->addWidget( label, 2, 0 ); mainLayout->addWidget( mUser, 2, 1 ); - label = new QLabel( i18n( "Password:" ), this ); + label = new TQLabel( i18n( "Password:" ), this ); mPassword = new KLineEdit( this ); - mPassword->setEchoMode( QLineEdit::Password ); + mPassword->setEchoMode( TQLineEdit::Password ); mainLayout->addWidget( label, 3, 0 ); mainLayout->addWidget( mPassword, 3, 1 ); diff --git a/kresources/egroupware/kcal_resourcexmlrpcconfig.h b/kresources/egroupware/kcal_resourcexmlrpcconfig.h index c6a918f84..f71359aa3 100644 --- a/kresources/egroupware/kcal_resourcexmlrpcconfig.h +++ b/kresources/egroupware/kcal_resourcexmlrpcconfig.h @@ -35,7 +35,7 @@ class KDE_EXPORT ResourceXMLRPCConfig : public KRES::ConfigWidget Q_OBJECT public: - ResourceXMLRPCConfig( QWidget* parent = 0, const char* name = 0 ); + ResourceXMLRPCConfig( TQWidget* parent = 0, const char* name = 0 ); public slots: void loadSettings( KRES::Resource* ); diff --git a/kresources/egroupware/knotes_resourcexmlrpc.cpp b/kresources/egroupware/knotes_resourcexmlrpc.cpp index c30da41f0..b0bdb5b0d 100644 --- a/kresources/egroupware/knotes_resourcexmlrpc.cpp +++ b/kresources/egroupware/knotes_resourcexmlrpc.cpp @@ -19,8 +19,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -44,13 +44,13 @@ using namespace KNotes; typedef KRES::PluginFactory< ResourceXMLRPC, ResourceXMLRPCConfig> XMLRPCFactory; K_EXPORT_COMPONENT_FACTORY( knotes_xmlrpc, XMLRPCFactory ) -static const QString SearchNotesCommand = "infolog.boinfolog.search"; -static const QString AddNoteCommand = "infolog.boinfolog.write"; -static const QString DeleteNoteCommand = "infolog.boinfolog.delete"; -static const QString LoadNoteCategoriesCommand = "infolog.boinfolog.categories"; +static const TQString SearchNotesCommand = "infolog.boinfolog.search"; +static const TQString AddNoteCommand = "infolog.boinfolog.write"; +static const TQString DeleteNoteCommand = "infolog.boinfolog.delete"; +static const TQString LoadNoteCategoriesCommand = "infolog.boinfolog.categories"; ResourceXMLRPC::ResourceXMLRPC( const KConfig* config ) - : ResourceNotes( config ), mCalendar( QString::fromLatin1("UTC") ), + : ResourceNotes( config ), mCalendar( TQString::fromLatin1("UTC") ), mServer( 0 ) { init(); @@ -62,7 +62,7 @@ ResourceXMLRPC::ResourceXMLRPC( const KConfig* config ) } ResourceXMLRPC::ResourceXMLRPC( ) - : ResourceNotes( 0 ), mCalendar( QString::fromLatin1("UTC") ), + : ResourceNotes( 0 ), mCalendar( TQString::fromLatin1("UTC") ), mServer( 0 ) { init(); @@ -114,14 +114,14 @@ bool ResourceXMLRPC::load() mServer->setUrl( KURL( mPrefs->url() ) ); mServer->setUserAgent( "KDE-Notes" ); - QMap args, columns; + TQMap args, columns; args.insert( "domain", mPrefs->domain() ); args.insert( "username", mPrefs->user() ); args.insert( "password", mPrefs->password() ); - mServer->call( "system.login", QVariant( args ), - this, SLOT( loginFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( "system.login", TQVariant( args ), + this, TQT_SLOT( loginFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); mSynchronizer->start(); @@ -132,8 +132,8 @@ bool ResourceXMLRPC::load() args.insert( "order", "id_parent" ); mServer->call( SearchNotesCommand, args, - this, SLOT( listNotesFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + this, TQT_SLOT( listNotesFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); mSynchronizer->start(); @@ -149,7 +149,7 @@ bool ResourceXMLRPC::save() bool ResourceXMLRPC::addNote( KCal::Journal *journal ) { - QMap args; + TQMap args; writeNote( journal, args ); KCal::Journal *oldJournal = mCalendar.journal( journal->uid() ); @@ -159,17 +159,17 @@ bool ResourceXMLRPC::addNote( KCal::Journal *journal ) if ( !oldJournal->isReadOnly() ) { writeNote( journal, args ); args.insert( "id", mUidMap[ journal->uid() ].toInt() ); - mServer->call( AddNoteCommand, QVariant( args ), - this, SLOT( updateNoteFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( AddNoteCommand, TQVariant( args ), + this, TQT_SLOT( updateNoteFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); mCalendar.addJournal( journal ); added = true; } } else { - mServer->call( AddNoteCommand, QVariant( args ), - this, SLOT( addNoteFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ), - QVariant( journal->uid() ) ); + mServer->call( AddNoteCommand, TQVariant( args ), + this, TQT_SLOT( addNoteFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ), + TQVariant( journal->uid() ) ); mCalendar.addJournal( journal ); added = true; @@ -186,28 +186,28 @@ bool ResourceXMLRPC::deleteNote( KCal::Journal *journal ) int id = mUidMap[ journal->uid() ].toInt(); mServer->call( DeleteNoteCommand, id, - this, SLOT( deleteNoteFinished( const QValueList&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ), - QVariant( journal->uid() ) ); + this, TQT_SLOT( deleteNoteFinished( const TQValueList&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ), + TQVariant( journal->uid() ) ); mSynchronizer->start(); return true; } -KCal::Alarm::List ResourceXMLRPC::alarms( const QDateTime& from, const QDateTime& to ) +KCal::Alarm::List ResourceXMLRPC::alarms( const TQDateTime& from, const TQDateTime& to ) { KCal::Alarm::List alarms; KCal::Journal::List notes = mCalendar.journals(); KCal::Journal::List::ConstIterator note; for ( note = notes.begin(); note != notes.end(); ++note ) { - QDateTime preTime = from.addSecs( -1 ); + TQDateTime preTime = from.addSecs( -1 ); KCal::Alarm::List::ConstIterator it; for( it = (*note)->alarms().begin(); it != (*note)->alarms().end(); ++it ) { if ( (*it)->enabled() ) { - QDateTime dt = (*it)->nextRepetition( preTime ); + TQDateTime dt = (*it)->nextRepetition( preTime ); if ( dt.isValid() && dt <= to ) alarms.append( *it ); } @@ -217,10 +217,10 @@ KCal::Alarm::List ResourceXMLRPC::alarms( const QDateTime& from, const QDateTime return alarms; } -void ResourceXMLRPC::loginFinished( const QValueList& variant, - const QVariant& ) +void ResourceXMLRPC::loginFinished( const TQValueList& variant, + const TQVariant& ) { - QMap map = variant[ 0 ].toMap(); + TQMap map = variant[ 0 ].toMap(); KURL url = KURL( mPrefs->url() ); if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed @@ -237,10 +237,10 @@ void ResourceXMLRPC::loginFinished( const QValueList& variant, mSynchronizer->stop(); } -void ResourceXMLRPC::logoutFinished( const QValueList& variant, - const QVariant& ) +void ResourceXMLRPC::logoutFinished( const TQValueList& variant, + const TQVariant& ) { - QMap map = variant[ 0 ].toMap(); + TQMap map = variant[ 0 ].toMap(); if ( map[ "GOODBYE" ].toString() != "XOXO" ) kdError() << "logout failed" << endl; @@ -254,9 +254,9 @@ void ResourceXMLRPC::logoutFinished( const QValueList& variant, mSynchronizer->stop(); } -void ResourceXMLRPC::listNotesFinished( const QValueList &list, const QVariant& ) +void ResourceXMLRPC::listNotesFinished( const TQValueList &list, const TQVariant& ) { - QMap::Iterator uidIt; + TQMap::Iterator uidIt; for ( uidIt = mUidMap.begin(); uidIt != mUidMap.end(); ++uidIt ) { KCal::Journal *journal = mCalendar.journal( uidIt.key() ); mCalendar.deleteJournal( journal ); @@ -264,15 +264,15 @@ void ResourceXMLRPC::listNotesFinished( const QValueList &list, const mUidMap.clear(); - QValueList noteList = list[ 0 ].toList(); - QValueList::Iterator noteIt; + TQValueList noteList = list[ 0 ].toList(); + TQValueList::Iterator noteIt; for ( noteIt = noteList.begin(); noteIt != noteList.end(); ++noteIt ) { - QMap map = (*noteIt).toMap(); + TQMap map = (*noteIt).toMap(); KCal::Journal *journal = new KCal::Journal(); - QString uid; + TQString uid; readNote( map, journal, uid ); mUidMap.insert( journal->uid(), uid ); @@ -283,20 +283,20 @@ void ResourceXMLRPC::listNotesFinished( const QValueList &list, const mSynchronizer->stop(); } -void ResourceXMLRPC::addNoteFinished( const QValueList &list, const QVariant &id ) +void ResourceXMLRPC::addNoteFinished( const TQValueList &list, const TQVariant &id ) { int uid = list[ 0 ].toInt(); - mUidMap.insert( id.toString(), QString::number( uid ) ); + mUidMap.insert( id.toString(), TQString::number( uid ) ); mSynchronizer->stop(); } -void ResourceXMLRPC::updateNoteFinished( const QValueList&, const QVariant& ) +void ResourceXMLRPC::updateNoteFinished( const TQValueList&, const TQVariant& ) { mSynchronizer->stop(); } -void ResourceXMLRPC::deleteNoteFinished( const QValueList&, const QVariant &id ) +void ResourceXMLRPC::deleteNoteFinished( const TQValueList&, const TQVariant &id ) { mUidMap.erase( id.toString() ); @@ -306,13 +306,13 @@ void ResourceXMLRPC::deleteNoteFinished( const QValueList&, const QVar mSynchronizer->stop(); } -void ResourceXMLRPC::fault( int error, const QString& errorMsg, const QVariant& ) +void ResourceXMLRPC::fault( int error, const TQString& errorMsg, const TQVariant& ) { kdError() << "Server send error " << error << ": " << errorMsg << endl; mSynchronizer->stop(); } -void ResourceXMLRPC::writeNote( KCal::Journal* journal, QMap& args ) +void ResourceXMLRPC::writeNote( KCal::Journal* journal, TQMap& args ) { args.insert( "subject", journal->summary() ); args.insert( "des", journal->description() ); @@ -320,7 +320,7 @@ void ResourceXMLRPC::writeNote( KCal::Journal* journal, QMap& (journal->secrecy() == KCal::Journal::SecrecyPublic ? "public" : "private" ) ); } -void ResourceXMLRPC::readNote( const QMap& args, KCal::Journal *journal, QString &uid ) +void ResourceXMLRPC::readNote( const TQMap& args, KCal::Journal *journal, TQString &uid ) { uid = args[ "id" ].toString(); diff --git a/kresources/egroupware/knotes_resourcexmlrpc.h b/kresources/egroupware/knotes_resourcexmlrpc.h index 2f2934320..7301ef902 100644 --- a/kresources/egroupware/knotes_resourcexmlrpc.h +++ b/kresources/egroupware/knotes_resourcexmlrpc.h @@ -22,8 +22,8 @@ #ifndef KNOTES_RESOURCEXMLRPC_H #define KNOTES_RESOURCEXMLRPC_H -#include -#include +#include +#include #include #include @@ -66,34 +66,34 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceNotes bool addNote( KCal::Journal* ); bool deleteNote( KCal::Journal* ); - KCal::Alarm::List alarms( const QDateTime& from, const QDateTime& to ); + KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to ); protected slots: - void loginFinished( const QValueList&, const QVariant& ); - void logoutFinished( const QValueList&, const QVariant& ); + void loginFinished( const TQValueList&, const TQVariant& ); + void logoutFinished( const TQValueList&, const TQVariant& ); - void listNotesFinished( const QValueList&, const QVariant& ); - void addNoteFinished( const QValueList&, const QVariant& ); - void updateNoteFinished( const QValueList&, const QVariant& ); - void deleteNoteFinished( const QValueList&, const QVariant& ); + void listNotesFinished( const TQValueList&, const TQVariant& ); + void addNoteFinished( const TQValueList&, const TQVariant& ); + void updateNoteFinished( const TQValueList&, const TQVariant& ); + void deleteNoteFinished( const TQValueList&, const TQVariant& ); - void fault( int, const QString&, const QVariant& ); + void fault( int, const TQString&, const TQVariant& ); private: void init(); void initEGroupware(); - void writeNote( KCal::Journal*, QMap& ); - void readNote( const QMap&, KCal::Journal*, QString& ); + void writeNote( KCal::Journal*, TQMap& ); + void readNote( const TQMap&, KCal::Journal*, TQString& ); KCal::CalendarLocal mCalendar; KXMLRPC::Server *mServer; EGroupwarePrefs *mPrefs; - QString mSessionID; - QString mKp3; - QMap mUidMap; + TQString mSessionID; + TQString mKp3; + TQMap mUidMap; Synchronizer *mSynchronizer; }; diff --git a/kresources/egroupware/knotes_resourcexmlrpcconfig.cpp b/kresources/egroupware/knotes_resourcexmlrpcconfig.cpp index 6eee548ce..224cb9914 100644 --- a/kresources/egroupware/knotes_resourcexmlrpcconfig.cpp +++ b/kresources/egroupware/knotes_resourcexmlrpcconfig.cpp @@ -18,8 +18,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -34,32 +34,32 @@ using namespace KNotes; -ResourceXMLRPCConfig::ResourceXMLRPCConfig( QWidget* parent, const char* name ) +ResourceXMLRPCConfig::ResourceXMLRPCConfig( TQWidget* parent, const char* name ) : KRES::ConfigWidget( parent, name ) { - QGridLayout *mainLayout = new QGridLayout( this, 4, 2, 0, KDialog::spacingHint() ); + TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2, 0, KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "URL:" ), this ); + TQLabel *label = new TQLabel( i18n( "URL:" ), this ); mURL = new KURLRequester( this ); mainLayout->addWidget( label, 0, 0 ); mainLayout->addWidget( mURL, 0, 1 ); - label = new QLabel( i18n( "Domain:" ), this ); + label = new TQLabel( i18n( "Domain:" ), this ); mDomain = new KLineEdit( this ); mainLayout->addWidget( label, 1, 0 ); mainLayout->addWidget( mDomain, 1, 1 ); - label = new QLabel( i18n( "User:" ), this ); + label = new TQLabel( i18n( "User:" ), this ); mUser = new KLineEdit( this ); mainLayout->addWidget( label, 2, 0 ); mainLayout->addWidget( mUser, 2, 1 ); - label = new QLabel( i18n( "Password:" ), this ); + label = new TQLabel( i18n( "Password:" ), this ); mPassword = new KLineEdit( this ); - mPassword->setEchoMode( QLineEdit::Password ); + mPassword->setEchoMode( TQLineEdit::Password ); mainLayout->addWidget( label, 3, 0 ); mainLayout->addWidget( mPassword, 3, 1 ); diff --git a/kresources/egroupware/knotes_resourcexmlrpcconfig.h b/kresources/egroupware/knotes_resourcexmlrpcconfig.h index 7b3edab2e..63119ab72 100644 --- a/kresources/egroupware/knotes_resourcexmlrpcconfig.h +++ b/kresources/egroupware/knotes_resourcexmlrpcconfig.h @@ -35,7 +35,7 @@ class KDE_EXPORT ResourceXMLRPCConfig : public KRES::ConfigWidget Q_OBJECT public: - ResourceXMLRPCConfig( QWidget* parent = 0, const char* name = 0 ); + ResourceXMLRPCConfig( TQWidget* parent = 0, const char* name = 0 ); public slots: void loadSettings( KRES::Resource* ); diff --git a/kresources/egroupware/synchronizer.cpp b/kresources/egroupware/synchronizer.cpp index 928fc7e1d..f48542467 100644 --- a/kresources/egroupware/synchronizer.cpp +++ b/kresources/egroupware/synchronizer.cpp @@ -20,7 +20,7 @@ */ #include -#include +#include #include @@ -36,7 +36,7 @@ void Synchronizer::start() mBlocked = true; while ( mBlocked ) { - QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput ); + TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); // use sleep here to reduce cpu usage usleep( 100 ); diff --git a/kresources/egroupware/synchronizer.h b/kresources/egroupware/synchronizer.h index feac6bf31..ccb34d7cb 100644 --- a/kresources/egroupware/synchronizer.h +++ b/kresources/egroupware/synchronizer.h @@ -22,7 +22,7 @@ #ifndef SYNCHRONIZER_H #define SYNCHRONIZER_H -#include +#include /** A small helper class which blocks an asynchronous operation (e.g. a KIO request) @@ -37,8 +37,8 @@ ... job = KIO::file_copy( url, file, -1, true ); - connect( job, SIGNAL( result( KIO::Job * ) ), - SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotResult( KIO::Job * ) ) ); mSynchronizer.start(); // will block here until the slot was called ... diff --git a/kresources/egroupware/todostatemapper.cpp b/kresources/egroupware/todostatemapper.cpp index 6c81ded33..e983c3c99 100644 --- a/kresources/egroupware/todostatemapper.cpp +++ b/kresources/egroupware/todostatemapper.cpp @@ -19,22 +19,22 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include #include "todostatemapper.h" -QDataStream& operator<<( QDataStream &stream, const TodoStateMapper::TodoStateMapEntry &entry ) +TQDataStream& operator<<( TQDataStream &stream, const TodoStateMapper::TodoStateMapEntry &entry ) { stream << entry.uid << entry.localState << entry.remoteState; return stream; } -QDataStream& operator>>( QDataStream &stream, TodoStateMapper::TodoStateMapEntry &entry ) +TQDataStream& operator>>( TQDataStream &stream, TodoStateMapper::TodoStateMapEntry &entry ) { stream >> entry.uid >> entry.localState >> entry.remoteState; @@ -49,19 +49,19 @@ TodoStateMapper::~TodoStateMapper() { } -void TodoStateMapper::setPath( const QString &path ) +void TodoStateMapper::setPath( const TQString &path ) { mPath = path; } -void TodoStateMapper::setIdentifier( const QString &identifier ) +void TodoStateMapper::setIdentifier( const TQString &identifier ) { mIdentifier = identifier; } bool TodoStateMapper::load() { - QFile file( filename() ); + TQFile file( filename() ); if ( !file.open( IO_ReadOnly ) ) { kdError() << "Can't read uid map file '" << filename() << "'" << endl; return false; @@ -69,7 +69,7 @@ bool TodoStateMapper::load() clear(); - QDataStream stream; + TQDataStream stream; stream.setVersion( 6 ); stream.setDevice( &file ); stream >> mTodoStateMap; @@ -81,13 +81,13 @@ bool TodoStateMapper::load() bool TodoStateMapper::save() { - QFile file( filename() ); + TQFile file( filename() ); if ( !file.open( IO_WriteOnly ) ) { kdError() << "Can't write uid map file '" << filename() << "'" << endl; return false; } - QDataStream stream; + TQDataStream stream; stream.setVersion( 6 ); stream.setDevice( &file ); stream << mTodoStateMap; @@ -102,7 +102,7 @@ void TodoStateMapper::clear() mTodoStateMap.clear(); } -void TodoStateMapper::addTodoState( const QString &uid, int localState, const QString &remoteState ) +void TodoStateMapper::addTodoState( const TQString &uid, int localState, const TQString &remoteState ) { TodoStateMapEntry entry; entry.uid = uid; @@ -112,7 +112,7 @@ void TodoStateMapper::addTodoState( const QString &uid, int localState, const QS mTodoStateMap.insert( uid, entry ); } -QString TodoStateMapper::remoteState( const QString &uid, int localState ) +TQString TodoStateMapper::remoteState( const TQString &uid, int localState ) { if ( mTodoStateMap.find( uid ) == mTodoStateMap.end() ) kdError() << "TodoStateMapper: no entry for " << uid << " found" << endl; @@ -124,12 +124,12 @@ QString TodoStateMapper::remoteState( const QString &uid, int localState ) return toRemote( localState ); } -void TodoStateMapper::remove( const QString &uid ) +void TodoStateMapper::remove( const TQString &uid ) { mTodoStateMap.remove( uid ); } -int TodoStateMapper::toLocal( const QString &remoteState ) +int TodoStateMapper::toLocal( const TQString &remoteState ) { if ( remoteState == "offer" ) return 0; @@ -138,13 +138,13 @@ int TodoStateMapper::toLocal( const QString &remoteState ) else if ( remoteState == "done" || remoteState == "billed" ) return 100; else { - QString number( remoteState ); + TQString number( remoteState ); number.replace( "%", "" ); return number.toInt(); } } -QString TodoStateMapper::toRemote( int localState ) +TQString TodoStateMapper::toRemote( int localState ) { if ( localState == 0 ) return "offer"; @@ -153,12 +153,12 @@ QString TodoStateMapper::toRemote( int localState ) else if ( localState == 100 ) return "done"; else - return QString( "%1%" ).arg( localState ); + return TQString( "%1%" ).arg( localState ); } -QString TodoStateMapper::filename() +TQString TodoStateMapper::filename() { - QString file = mPath; + TQString file = mPath; if ( !file.endsWith( "/" ) ) file += "/"; file += mIdentifier; diff --git a/kresources/egroupware/todostatemapper.h b/kresources/egroupware/todostatemapper.h index c5590ef25..46c531cfc 100644 --- a/kresources/egroupware/todostatemapper.h +++ b/kresources/egroupware/todostatemapper.h @@ -22,8 +22,8 @@ #ifndef TODOSTATEMAPPER_H #define TODOSTATEMAPPER_H -#include -#include +#include +#include class TodoStateMapper { @@ -35,41 +35,41 @@ class TodoStateMapper TodoStateMapper(); ~TodoStateMapper(); - void setPath( const QString &path ); - void setIdentifier( const QString &identifier ); + void setPath( const TQString &path ); + void setIdentifier( const TQString &identifier ); bool load(); bool save(); void clear(); - void addTodoState( const QString &uid, int localState, const QString &remoteState ); + void addTodoState( const TQString &uid, int localState, const TQString &remoteState ); - QString remoteState( const QString &uid, int localState ); + TQString remoteState( const TQString &uid, int localState ); - void remove( const QString &uid ); + void remove( const TQString &uid ); - static int toLocal( const QString &remoteState ); - static QString toRemote( int localState ); + static int toLocal( const TQString &remoteState ); + static TQString toRemote( int localState ); protected: - QString filename(); + TQString filename(); private: - QString mPath; - QString mIdentifier; + TQString mPath; + TQString mIdentifier; typedef struct { - QString uid; + TQString uid; int localState; - QString remoteState; + TQString remoteState; } TodoStateMapEntry; - typedef QMap TodoStateMap; + typedef TQMap TodoStateMap; TodoStateMap mTodoStateMap; - friend QDataStream &operator<<( QDataStream&, const TodoStateMapEntry& ); - friend QDataStream &operator>>( QDataStream&, TodoStateMapEntry& ); + friend TQDataStream &operator<<( TQDataStream&, const TodoStateMapEntry& ); + friend TQDataStream &operator>>( TQDataStream&, TodoStateMapEntry& ); }; #endif diff --git a/kresources/egroupware/xmlrpciface.cpp b/kresources/egroupware/xmlrpciface.cpp index 0158e23d1..2d91edbde 100644 --- a/kresources/egroupware/xmlrpciface.cpp +++ b/kresources/egroupware/xmlrpciface.cpp @@ -8,7 +8,7 @@ * (at your option) any later version. * ***************************************************************************/ -#include +#include #include #include @@ -37,11 +37,11 @@ namespace KXMLRPC { return m_errorCode; } - QString errorString() const + TQString errorString() const { return m_errorString; } - QValueList data() const + TQValueList data() const { return m_data; } @@ -49,24 +49,24 @@ namespace KXMLRPC private: bool m_success; int m_errorCode; - QString m_errorString; - QValueList m_data; + TQString m_errorString; + TQValueList m_data; }; } -Query *Query::create( const QVariant &id, QObject *parent, const char *name ) +Query *Query::create( const TQVariant &id, TQObject *parent, const char *name ) { return new Query( id, parent, name ); } -void Query::call( const QString &server, const QString &method, - const QValueList &args, const QString &userAgent ) +void Query::call( const TQString &server, const TQString &method, + const TQValueList &args, const TQString &userAgent ) { - const QString xmlMarkup = markupCall( method, args ); + const TQString xmlMarkup = markupCall( method, args ); DebugDialog::addMessage( xmlMarkup, DebugDialog::Output ); - QByteArray postData; - QDataStream stream( postData, IO_WriteOnly ); + TQByteArray postData; + TQDataStream stream( postData, IO_WriteOnly ); stream.writeRawBytes( xmlMarkup.utf8(), xmlMarkup.utf8().length() ); KIO::TransferJob *job = KIO::http_post( KURL( server ), postData, false ); @@ -78,15 +78,15 @@ void Query::call( const QString &server, const QString &method, job->addMetaData( "content-type", "Content-Type: text/xml; charset=utf-8" ); job->addMetaData( "ConnectTimeout", "50" ); - connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), - this, SLOT( slotData( KIO::Job *, const QByteArray & ) ) ); - connect( job, SIGNAL( result( KIO::Job * ) ), - this, SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), + this, TQT_SLOT( slotData( KIO::Job *, const TQByteArray & ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + this, TQT_SLOT( slotResult( KIO::Job * ) ) ); m_pendingJobs.append( job ); } -void Query::slotData( KIO::Job *, const QByteArray &data ) +void Query::slotData( KIO::Job *, const TQByteArray &data ) { unsigned int oldSize = m_buffer.size(); m_buffer.resize( oldSize + data.size() ); @@ -104,11 +104,11 @@ void Query::slotResult( KIO::Job *job ) return ; } - QString data = QString::fromUtf8( m_buffer.data(), m_buffer.size() ); + TQString data = TQString::fromUtf8( m_buffer.data(), m_buffer.size() ); DebugDialog::addMessage( data, DebugDialog::Input ); - QDomDocument doc; - QString errMsg; + TQDomDocument doc; + TQString errMsg; int errLine, errCol; if ( !doc.setContent( data, false, &errMsg, &errLine, &errCol ) ) { @@ -134,17 +134,17 @@ void Query::slotResult( KIO::Job *job ) emit finished( this ); } -bool Query::isMessageResponse( const QDomDocument &doc ) const +bool Query::isMessageResponse( const TQDomDocument &doc ) const { return doc.documentElement().firstChild().toElement().tagName().lower() == "params"; } -Result Query::parseMessageResponse( const QDomDocument &doc ) const +Result Query::parseMessageResponse( const TQDomDocument &doc ) const { Result response; response.m_success = true; - QDomNode paramNode = doc.documentElement().firstChild().firstChild(); + TQDomNode paramNode = doc.documentElement().firstChild().firstChild(); while ( !paramNode.isNull() ) { response.m_data << demarshal( paramNode.firstChild().toElement() ); @@ -154,36 +154,36 @@ Result Query::parseMessageResponse( const QDomDocument &doc ) const return response; } -bool Query::isFaultResponse( const QDomDocument &doc ) const +bool Query::isFaultResponse( const TQDomDocument &doc ) const { return doc.documentElement().firstChild().toElement().tagName().lower() == "fault"; } -Result Query::parseFaultResponse( const QDomDocument &doc ) const +Result Query::parseFaultResponse( const TQDomDocument &doc ) const { Result response; response.m_success = false; - QDomNode errorNode = doc.documentElement().firstChild().firstChild(); - const QVariant errorVariant = demarshal( errorNode.toElement() ); + TQDomNode errorNode = doc.documentElement().firstChild().firstChild(); + const TQVariant errorVariant = demarshal( errorNode.toElement() ); response.m_errorCode = errorVariant.toMap() [ "faultCode" ].toInt(); response.m_errorString = errorVariant.toMap() [ "faultString" ].toString(); return response; } -QString Query::markupCall( const QString &cmd, - const QValueList &args ) const +TQString Query::markupCall( const TQString &cmd, + const TQValueList &args ) const { - QString markup = "\r\n\r\n"; + TQString markup = "\r\n\r\n"; markup += "" + cmd + "\r\n"; if ( !args.isEmpty() ) { markup += "\r\n"; - QValueList::ConstIterator it = args.begin(); - QValueList::ConstIterator end = args.end(); + TQValueList::ConstIterator it = args.begin(); + TQValueList::ConstIterator end = args.end(); for ( ; it != end; ++it ) markup += "\r\n" + marshal( *it ) + "\r\n"; markup += "\r\n"; @@ -194,52 +194,52 @@ QString Query::markupCall( const QString &cmd, return markup; } -QString Query::marshal( const QVariant &arg ) const +TQString Query::marshal( const TQVariant &arg ) const { switch ( arg.type() ) { - case QVariant::String: - case QVariant::CString: + case TQVariant::String: + case TQVariant::CString: { - QString result = arg.toString(); + TQString result = arg.toString(); result = result.replace( "&", "&" ); result = result.replace( "\"", """ ); result = result.replace( "<", "<" ); result = result.replace( ">", ">" ); return "" + result + "\r\n"; } - case QVariant::Int: - return "" + QString::number( arg.toInt() ) + "\r\n"; - case QVariant::Double: - return "" + QString::number( arg.toDouble() ) + "\r\n"; - case QVariant::Bool: + case TQVariant::Int: + return "" + TQString::number( arg.toInt() ) + "\r\n"; + case TQVariant::Double: + return "" + TQString::number( arg.toDouble() ) + "\r\n"; + case TQVariant::Bool: { - QString markup = ""; + TQString markup = ""; markup += arg.toBool() ? "1" : "0"; markup += "\r\n"; return markup; } - case QVariant::ByteArray: + case TQVariant::ByteArray: return "" + KCodecs::base64Encode( arg.toByteArray() ) + "\r\n"; - case QVariant::DateTime: + case TQVariant::DateTime: return "" + arg.toDateTime().toString( Qt::ISODate ) + "\r\n"; - case QVariant::List: + case TQVariant::List: { - QString markup = "\r\n"; - const QValueList args = arg.toList(); - QValueList::ConstIterator it = args.begin(); - QValueList::ConstIterator end = args.end(); + TQString markup = "\r\n"; + const TQValueList args = arg.toList(); + TQValueList::ConstIterator it = args.begin(); + TQValueList::ConstIterator end = args.end(); for ( ; it != end; ++it ) markup += marshal( *it ); markup += "\r\n"; return markup; } - case QVariant::Map: + case TQVariant::Map: { - QString markup = "\r\n"; - QMap map = arg.toMap(); - QMap::ConstIterator it = map.begin(); - QMap::ConstIterator end = map.end(); + TQString markup = "\r\n"; + TQMap map = arg.toMap(); + TQMap::ConstIterator it = map.begin(); + TQMap::ConstIterator end = map.end(); for ( ; it != end; ++it ) { markup += "\r\n"; @@ -253,76 +253,76 @@ QString Query::marshal( const QVariant &arg ) const default: kdWarning() << "Failed to marshal unknown variant type: " << arg.type() << endl; }; - return QString::null; + return TQString::null; } -QVariant Query::demarshal( const QDomElement &elem ) const +TQVariant Query::demarshal( const TQDomElement &elem ) const { Q_ASSERT( elem.tagName().lower() == "value" ); - const QDomElement typeElement = elem.firstChild().toElement(); - const QString typeName = typeElement.tagName().lower(); + const TQDomElement typeElement = elem.firstChild().toElement(); + const TQString typeName = typeElement.tagName().lower(); if ( typeName == "string" ) - return QVariant( typeElement.text() ); + return TQVariant( typeElement.text() ); else if ( typeName == "i4" || typeName == "int" ) - return QVariant( typeElement.text().toInt() ); + return TQVariant( typeElement.text().toInt() ); else if ( typeName == "double" ) - return QVariant( typeElement.text().toDouble() ); + return TQVariant( typeElement.text().toDouble() ); else if ( typeName == "boolean" ) { if ( typeElement.text().lower() == "true" || typeElement.text() == "1" ) - return QVariant( true ); + return TQVariant( true ); else - return QVariant( false ); + return TQVariant( false ); } else if ( typeName == "base64" ) - return QVariant( KCodecs::base64Decode( typeElement.text().latin1() ) ); + return TQVariant( KCodecs::base64Decode( typeElement.text().latin1() ) ); else if ( typeName == "datetime" || typeName == "datetime.iso8601" ) - return QVariant( QDateTime::fromString( typeElement.text(), Qt::ISODate ) ); + return TQVariant( TQDateTime::fromString( typeElement.text(), Qt::ISODate ) ); else if ( typeName == "array" ) { - QValueList values; - QDomNode valueNode = typeElement.firstChild().firstChild(); + TQValueList values; + TQDomNode valueNode = typeElement.firstChild().firstChild(); while ( !valueNode.isNull() ) { values << demarshal( valueNode.toElement() ); valueNode = valueNode.nextSibling(); } - return QVariant( values ); + return TQVariant( values ); } else if ( typeName == "struct" ) { - QMap map; - QDomNode memberNode = typeElement.firstChild(); + TQMap map; + TQDomNode memberNode = typeElement.firstChild(); while ( !memberNode.isNull() ) { - const QString key = memberNode.toElement().elementsByTagName( "name" ).item( 0 ).toElement().text(); - const QVariant data = demarshal( memberNode.toElement().elementsByTagName( "value" ).item( 0 ).toElement() ); + const TQString key = memberNode.toElement().elementsByTagName( "name" ).item( 0 ).toElement().text(); + const TQVariant data = demarshal( memberNode.toElement().elementsByTagName( "value" ).item( 0 ).toElement() ); map[ key ] = data; memberNode = memberNode.nextSibling(); } - return QVariant( map ); + return TQVariant( map ); } else kdWarning() << "Cannot demarshal unknown type " << typeName << endl; - return QVariant(); + return TQVariant(); } -Query::Query( const QVariant &id, QObject *parent, const char *name ) - : QObject( parent, name ), m_id( id ) +Query::Query( const TQVariant &id, TQObject *parent, const char *name ) + : TQObject( parent, name ), m_id( id ) {} Query::~Query() { - QValueList::Iterator it; + TQValueList::Iterator it; for ( it = m_pendingJobs.begin(); it != m_pendingJobs.end(); ++it ) (*it)->kill(); } -Server::Server( const KURL &url, QObject *parent, const char *name ) - : QObject( parent, name ) +Server::Server( const KURL &url, TQObject *parent, const char *name ) + : TQObject( parent, name ) { if ( url.isValid() ) m_url = url; @@ -334,7 +334,7 @@ Server::Server( const KURL &url, QObject *parent, const char *name ) Server::~Server() { - QValueList::Iterator it; + TQValueList::Iterator it; for ( it = mPendingQueries.begin(); it !=mPendingQueries.end(); ++it ) (*it)->deleteLater(); @@ -352,112 +352,112 @@ void Server::setUrl( const KURL &url ) m_url = url.isValid() ? url : KURL(); } -void Server::call( const QString &method, const QValueList &args, - QObject* msgObj, const char* messageSlot, - QObject* faultObj, const char* faultSlot, const QVariant &id ) +void Server::call( const TQString &method, const TQValueList &args, + TQObject* msgObj, const char* messageSlot, + TQObject* faultObj, const char* faultSlot, const TQVariant &id ) { if ( m_url.isEmpty() ) kdWarning() << "Cannot execute call to " << method << ": empty server URL" << endl; Query *query = Query::create( id, this ); - connect( query, SIGNAL( message( const QValueList &, const QVariant& ) ), msgObj, messageSlot ); - connect( query, SIGNAL( fault( int, const QString&, const QVariant& ) ), faultObj, faultSlot ); - connect( query, SIGNAL( finished( Query* ) ), this, SLOT( queryFinished( Query* ) ) ); + connect( query, TQT_SIGNAL( message( const TQValueList &, const TQVariant& ) ), msgObj, messageSlot ); + connect( query, TQT_SIGNAL( fault( int, const TQString&, const TQVariant& ) ), faultObj, faultSlot ); + connect( query, TQT_SIGNAL( finished( Query* ) ), this, TQT_SLOT( queryFinished( Query* ) ) ); mPendingQueries.append( query ); query->call( m_url.url(), method, args, m_userAgent ); } -void Server::call( const QString &method, const QVariant &arg, - QObject* msgObj, const char* messageSlot, - QObject* faultObj, const char* faultSlot, - const QVariant &id ) +void Server::call( const TQString &method, const TQVariant &arg, + TQObject* msgObj, const char* messageSlot, + TQObject* faultObj, const char* faultSlot, + const TQVariant &id ) { - QValueList args; + TQValueList args; args << arg ; call( method, args, msgObj, messageSlot, faultObj, faultSlot, id ); } -void Server::call( const QString &method, int arg, - QObject* msgObj, const char* messageSlot, - QObject* faultObj, const char* faultSlot, - const QVariant &id ) +void Server::call( const TQString &method, int arg, + TQObject* msgObj, const char* messageSlot, + TQObject* faultObj, const char* faultSlot, + const TQVariant &id ) { - QValueList args; - args << QVariant( arg ); + TQValueList args; + args << TQVariant( arg ); call( method, args, msgObj, messageSlot, faultObj, faultSlot, id ); } -void Server::call( const QString &method, bool arg, - QObject* msgObj, const char* messageSlot, - QObject* faultObj, const char* faultSlot, - const QVariant &id ) +void Server::call( const TQString &method, bool arg, + TQObject* msgObj, const char* messageSlot, + TQObject* faultObj, const char* faultSlot, + const TQVariant &id ) { - QValueList args; - args << QVariant( arg ); + TQValueList args; + args << TQVariant( arg ); call( method, args, msgObj, messageSlot, faultObj, faultSlot, id ); } -void Server::call( const QString &method, double arg , - QObject* msgObj, const char* messageSlot, - QObject* faultObj, const char* faultSlot, - const QVariant &id ) +void Server::call( const TQString &method, double arg , + TQObject* msgObj, const char* messageSlot, + TQObject* faultObj, const char* faultSlot, + const TQVariant &id ) { - QValueList args; - args << QVariant( arg ); + TQValueList args; + args << TQVariant( arg ); call( method, args, msgObj, messageSlot, faultObj, faultSlot, id ); } -void Server::call( const QString &method, const QString &arg , - QObject* msgObj, const char* messageSlot, - QObject* faultObj, const char* faultSlot, - const QVariant &id ) +void Server::call( const TQString &method, const TQString &arg , + TQObject* msgObj, const char* messageSlot, + TQObject* faultObj, const char* faultSlot, + const TQVariant &id ) { - QValueList args; - args << QVariant( arg ); + TQValueList args; + args << TQVariant( arg ); call( method, args, msgObj, messageSlot, faultObj, faultSlot, id ); } -void Server::call( const QString &method, const QCString &arg, - QObject* msgObj, const char* messageSlot, - QObject* faultObj, const char* faultSlot, - const QVariant &id ) +void Server::call( const TQString &method, const TQCString &arg, + TQObject* msgObj, const char* messageSlot, + TQObject* faultObj, const char* faultSlot, + const TQVariant &id ) { - QValueList args; - args << QVariant( arg ); + TQValueList args; + args << TQVariant( arg ); call( method, args, msgObj, messageSlot, faultObj, faultSlot, id ); } -void Server::call( const QString &method, const QByteArray &arg , - QObject* msgObj, const char* messageSlot, - QObject* faultObj, const char* faultSlot, - const QVariant &id ) +void Server::call( const TQString &method, const TQByteArray &arg , + TQObject* msgObj, const char* messageSlot, + TQObject* faultObj, const char* faultSlot, + const TQVariant &id ) { - QValueList args; - args << QVariant( arg ); + TQValueList args; + args << TQVariant( arg ); call( method, args, faultObj, faultSlot, msgObj, messageSlot, id ); } -void Server::call( const QString &method, const QDateTime &arg, - QObject* msgObj, const char* messageSlot, - QObject* faultObj, const char* faultSlot, - const QVariant &id ) +void Server::call( const TQString &method, const TQDateTime &arg, + TQObject* msgObj, const char* messageSlot, + TQObject* faultObj, const char* faultSlot, + const TQVariant &id ) { - QValueList args; - args << QVariant( arg ); + TQValueList args; + args << TQVariant( arg ); call( method, args, msgObj, messageSlot, faultObj, faultSlot, id ); } -void Server::call( const QString &method, const QStringList &arg, - QObject* msgObj, const char* messageSlot, - QObject* faultObj, const char* faultSlot, - const QVariant &id ) +void Server::call( const TQString &method, const TQStringList &arg, + TQObject* msgObj, const char* messageSlot, + TQObject* faultObj, const char* faultSlot, + const TQVariant &id ) { - QValueList args; - QStringList::ConstIterator it = arg.begin(); - QStringList::ConstIterator end = arg.end(); + TQValueList args; + TQStringList::ConstIterator it = arg.begin(); + TQStringList::ConstIterator end = arg.end(); for ( ; it != end; ++it ) - args << QVariant( *it ); + args << TQVariant( *it ); call( method, args, msgObj, messageSlot, faultObj, faultSlot, id ); } diff --git a/kresources/egroupware/xmlrpciface.h b/kresources/egroupware/xmlrpciface.h index 0e5f6c927..a1460c21c 100644 --- a/kresources/egroupware/xmlrpciface.h +++ b/kresources/egroupware/xmlrpciface.h @@ -12,11 +12,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace KIO { @@ -36,42 +36,42 @@ namespace KXMLRPC public: - static Query *create( const QVariant &id = QVariant(), - QObject *parent = 0, const char *name = 0 ); + static Query *create( const TQVariant &id = TQVariant(), + TQObject *parent = 0, const char *name = 0 ); public slots: - void call( const QString &server, const QString &method, - const QValueList &args = QValueList(), - const QString &userAgent = "KDE-XMLRPC" ); + void call( const TQString &server, const TQString &method, + const TQValueList &args = TQValueList(), + const TQString &userAgent = "KDE-XMLRPC" ); signals: - void message( const QValueList &result, const QVariant &id ); - void fault( int, const QString&, const QVariant &id ); + void message( const TQValueList &result, const TQVariant &id ); + void fault( int, const TQString&, const TQVariant &id ); void finished( Query* ); private slots: - void slotData( KIO::Job *job, const QByteArray &data ); + void slotData( KIO::Job *job, const TQByteArray &data ); void slotResult( KIO::Job *job ); private: - bool isMessageResponse( const QDomDocument &doc ) const; - bool isFaultResponse( const QDomDocument &doc ) const; + bool isMessageResponse( const TQDomDocument &doc ) const; + bool isFaultResponse( const TQDomDocument &doc ) const; - Result parseMessageResponse( const QDomDocument &doc ) const; - Result parseFaultResponse( const QDomDocument &doc ) const; + Result parseMessageResponse( const TQDomDocument &doc ) const; + Result parseFaultResponse( const TQDomDocument &doc ) const; - QString markupCall( const QString &method, - const QValueList &args ) const; - QString marshal( const QVariant &v ) const; - QVariant demarshal( const QDomElement &e ) const; + TQString markupCall( const TQString &method, + const TQValueList &args ) const; + TQString marshal( const TQVariant &v ) const; + TQVariant demarshal( const TQDomElement &e ) const; - Query( const QVariant &id, QObject *parent = 0, const char *name = 0 ); + Query( const TQVariant &id, TQObject *parent = 0, const char *name = 0 ); ~Query(); - QByteArray m_buffer; - QVariant m_id; + TQByteArray m_buffer; + TQVariant m_id; - QValueList m_pendingJobs; + TQValueList m_pendingJobs; }; class Server : public QObject @@ -79,85 +79,85 @@ namespace KXMLRPC Q_OBJECT public: Server( const KURL &url = KURL(), - QObject *parent = 0, const char *name = 0 ); + TQObject *parent = 0, const char *name = 0 ); ~Server(); const KURL &url() const { return m_url; } void setUrl( const KURL &url ); - QString userAgent() const { return m_userAgent; } - void setUserAgent( const QString &userAgent ) { m_userAgent = userAgent; } + TQString userAgent() const { return m_userAgent; } + void setUserAgent( const TQString &userAgent ) { m_userAgent = userAgent; } template - void call( const QString &method, const QValueList &arg, - QObject* obj1, const char* faultSlot, - QObject* obj2, const char* messageSlot, const QVariant &id = QVariant() ); + void call( const TQString &method, const TQValueList &arg, + TQObject* obj1, const char* faultSlot, + TQObject* obj2, const char* messageSlot, const TQVariant &id = TQVariant() ); public slots: - void call( const QString &method, const QValueList &args, - QObject* faultObj, const char* faultSlot, - QObject* msgObj, const char* messageSlot, - const QVariant &id = QVariant() ); - void call( const QString &method, const QVariant &arg, - QObject* faultObj, const char* faultSlot, - QObject* msgObj, const char* messageSlot, - const QVariant &id = QVariant() ); - void call( const QString &method, int arg , - QObject* faultObj, const char* faultSlot, - QObject* msgObj, const char* messageSlot, - const QVariant &id = QVariant() ); - void call( const QString &method, bool arg, - QObject* faultObj, const char* faultSlot, - QObject* msgObj, const char* messageSlot, - const QVariant &id = QVariant() ); - void call( const QString &method, double arg, - QObject* faultObj, const char* faultSlot, - QObject* msgObj, const char* messageSlot, - const QVariant &id = QVariant() ); - void call( const QString &method, const QString &arg, - QObject* faultObj, const char* faultSlot, - QObject* msgObj, const char* messageSlot, - const QVariant &id = QVariant() ); - void call( const QString &method, const QCString &arg , - QObject* faultObj, const char* faultSlot, - QObject* msgObj, const char* messageSlot, - const QVariant &id = QVariant() ); - void call( const QString &method, const QByteArray &arg, - QObject* faultObj, const char* faultSlot, - QObject* msgObj, const char* messageSlot, - const QVariant &id = QVariant() ); - void call( const QString &method, const QDateTime &arg, - QObject* faultObj, const char* faultSlot, - QObject* msgObj, const char* messageSlot, - const QVariant &id = QVariant() ); - void call( const QString &method, const QStringList &arg, - QObject* faultObj, const char* faultSlot, - QObject* msgObj, const char* messageSlot, - const QVariant &id = QVariant() ); + void call( const TQString &method, const TQValueList &args, + TQObject* faultObj, const char* faultSlot, + TQObject* msgObj, const char* messageSlot, + const TQVariant &id = TQVariant() ); + void call( const TQString &method, const TQVariant &arg, + TQObject* faultObj, const char* faultSlot, + TQObject* msgObj, const char* messageSlot, + const TQVariant &id = TQVariant() ); + void call( const TQString &method, int arg , + TQObject* faultObj, const char* faultSlot, + TQObject* msgObj, const char* messageSlot, + const TQVariant &id = TQVariant() ); + void call( const TQString &method, bool arg, + TQObject* faultObj, const char* faultSlot, + TQObject* msgObj, const char* messageSlot, + const TQVariant &id = TQVariant() ); + void call( const TQString &method, double arg, + TQObject* faultObj, const char* faultSlot, + TQObject* msgObj, const char* messageSlot, + const TQVariant &id = TQVariant() ); + void call( const TQString &method, const TQString &arg, + TQObject* faultObj, const char* faultSlot, + TQObject* msgObj, const char* messageSlot, + const TQVariant &id = TQVariant() ); + void call( const TQString &method, const TQCString &arg , + TQObject* faultObj, const char* faultSlot, + TQObject* msgObj, const char* messageSlot, + const TQVariant &id = TQVariant() ); + void call( const TQString &method, const TQByteArray &arg, + TQObject* faultObj, const char* faultSlot, + TQObject* msgObj, const char* messageSlot, + const TQVariant &id = TQVariant() ); + void call( const TQString &method, const TQDateTime &arg, + TQObject* faultObj, const char* faultSlot, + TQObject* msgObj, const char* messageSlot, + const TQVariant &id = TQVariant() ); + void call( const TQString &method, const TQStringList &arg, + TQObject* faultObj, const char* faultSlot, + TQObject* msgObj, const char* messageSlot, + const TQVariant &id = TQVariant() ); private slots: void queryFinished( Query* ); private: KURL m_url; - QString m_userAgent; + TQString m_userAgent; - QValueList mPendingQueries; + TQValueList mPendingQueries; }; } template -void KXMLRPC::Server::call( const QString &method, const QValueList &arg, - QObject* faultObj, const char* faultSlot, - QObject* msgObj, const char* messageSlot, const QVariant &id ) +void KXMLRPC::Server::call( const TQString &method, const TQValueList &arg, + TQObject* faultObj, const char* faultSlot, + TQObject* msgObj, const char* messageSlot, const TQVariant &id ) { - QValueList args; + TQValueList args; - typename QValueList::ConstIterator it = arg.begin(); - typename QValueList::ConstIterator end = arg.end(); + typename TQValueList::ConstIterator it = arg.begin(); + typename TQValueList::ConstIterator end = arg.end(); for ( ; it != end; ++it ) - args << QVariant( *it ); + args << TQVariant( *it ); return call( method, args, faultObj, faultSlot, msgObj, messageSlot, id ); } -- cgit v1.2.1