diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kresources/egroupware | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources/egroupware')
20 files changed, 699 insertions, 699 deletions
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 <qfile.h> -#include <qfiledialog.h> -#include <qlayout.h> +#include <tqfile.h> +#include <tqfiledialog.h> +#include <tqlayout.h> #include <ktextbrowser.h> #include <kstaticdeleter.h> @@ -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", "<br>" ); 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 <qapplication.h> +#include <tqapplication.h> #include <kabc/addressee.h> #include <kabprefs.h> @@ -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<QString, QVariant> args; + TQMap<TQString, TQVariant> 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( "system.login", TQVariant( args ), + this, TQT_SLOT( loginFinished( const TQValueList<TQVariant>&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); mSynchronizer->start(); @@ -166,13 +166,13 @@ bool ResourceXMLRPC::doOpen() void ResourceXMLRPC::doClose() { - QMap<QString, QVariant> args; + TQMap<TQString, TQVariant> args; args.insert( "sessionid", mSessionID ); args.insert( "kp3", mKp3 ); - mServer->call( "system.logout", QVariant( args ), - this, SLOT( logoutFinished( const QValueList<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( "system.logout", TQVariant( args ), + this, TQT_SLOT( logoutFinished( const TQValueList<TQVariant>&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); mSynchronizer->start(); } @@ -193,7 +193,7 @@ bool ResourceXMLRPC::asyncLoad() loadCache(); - QMap<QString, QVariant> args; + TQMap<TQString, TQVariant> 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + this, TQT_SLOT( listContactsFinished( const TQValueList<TQVariant>&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); - mServer->call( LoadCategoriesCommand, QVariant( false, 0 ), - this, SLOT( loadCategoriesFinished( const QValueList<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( LoadCategoriesCommand, TQVariant( false, 0 ), + this, TQT_SLOT( loadCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); - mServer->call( LoadCustomFieldsCommand, QVariant( QValueList<QVariant>() ), - this, SLOT( loadCustomFieldsFinished( const QValueList<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( LoadCustomFieldsCommand, TQVariant( TQValueList<TQVariant>() ), + this, TQT_SLOT( loadCustomFieldsFinished( const TQValueList<TQVariant>&, 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<QString, QVariant> args; + TQMap<TQString, TQVariant> args; writeContact( addr, args ); mServer->call( AddContactCommand, args, - this, SLOT( addContactFinished( const QValueList<QVariant>&, const QVariant& ) ), - this, SLOT( addContactFault( int, const QString&, const QVariant& ) ), - QVariant( addr.uid() ) ); + this, TQT_SLOT( addContactFinished( const TQValueList<TQVariant>&, 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<QString, QVariant> args; + TQMap<TQString, TQVariant> args; writeContact( addr, args ); args.insert( "id", idMapper().remoteId( addr.uid() ) ); mServer->call( AddContactCommand, args, - this, SLOT( updateContactFinished( const QValueList<QVariant>&, const QVariant& ) ), - this, SLOT( updateContactFault( int, const QString&, const QVariant& ) ), - QVariant( addr.uid() ) ); + this, TQT_SLOT( updateContactFinished( const TQValueList<TQVariant>&, 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<QVariant>&, const QVariant& ) ), - this, SLOT( deleteContactFault( int, const QString&, const QVariant& ) ), - QVariant( addr.uid() ) ); + this, TQT_SLOT( deleteContactFinished( const TQValueList<TQVariant>&, const TQVariant& ) ), + this, TQT_SLOT( deleteContactFault( int, const TQString&, const TQVariant& ) ), + TQVariant( addr.uid() ) ); } -void ResourceXMLRPC::loginFinished( const QValueList<QVariant> &variant, - const QVariant& ) +void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant> &variant, + const TQVariant& ) { - QMap<QString, QVariant> map = variant[0].toMap(); + TQMap<TQString, TQVariant> map = variant[0].toMap(); KURL url( mPrefs->url() ); if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed @@ -307,10 +307,10 @@ void ResourceXMLRPC::loginFinished( const QValueList<QVariant> &variant, mSynchronizer->stop(); } -void ResourceXMLRPC::logoutFinished( const QValueList<QVariant> &variant, - const QVariant& ) +void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant> &variant, + const TQVariant& ) { - QMap<QString, QVariant> map = variant[0].toMap(); + TQMap<TQString, TQVariant> 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<QVariant> &variant, mSynchronizer->stop(); } -void ResourceXMLRPC::listContactsFinished( const QValueList<QVariant> &mapList, - const QVariant& ) +void ResourceXMLRPC::listContactsFinished( const TQValueList<TQVariant> &mapList, + const TQVariant& ) { - const QValueList<QVariant> contactList = mapList[ 0 ].toList(); - QValueList<QVariant>::ConstIterator contactIt; + const TQValueList<TQVariant> contactList = mapList[ 0 ].toList(); + TQValueList<TQVariant>::ConstIterator contactIt; KABC::Addressee::List serverContacts; for ( contactIt = contactList.begin(); contactIt != contactList.end(); ++contactIt ) { - const QMap<QString, QVariant> map = (*contactIt).toMap(); + const TQMap<TQString, TQVariant> map = (*contactIt).toMap(); Addressee addr; - QString uid; + TQString uid; readContact( map, addr, uid ); @@ -343,7 +343,7 @@ void ResourceXMLRPC::listContactsFinished( const QValueList<QVariant> &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<QVariant> &mapList, emit loadingFinished( this ); } -void ResourceXMLRPC::addContactFinished( const QValueList<QVariant> &list, - const QVariant &id ) +void ResourceXMLRPC::addContactFinished( const TQValueList<TQVariant> &list, + const TQVariant &id ) { clearChange( id.toString() ); idMapper().setRemoteId( id.toString(), list[ 0 ].toString() ); @@ -370,16 +370,16 @@ void ResourceXMLRPC::addContactFinished( const QValueList<QVariant> &list, saveCache(); } -void ResourceXMLRPC::updateContactFinished( const QValueList<QVariant>&, - const QVariant &id ) +void ResourceXMLRPC::updateContactFinished( const TQValueList<TQVariant>&, + const TQVariant &id ) { clearChange( id.toString() ); saveCache(); } -void ResourceXMLRPC::deleteContactFinished( const QValueList<QVariant>&, - const QVariant &id ) +void ResourceXMLRPC::deleteContactFinished( const TQValueList<TQVariant>&, + const TQVariant &id ) { clearChange( id.toString() ); idMapper().removeRemoteId( idMapper().remoteId( id.toString() ) ); @@ -387,38 +387,38 @@ void ResourceXMLRPC::deleteContactFinished( const QValueList<QVariant>&, saveCache(); } -void ResourceXMLRPC::fault( int error, const QString &errorMsg, - const QVariant& ) +void ResourceXMLRPC::fault( int error, const TQString &errorMsg, + const TQVariant& ) { - QString msg = i18n( "<qt>Server sent error %1: <b>%2</b></qt>" ).arg( error ).arg( errorMsg ); + TQString msg = i18n( "<qt>Server sent error %1: <b>%2</b></qt>" ).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<QString, int>::ConstIterator it; + TQStringList types; + TQMap<TQString, int>::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<QString, QVariant> &args ) +void ResourceXMLRPC::writeContact( const Addressee &addr, TQMap<TQString, TQVariant> &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<QString, QVariant args.insert( "title", addr.title() ); // CATEGORIES - QStringList::ConstIterator catIt; - const QStringList categories = addr.categories(); + TQStringList::ConstIterator catIt; + const TQStringList categories = addr.categories(); - QMap<QString, QVariant> catMap; + TQMap<TQString, TQVariant> catMap; int counter = 0; for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { - QMap<QString, int>::ConstIterator it = mCategoryMap.find( *catIt ); + TQMap<TQString, int>::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, QMap<QString, QVariant } - const QStringList customFields = addr.customs(); - QStringList::ConstIterator it; + const TQStringList customFields = addr.customs(); + TQStringList::ConstIterator it; for ( it = customFields.begin(); it != customFields.end(); ++it ) { int colon = (*it).find( ":" ); - QString identifier = (*it).left( colon ); + TQString identifier = (*it).left( colon ); int dash = identifier.find( "-" ); - QString app = identifier.left( dash ); - QString name = identifier.mid( dash + 1 ); - QString value = (*it).mid( colon + 1 ); + TQString app = identifier.left( dash ); + TQString name = identifier.mid( dash + 1 ); + TQString value = (*it).mid( colon + 1 ); if ( value.isEmpty() ) continue; @@ -585,16 +585,16 @@ void ResourceXMLRPC::writeContact( const Addressee &addr, QMap<QString, QVariant args.insert( name, value ); } - QString url = KCal::FreeBusyUrlStore::self()->readUrl( addr.preferredEmail() ); + TQString url = KCal::FreeBusyUrlStore::self()->readUrl( addr.preferredEmail() ); if ( !url.isEmpty() ) args.insert( "freebusy_url", url ); } -void ResourceXMLRPC::readContact( const QMap<QString, QVariant> &args, Addressee &addr, QString &uid ) +void ResourceXMLRPC::readContact( const TQMap<TQString, TQVariant> &args, Addressee &addr, TQString &uid ) { Address addrOne, addrTwo; - QMap<QString, QVariant>::ConstIterator it; + TQMap<TQString, TQVariant>::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<QString, QVariant> &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<QString, QVariant> &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<QString, QVariant> &args, Addressee addr.insertEmail( it.data().toString(), false ); } else if ( it.key() == "email_home_type" ) { } else if ( it.key() == "cat_id" ) { - const QMap<QString, QVariant> categories = it.data().toMap(); - QMap<QString, QVariant>::ConstIterator it; + const TQMap<TQString, TQVariant> categories = it.data().toMap(); + TQMap<TQString, TQVariant>::ConstIterator it; for ( it = categories.begin(); it != categories.end(); ++it ) addr.insertCategory( it.data().toString() ); @@ -717,7 +717,7 @@ void ResourceXMLRPC::readContact( const QMap<QString, QVariant> &args, Addressee } } - QMap<QString, QString>::ConstIterator cfIt; + TQMap<TQString, TQString>::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<QString, QVariant> &args, Addressee addr.insertAddress( addrTwo ); } -void ResourceXMLRPC::loadCategoriesFinished( const QValueList<QVariant> &mapList, - const QVariant& ) +void ResourceXMLRPC::loadCategoriesFinished( const TQValueList<TQVariant> &mapList, + const TQVariant& ) { mCategoryMap.clear(); - const QMap<QString, QVariant> map = mapList[ 0 ].toMap(); - QMap<QString, QVariant>::ConstIterator it; + const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap(); + TQMap<TQString, TQVariant>::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<QVariant> &mapList } } -void ResourceXMLRPC::loadCustomFieldsFinished( const QValueList<QVariant> &mapList, - const QVariant& ) +void ResourceXMLRPC::loadCustomFieldsFinished( const TQValueList<TQVariant> &mapList, + const TQVariant& ) { mCustomFieldsMap.clear(); - const QMap<QString, QVariant> map = mapList[ 0 ].toMap(); - QMap<QString, QVariant>::ConstIterator it; + const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap(); + TQMap<TQString, TQVariant>::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 <qmap.h> +#include <tqmap.h> #include <kdepimmacros.h> #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<QVariant>&, const QVariant& ); - void logoutFinished( const QValueList<QVariant>&, const QVariant& ); + void loginFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void logoutFinished( const TQValueList<TQVariant>&, const TQVariant& ); - void listContactsFinished( const QValueList<QVariant>&, const QVariant& ); - void addContactFinished( const QValueList<QVariant>&, const QVariant& ); - void updateContactFinished( const QValueList<QVariant>&, const QVariant& ); - void deleteContactFinished( const QValueList<QVariant>&, const QVariant& ); - void loadCategoriesFinished( const QValueList<QVariant>&, const QVariant& ); - void loadCustomFieldsFinished( const QValueList<QVariant>&, const QVariant& ); + void listContactsFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void addContactFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void updateContactFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void deleteContactFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void loadCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void loadCustomFieldsFinished( const TQValueList<TQVariant>&, 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<QString, QVariant>& ); - void readContact( const QMap<QString, QVariant>&, Addressee &addr, QString& ); + void writeContact( const Addressee&, TQMap<TQString, TQVariant>& ); + void readContact( const TQMap<TQString, TQVariant>&, Addressee &addr, TQString& ); EGroupwarePrefs *mPrefs; - QString mSessionID; - QString mKp3; + TQString mSessionID; + TQString mKp3; - QMap<QString, int> mCategoryMap; - QMap<QString, int> mAddrTypes; - QMap<QString, QString> mCustomFieldsMap; + TQMap<TQString, int> mCategoryMap; + TQMap<TQString, int> mAddrTypes; + TQMap<TQString, TQString> 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 <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kdebug.h> #include <kdialog.h> @@ -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 <stdlib.h> #include <typeinfo> -#include <qapplication.h> -#include <qdatetime.h> -#include <qptrlist.h> -#include <qstringlist.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqdatetime.h> +#include <tqptrlist.h> +#include <tqstringlist.h> +#include <tqtimer.h> #include <kabc/locknull.h> #include <kdebug.h> @@ -83,19 +83,19 @@ typedef KRES::PluginFactory<ResourceXMLRPC, ResourceXMLRPCConfig> 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<QString, QVariant> args; + TQMap<TQString, TQVariant> 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( "system.login", TQVariant( args ), + this, TQT_SLOT( loginFinished( const TQValueList<TQVariant>&, 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<QString, QVariant> args; + TQMap<TQString, TQVariant> args; args.insert( "sessionid", mSessionID ); args.insert( "kp3", mKp3 ); - mServer->call( "system.logout", QVariant( args ), - this, SLOT( logoutFinished( const QValueList<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( "system.logout", TQVariant( args ), + this, TQT_SLOT( logoutFinished( const TQValueList<TQVariant>&, 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<QString, QVariant> args, columns; - args.insert( "start", QDateTime( QDate::currentDate().addDays( -12 ) ) ); - args.insert( "end", QDateTime( QDate::currentDate().addDays( 2000 ) ) ); + TQMap<TQString, TQVariant> 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + this, TQT_SLOT( listEventsFinished( const TQValueList<TQVariant>&, 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + this, TQT_SLOT( listTodosFinished( const TQValueList<TQVariant>&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); - mServer->call( LoadEventCategoriesCommand, QVariant( QMap<QString, QVariant>() ), - this, SLOT( loadEventCategoriesFinished( const QValueList<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( LoadEventCategoriesCommand, TQVariant( TQMap<TQString, TQVariant>() ), + this, TQT_SLOT( loadEventCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& ) ), + this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); - mServer->call( LoadTodoCategoriesCommand, QVariant( false, 0 ), - this, SLOT( loadTodoCategoriesFinished( const QValueList<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( LoadTodoCategoriesCommand, TQVariant( false, 0 ), + this, TQT_SLOT( loadTodoCategoriesFinished( const TQValueList<TQVariant>&, 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<QString, QVariant> args; + TQMap<TQString, TQVariant> args; writeEvent( (*evIt), args ); args.insert( "id", idMapper().remoteId( (*evIt)->uid() ).toInt() ); - mServer->call( AddEventCommand, QVariant( args ), - this, SLOT( updateEventFinished( const QValueList<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( AddEventCommand, TQVariant( args ), + this, TQT_SLOT( updateEventFinished( const TQValueList<TQVariant>&, 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<QString, QVariant> args; + TQMap<TQString, TQVariant> args; writeTodo( (*todoIt), args ); args.insert( "id", idMapper().remoteId( (*todoIt)->uid() ).toInt() ); - mServer->call( AddTodoCommand, QVariant( args ), - this, SLOT( updateTodoFinished( const QValueList<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( AddTodoCommand, TQVariant( args ), + this, TQT_SLOT( updateTodoFinished( const TQValueList<TQVariant>&, 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<QString, QVariant> args; + TQMap<TQString, TQVariant> 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( AddEventCommand, TQVariant( args ), + this, TQT_SLOT( updateEventFinished( const TQValueList<TQVariant>&, 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ), - QVariant( ev->uid() ) ); + mServer->call( AddEventCommand, TQVariant( args ), + this, TQT_SLOT( addEventFinished( const TQValueList<TQVariant>&, 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<QVariant>&, - const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ), - QVariant( ev->uid() ) ); + this, TQT_SLOT( deleteEventFinished( const TQValueList<TQVariant>&, + 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<QString, QVariant> args; + TQMap<TQString, TQVariant> 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( AddTodoCommand, TQVariant( args ), + this, TQT_SLOT( updateTodoFinished( const TQValueList<TQVariant>&, 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ), - QVariant( todo->uid() ) ); + mServer->call( AddTodoCommand, TQVariant( args ), + this, TQT_SLOT( addTodoFinished( const TQValueList<TQVariant>&, 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<QVariant>&, - const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ), - QVariant( todo->uid() ) ); + this, TQT_SLOT( deleteTodoFinished( const TQValueList<TQVariant>&, + 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<QVariant>& variant, - const QVariant& ) +void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant, + const TQVariant& ) { - QMap<QString, QVariant> map = variant[ 0 ].toMap(); + TQMap<TQString, TQVariant> map = variant[ 0 ].toMap(); KURL url = KURL( mPrefs->url() ); if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed @@ -530,10 +530,10 @@ void ResourceXMLRPC::loginFinished( const QValueList<QVariant>& variant, mSynchronizer->stop(); } -void ResourceXMLRPC::logoutFinished( const QValueList<QVariant>& variant, - const QVariant& ) +void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant>& variant, + const TQVariant& ) { - QMap<QString, QVariant> map = variant[ 0 ].toMap(); + TQMap<TQString, TQVariant> map = variant[ 0 ].toMap(); if ( map[ "GOODBYE" ].toString() != "XOXO" ) kdError() << "logout failed" << endl; @@ -547,11 +547,11 @@ void ResourceXMLRPC::logoutFinished( const QValueList<QVariant>& variant, mSynchronizer->stop(); } -void ResourceXMLRPC::listEventsFinished( const QValueList<QVariant>& list, - const QVariant& ) +void ResourceXMLRPC::listEventsFinished( const TQValueList<TQVariant>& list, + const TQVariant& ) { - const QValueList<QVariant> eventList = list[ 0 ].toList(); - QValueList<QVariant>::ConstIterator eventIt; + const TQValueList<TQVariant> eventList = list[ 0 ].toList(); + TQValueList<TQVariant>::ConstIterator eventIt; disableChangeNotification(); @@ -559,17 +559,17 @@ void ResourceXMLRPC::listEventsFinished( const QValueList<QVariant>& list, bool changed = false; for ( eventIt = eventList.begin(); eventIt != eventList.end(); ++eventIt ) { - QMap<QString, QVariant> map = (*eventIt).toMap(); + TQMap<TQString, TQVariant> 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<QVariant>& list, checkLoadingFinished(); } -void ResourceXMLRPC::deleteEventFinished( const QValueList<QVariant>&, - const QVariant& id ) +void ResourceXMLRPC::deleteEventFinished( const TQValueList<TQVariant>&, + const TQVariant& id ) { idMapper().removeRemoteId( idMapper().remoteId( id.toString() ) ); @@ -623,26 +623,26 @@ void ResourceXMLRPC::deleteEventFinished( const QValueList<QVariant>&, emit resourceChanged( this ); } -void ResourceXMLRPC::updateEventFinished( const QValueList<QVariant>&, - const QVariant& ) +void ResourceXMLRPC::updateEventFinished( const TQValueList<TQVariant>&, + const TQVariant& ) { mSynchronizer->stop(); } -void ResourceXMLRPC::addEventFinished( const QValueList<QVariant>& list, - const QVariant& id ) +void ResourceXMLRPC::addEventFinished( const TQValueList<TQVariant>& list, + const TQVariant& id ) { idMapper().setRemoteId( id.toString(), list[ 0 ].toString() ); emit resourceChanged( this ); } -void ResourceXMLRPC::loadEventCategoriesFinished( const QValueList<QVariant> &mapList, const QVariant& ) +void ResourceXMLRPC::loadEventCategoriesFinished( const TQValueList<TQVariant> &mapList, const TQVariant& ) { mEventCategoryMap.clear(); - const QMap<QString, QVariant> map = mapList[ 0 ].toMap(); - QMap<QString, QVariant>::ConstIterator it; + const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap(); + TQMap<TQString, TQVariant>::ConstIterator it; KPimPrefs prefs( "korganizerrc" ); for ( it = map.begin(); it != map.end(); ++it ) { @@ -658,11 +658,11 @@ void ResourceXMLRPC::loadEventCategoriesFinished( const QValueList<QVariant> &ma checkLoadingFinished(); } -void ResourceXMLRPC::listTodosFinished( const QValueList<QVariant>& list, - const QVariant& ) +void ResourceXMLRPC::listTodosFinished( const TQValueList<TQVariant>& list, + const TQVariant& ) { - const QValueList<QVariant> todoList = list[ 0 ].toList(); - QValueList<QVariant>::ConstIterator todoIt; + const TQValueList<TQVariant> todoList = list[ 0 ].toList(); + TQValueList<TQVariant>::ConstIterator todoIt; disableChangeNotification(); @@ -670,16 +670,16 @@ void ResourceXMLRPC::listTodosFinished( const QValueList<QVariant>& list, bool changed = false; for ( todoIt = todoList.begin(); todoIt != todoList.end(); ++todoIt ) { - QMap<QString, QVariant> map = (*todoIt).toMap(); + TQMap<TQString, TQVariant> 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<QVariant>& list, checkLoadingFinished(); } -void ResourceXMLRPC::deleteTodoFinished( const QValueList<QVariant>&, - const QVariant& id ) +void ResourceXMLRPC::deleteTodoFinished( const TQValueList<TQVariant>&, + const TQVariant& id ) { idMapper().removeRemoteId( idMapper().remoteId( id.toString() ) ); mTodoStateMapper.remove( idMapper().remoteId( id.toString() ) ); @@ -728,26 +728,26 @@ void ResourceXMLRPC::deleteTodoFinished( const QValueList<QVariant>&, emit resourceChanged( this ); } -void ResourceXMLRPC::addTodoFinished( const QValueList<QVariant>& list, - const QVariant& id ) +void ResourceXMLRPC::addTodoFinished( const TQValueList<TQVariant>& list, + const TQVariant& id ) { idMapper().setRemoteId( id.toString(), list[ 0 ].toString() ); emit resourceChanged( this ); } -void ResourceXMLRPC::updateTodoFinished( const QValueList<QVariant>&, - const QVariant& ) +void ResourceXMLRPC::updateTodoFinished( const TQValueList<TQVariant>&, + const TQVariant& ) { mSynchronizer->stop(); } -void ResourceXMLRPC::loadTodoCategoriesFinished( const QValueList<QVariant> &mapList, const QVariant& ) +void ResourceXMLRPC::loadTodoCategoriesFinished( const TQValueList<TQVariant> &mapList, const TQVariant& ) { mTodoCategoryMap.clear(); - const QMap<QString, QVariant> map = mapList[ 0 ].toMap(); - QMap<QString, QVariant>::ConstIterator it; + const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap(); + TQMap<TQString, TQVariant>::ConstIterator it; KPimPrefs prefs( "korganizerrc" ); for ( it = map.begin(); it != map.end(); ++it ) { @@ -763,25 +763,25 @@ void ResourceXMLRPC::loadTodoCategoriesFinished( const QValueList<QVariant> &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<QString, QVariant> &args, Event *event, - QString &uid ) +void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *event, + TQString &uid ) { // for recurrence int rType = CAL_RECUR_NONE; int rInterval = 1; int rData = 0; int rights = 0; - QDateTime rEndDate; - QValueList<QDateTime> rExceptions; + TQDateTime rEndDate; + TQValueList<TQDateTime> rExceptions; - QMap<QString, QVariant>::ConstIterator it; + TQMap<TQString, TQVariant>::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<QString, QVariant> &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<QString, QVariant> &args, Event *even event->setSecrecy( (it.data().toString() == "public" ? Incidence::SecrecyPublic : Incidence::SecrecyPrivate) ); } else if ( it.key() == "category" ) { - const QMap<QString, QVariant> categories = it.data().toMap(); - QMap<QString, QVariant>::ConstIterator catIt; + const TQMap<TQString, TQVariant> categories = it.data().toMap(); + TQMap<TQString, TQVariant>::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<QString, QVariant> &args, Event *even } else if ( it.key() == "recur_data" ) { rData = it.data().toInt(); } else if ( it.key() == "recur_exception" ) { - const QMap<QString, QVariant> dateList = it.data().toMap(); - QMap<QString, QVariant>::ConstIterator dateIt; + const TQMap<TQString, TQVariant> dateList = it.data().toMap(); + TQMap<TQString, TQVariant>::ConstIterator dateIt; for ( dateIt = dateList.begin(); dateIt != dateList.end(); ++dateIt ) rExceptions.append( (*dateIt).toDateTime() ); } else if ( it.key() == "participants" ) { - const QMap<QString, QVariant> persons = it.data().toMap(); - QMap<QString, QVariant>::ConstIterator personsIt; + const TQMap<TQString, TQVariant> persons = it.data().toMap(); + TQMap<TQString, TQVariant>::ConstIterator personsIt; for ( personsIt = persons.begin(); personsIt != persons.end(); ++personsIt ) { - QMap<QString, QVariant> person = (*personsIt).toMap(); + TQMap<TQString, TQVariant> person = (*personsIt).toMap(); Attendee::PartStat status = Attendee::InProcess; if ( person[ "status" ] == "A" ) status = Attendee::Accepted; @@ -875,11 +875,11 @@ void ResourceXMLRPC::readEvent( const QMap<QString, QVariant> &args, Event *even event->addAttendee( attendee ); } } else if ( it.key() == "alarm" ) { - const QMap<QString, QVariant> alarmList = it.data().toMap(); - QMap<QString, QVariant>::ConstIterator alarmIt; + const TQMap<TQString, TQVariant> alarmList = it.data().toMap(); + TQMap<TQString, TQVariant>::ConstIterator alarmIt; for ( alarmIt = alarmList.begin(); alarmIt != alarmList.end(); ++alarmIt ) { - QMap<QString, QVariant> alarm = (*alarmIt).toMap(); + TQMap<TQString, TQVariant> alarm = (*alarmIt).toMap(); Alarm *vAlarm = event->newAlarm(); vAlarm->setText( event->summary() ); @@ -903,7 +903,7 @@ void ResourceXMLRPC::readEvent( const QMap<QString, QVariant> &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<QString, QVariant> &args, Event *even if ( rEndDate.date().isValid() ) re->setEndDate( rEndDate.date() ); - QValueList<QDateTime>::ConstIterator exIt; + TQValueList<TQDateTime>::ConstIterator exIt; for ( exIt = rExceptions.begin(); exIt != rExceptions.end(); ++exIt ) re->addExDateTime( *exIt ); } @@ -937,7 +937,7 @@ void ResourceXMLRPC::readEvent( const QMap<QString, QVariant> &args, Event *even setRights( event, rights ); } -void ResourceXMLRPC::writeEvent( Event *event, QMap<QString, QVariant> &args ) +void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args ) { args.insert( "start", event->dtStart() ); @@ -956,16 +956,16 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap<QString, QVariant> &args ) args.insert( "access", (event->secrecy() == Incidence::SecrecyPublic ? "public" : "private") ); // CATEGORY - const QStringList categories = event->categories(); - QStringList::ConstIterator catIt; - QMap<QString, QVariant> catMap; + const TQStringList categories = event->categories(); + TQStringList::ConstIterator catIt; + TQMap<TQString, TQVariant> catMap; int counter = 0; for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { - QMap<QString, int>::Iterator it = mEventCategoryMap.find( *catIt ); + TQMap<TQString, int>::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<QString, QVariant> &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<QString, QVariant>() ); + args.insert( "recur_exception", TQMap<TQString, TQVariant>() ); } else { switch ( rec->recurrenceType() ) { case Recurrence::rDaily: @@ -1031,12 +1031,12 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap<QString, QVariant> &args ) args.insert( "recur_enddate", rec->endDateTime() ); // TODO: Also use exception dates! - const QValueList<QDateTime> dates = event->recurrence()->exDateTimes(); - QValueList<QDateTime>::ConstIterator dateIt; - QMap<QString, QVariant> exMap; + const TQValueList<TQDateTime> dates = event->recurrence()->exDateTimes(); + TQValueList<TQDateTime>::ConstIterator dateIt; + TQMap<TQString, TQVariant> 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<QString, QVariant> &args ) // PARTICIPANTS const Attendee::List attendees = event->attendees(); Attendee::List::ConstIterator attIt; - QMap<QString, QVariant> persons; + TQMap<TQString, TQVariant> persons; for ( attIt = attendees.begin(); attIt != attendees.end(); ++attIt ) { - QMap<QString, QVariant> person; - QString status; + TQMap<TQString, TQVariant> person; + TQString status; if ( (*attIt)->status() == Attendee::Accepted ) status = "A"; @@ -1069,9 +1069,9 @@ void ResourceXMLRPC::writeEvent( Event *event, QMap<QString, QVariant> &args ) // ALARMS const Alarm::List alarms = event->alarms(); Alarm::List::ConstIterator alarmIt; - QMap<QString, QVariant> alarmMap; + TQMap<TQString, TQVariant> alarmMap; for ( alarmIt = alarms.begin(); alarmIt != alarms.end(); ++alarmIt ) { - QMap<QString, QVariant> alarm; + TQMap<TQString, TQVariant> 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<QString, QVariant> &args ) args.insert( "alarm", alarmMap ); } -void ResourceXMLRPC::writeTodo( Todo* todo, QMap<QString, QVariant>& args ) +void ResourceXMLRPC::writeTodo( Todo* todo, TQMap<TQString, TQVariant>& args ) { args.insert( "subject", todo->summary() ); args.insert( "des", todo->description() ); @@ -1090,17 +1090,17 @@ void ResourceXMLRPC::writeTodo( Todo* todo, QMap<QString, QVariant>& args ) (todo->secrecy() == Todo::SecrecyPublic ? "public" : "private" ) ); // CATEGORIES - QMap<QString, QVariant> catMap; + TQMap<TQString, TQVariant> 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<QString, int>::Iterator it = mTodoCategoryMap.find( *catIt ); + TQMap<TQString, int>::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<QString, QVariant>& 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<QString, QVariant>& args, Todo *todo, QString &uid ) +void ResourceXMLRPC::readTodo( const TQMap<TQString, TQVariant>& args, Todo *todo, TQString &uid ) { uid = args[ "id" ].toString(); @@ -1138,10 +1138,10 @@ void ResourceXMLRPC::readTodo( const QMap<QString, QVariant>& args, Todo *todo, todo->setSecrecy( args[ "access" ].toString() == "public" ? Todo::SecrecyPublic : Todo::SecrecyPrivate ); // CATEGORIES - const QMap<QString, QVariant> categories = args[ "category" ].toMap(); - QMap<QString, QVariant>::ConstIterator it; + const TQMap<TQString, TQVariant> categories = args[ "category" ].toMap(); + TQMap<TQString, TQVariant>::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<QString, QVariant>& 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<QString, QVariant>& 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<QString, QVariant>& 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 <qdatetime.h> -#include <qptrlist.h> -#include <qstring.h> +#include <tqdatetime.h> +#include <tqptrlist.h> +#include <tqstring.h> #include <kconfig.h> #include <kurl.h> @@ -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<QVariant>&, const QVariant& ); - void logoutFinished( const QValueList<QVariant>&, const QVariant& ); + void loginFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void logoutFinished( const TQValueList<TQVariant>&, const TQVariant& ); - void listEventsFinished( const QValueList<QVariant>&, const QVariant& ); - void addEventFinished( const QValueList<QVariant>&, const QVariant& ); - void updateEventFinished( const QValueList<QVariant>&, const QVariant& ); - void deleteEventFinished( const QValueList<QVariant>&, const QVariant& ); - void loadEventCategoriesFinished( const QValueList<QVariant>&, const QVariant& ); + void listEventsFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void addEventFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void updateEventFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void deleteEventFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void loadEventCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& ); - void listTodosFinished( const QValueList<QVariant>&, const QVariant& ); - void addTodoFinished( const QValueList<QVariant>&, const QVariant& ); - void updateTodoFinished( const QValueList<QVariant>&, const QVariant& ); - void deleteTodoFinished( const QValueList<QVariant>&, const QVariant& ); - void loadTodoCategoriesFinished( const QValueList<QVariant>&, const QVariant& ); + void listTodosFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void addTodoFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void updateTodoFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void deleteTodoFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void loadTodoCategoriesFinished( const TQValueList<TQVariant>&, 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<QString, QVariant>& ); - void readEvent( const QMap<QString, QVariant>&, Event*, QString& ); + void writeEvent( Event*, TQMap<TQString, TQVariant>& ); + void readEvent( const TQMap<TQString, TQVariant>&, Event*, TQString& ); - void writeTodo( Todo*, QMap<QString, QVariant>& ); - void readTodo( const QMap<QString, QVariant>&, Todo*, QString& ); + void writeTodo( Todo*, TQMap<TQString, TQVariant>& ); + void readTodo( const TQMap<TQString, TQVariant>&, 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<QString, int> mEventCategoryMap; - QMap<QString, int> mTodoCategoryMap; + TQMap<TQString, int> mEventCategoryMap; + TQMap<TQString, int> 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 <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kdebug.h> #include <kdialog.h> @@ -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 <qapplication.h> -#include <qstringlist.h> +#include <tqapplication.h> +#include <tqstringlist.h> #include <kdebug.h> #include <klocale.h> @@ -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<QString, QVariant> args, columns; + TQMap<TQString, TQVariant> 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( "system.login", TQVariant( args ), + this, TQT_SLOT( loginFinished( const TQValueList<TQVariant>&, 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + this, TQT_SLOT( listNotesFinished( const TQValueList<TQVariant>&, 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<QString, QVariant> args; + TQMap<TQString, TQVariant> 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ) ); + mServer->call( AddNoteCommand, TQVariant( args ), + this, TQT_SLOT( updateNoteFinished( const TQValueList<TQVariant>&, 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ), - QVariant( journal->uid() ) ); + mServer->call( AddNoteCommand, TQVariant( args ), + this, TQT_SLOT( addNoteFinished( const TQValueList<TQVariant>&, 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<QVariant>&, const QVariant& ) ), - this, SLOT( fault( int, const QString&, const QVariant& ) ), - QVariant( journal->uid() ) ); + this, TQT_SLOT( deleteNoteFinished( const TQValueList<TQVariant>&, 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<QVariant>& variant, - const QVariant& ) +void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant, + const TQVariant& ) { - QMap<QString, QVariant> map = variant[ 0 ].toMap(); + TQMap<TQString, TQVariant> map = variant[ 0 ].toMap(); KURL url = KURL( mPrefs->url() ); if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed @@ -237,10 +237,10 @@ void ResourceXMLRPC::loginFinished( const QValueList<QVariant>& variant, mSynchronizer->stop(); } -void ResourceXMLRPC::logoutFinished( const QValueList<QVariant>& variant, - const QVariant& ) +void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant>& variant, + const TQVariant& ) { - QMap<QString, QVariant> map = variant[ 0 ].toMap(); + TQMap<TQString, TQVariant> map = variant[ 0 ].toMap(); if ( map[ "GOODBYE" ].toString() != "XOXO" ) kdError() << "logout failed" << endl; @@ -254,9 +254,9 @@ void ResourceXMLRPC::logoutFinished( const QValueList<QVariant>& variant, mSynchronizer->stop(); } -void ResourceXMLRPC::listNotesFinished( const QValueList<QVariant> &list, const QVariant& ) +void ResourceXMLRPC::listNotesFinished( const TQValueList<TQVariant> &list, const TQVariant& ) { - QMap<QString, QString>::Iterator uidIt; + TQMap<TQString, TQString>::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<QVariant> &list, const mUidMap.clear(); - QValueList<QVariant> noteList = list[ 0 ].toList(); - QValueList<QVariant>::Iterator noteIt; + TQValueList<TQVariant> noteList = list[ 0 ].toList(); + TQValueList<TQVariant>::Iterator noteIt; for ( noteIt = noteList.begin(); noteIt != noteList.end(); ++noteIt ) { - QMap<QString, QVariant> map = (*noteIt).toMap(); + TQMap<TQString, TQVariant> 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<QVariant> &list, const mSynchronizer->stop(); } -void ResourceXMLRPC::addNoteFinished( const QValueList<QVariant> &list, const QVariant &id ) +void ResourceXMLRPC::addNoteFinished( const TQValueList<TQVariant> &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<QVariant>&, const QVariant& ) +void ResourceXMLRPC::updateNoteFinished( const TQValueList<TQVariant>&, const TQVariant& ) { mSynchronizer->stop(); } -void ResourceXMLRPC::deleteNoteFinished( const QValueList<QVariant>&, const QVariant &id ) +void ResourceXMLRPC::deleteNoteFinished( const TQValueList<TQVariant>&, const TQVariant &id ) { mUidMap.erase( id.toString() ); @@ -306,13 +306,13 @@ void ResourceXMLRPC::deleteNoteFinished( const QValueList<QVariant>&, 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<QString, QVariant>& args ) +void ResourceXMLRPC::writeNote( KCal::Journal* journal, TQMap<TQString, TQVariant>& args ) { args.insert( "subject", journal->summary() ); args.insert( "des", journal->description() ); @@ -320,7 +320,7 @@ void ResourceXMLRPC::writeNote( KCal::Journal* journal, QMap<QString, QVariant>& (journal->secrecy() == KCal::Journal::SecrecyPublic ? "public" : "private" ) ); } -void ResourceXMLRPC::readNote( const QMap<QString, QVariant>& args, KCal::Journal *journal, QString &uid ) +void ResourceXMLRPC::readNote( const TQMap<TQString, TQVariant>& 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 <qptrlist.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqstring.h> #include <kconfig.h> #include <kurl.h> @@ -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<QVariant>&, const QVariant& ); - void logoutFinished( const QValueList<QVariant>&, const QVariant& ); + void loginFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void logoutFinished( const TQValueList<TQVariant>&, const TQVariant& ); - void listNotesFinished( const QValueList<QVariant>&, const QVariant& ); - void addNoteFinished( const QValueList<QVariant>&, const QVariant& ); - void updateNoteFinished( const QValueList<QVariant>&, const QVariant& ); - void deleteNoteFinished( const QValueList<QVariant>&, const QVariant& ); + void listNotesFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void addNoteFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void updateNoteFinished( const TQValueList<TQVariant>&, const TQVariant& ); + void deleteNoteFinished( const TQValueList<TQVariant>&, 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<QString, QVariant>& ); - void readNote( const QMap<QString, QVariant>&, KCal::Journal*, QString& ); + void writeNote( KCal::Journal*, TQMap<TQString, TQVariant>& ); + void readNote( const TQMap<TQString, TQVariant>&, KCal::Journal*, TQString& ); KCal::CalendarLocal mCalendar; KXMLRPC::Server *mServer; EGroupwarePrefs *mPrefs; - QString mSessionID; - QString mKp3; - QMap<QString, QString> mUidMap; + TQString mSessionID; + TQString mKp3; + TQMap<TQString, TQString> 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 <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kdebug.h> #include <kdialog.h> @@ -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 <kapplication.h> -#include <qeventloop.h> +#include <tqeventloop.h> #include <unistd.h> @@ -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 <qobject.h> +#include <tqobject.h> /** 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 <qdatastream.h> -#include <qfile.h> +#include <tqdatastream.h> +#include <tqfile.h> #include <kdebug.h> #include <kstandarddirs.h> #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 <qdatastream.h> -#include <qmap.h> +#include <tqdatastream.h> +#include <tqmap.h> 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<QString, TodoStateMapEntry> TodoStateMap; + typedef TQMap<TQString, TodoStateMapEntry> 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 <qfile.h> +#include <tqfile.h> #include <kdebug.h> #include <kio/job.h> @@ -37,11 +37,11 @@ namespace KXMLRPC { return m_errorCode; } - QString errorString() const + TQString errorString() const { return m_errorString; } - QValueList<QVariant> data() const + TQValueList<TQVariant> data() const { return m_data; } @@ -49,24 +49,24 @@ namespace KXMLRPC private: bool m_success; int m_errorCode; - QString m_errorString; - QValueList<QVariant> m_data; + TQString m_errorString; + TQValueList<TQVariant> 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<QVariant> &args, const QString &userAgent ) +void Query::call( const TQString &server, const TQString &method, + const TQValueList<TQVariant> &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<QVariant> &args ) const +TQString Query::markupCall( const TQString &cmd, + const TQValueList<TQVariant> &args ) const { - QString markup = "<?xml version=\"1.0\" ?>\r\n<methodCall>\r\n"; + TQString markup = "<?xml version=\"1.0\" ?>\r\n<methodCall>\r\n"; markup += "<methodName>" + cmd + "</methodName>\r\n"; if ( !args.isEmpty() ) { markup += "<params>\r\n"; - QValueList<QVariant>::ConstIterator it = args.begin(); - QValueList<QVariant>::ConstIterator end = args.end(); + TQValueList<TQVariant>::ConstIterator it = args.begin(); + TQValueList<TQVariant>::ConstIterator end = args.end(); for ( ; it != end; ++it ) markup += "<param>\r\n" + marshal( *it ) + "</param>\r\n"; markup += "</params>\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 "<value><string>" + result + "</string></value>\r\n"; } - case QVariant::Int: - return "<value><int>" + QString::number( arg.toInt() ) + "</int></value>\r\n"; - case QVariant::Double: - return "<value><double>" + QString::number( arg.toDouble() ) + "</double></value>\r\n"; - case QVariant::Bool: + case TQVariant::Int: + return "<value><int>" + TQString::number( arg.toInt() ) + "</int></value>\r\n"; + case TQVariant::Double: + return "<value><double>" + TQString::number( arg.toDouble() ) + "</double></value>\r\n"; + case TQVariant::Bool: { - QString markup = "<value><boolean>"; + TQString markup = "<value><boolean>"; markup += arg.toBool() ? "1" : "0"; markup += "</boolean></value>\r\n"; return markup; } - case QVariant::ByteArray: + case TQVariant::ByteArray: return "<value><base64>" + KCodecs::base64Encode( arg.toByteArray() ) + "</base64></value>\r\n"; - case QVariant::DateTime: + case TQVariant::DateTime: return "<value><datetime.iso8601>" + arg.toDateTime().toString( Qt::ISODate ) + "</datetime.iso8601></value>\r\n"; - case QVariant::List: + case TQVariant::List: { - QString markup = "<value><array><data>\r\n"; - const QValueList<QVariant> args = arg.toList(); - QValueList<QVariant>::ConstIterator it = args.begin(); - QValueList<QVariant>::ConstIterator end = args.end(); + TQString markup = "<value><array><data>\r\n"; + const TQValueList<TQVariant> args = arg.toList(); + TQValueList<TQVariant>::ConstIterator it = args.begin(); + TQValueList<TQVariant>::ConstIterator end = args.end(); for ( ; it != end; ++it ) markup += marshal( *it ); markup += "</data></array></value>\r\n"; return markup; } - case QVariant::Map: + case TQVariant::Map: { - QString markup = "<value><struct>\r\n"; - QMap<QString, QVariant> map = arg.toMap(); - QMap<QString, QVariant>::ConstIterator it = map.begin(); - QMap<QString, QVariant>::ConstIterator end = map.end(); + TQString markup = "<value><struct>\r\n"; + TQMap<TQString, TQVariant> map = arg.toMap(); + TQMap<TQString, TQVariant>::ConstIterator it = map.begin(); + TQMap<TQString, TQVariant>::ConstIterator end = map.end(); for ( ; it != end; ++it ) { markup += "<member>\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<QVariant> values; - QDomNode valueNode = typeElement.firstChild().firstChild(); + TQValueList<TQVariant> 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<QString, QVariant> map; - QDomNode memberNode = typeElement.firstChild(); + TQMap<TQString, TQVariant> 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<KIO::Job*>::Iterator it; + TQValueList<KIO::Job*>::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<Query*>::Iterator it; + TQValueList<Query*>::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<QVariant> &args, - QObject* msgObj, const char* messageSlot, - QObject* faultObj, const char* faultSlot, const QVariant &id ) +void Server::call( const TQString &method, const TQValueList<TQVariant> &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<QVariant> &, 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<TQVariant> &, 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<QVariant> args; + TQValueList<TQVariant> 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<QVariant> args; - args << QVariant( arg ); + TQValueList<TQVariant> 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<QVariant> args; - args << QVariant( arg ); + TQValueList<TQVariant> 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<QVariant> args; - args << QVariant( arg ); + TQValueList<TQVariant> 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<QVariant> args; - args << QVariant( arg ); + TQValueList<TQVariant> 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<QVariant> args; - args << QVariant( arg ); + TQValueList<TQVariant> 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<QVariant> args; - args << QVariant( arg ); + TQValueList<TQVariant> 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<QVariant> args; - args << QVariant( arg ); + TQValueList<TQVariant> 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<QVariant> args; - QStringList::ConstIterator it = arg.begin(); - QStringList::ConstIterator end = arg.end(); + TQValueList<TQVariant> 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 <kurl.h> -#include <qbuffer.h> -#include <qdom.h> -#include <qobject.h> -#include <qvariant.h> -#include <qvaluelist.h> +#include <tqbuffer.h> +#include <tqdom.h> +#include <tqobject.h> +#include <tqvariant.h> +#include <tqvaluelist.h> 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<QVariant> &args = QValueList<QVariant>(), - const QString &userAgent = "KDE-XMLRPC" ); + void call( const TQString &server, const TQString &method, + const TQValueList<TQVariant> &args = TQValueList<TQVariant>(), + const TQString &userAgent = "KDE-XMLRPC" ); signals: - void message( const QValueList<QVariant> &result, const QVariant &id ); - void fault( int, const QString&, const QVariant &id ); + void message( const TQValueList<TQVariant> &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<QVariant> &args ) const; - QString marshal( const QVariant &v ) const; - QVariant demarshal( const QDomElement &e ) const; + TQString markupCall( const TQString &method, + const TQValueList<TQVariant> &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<KIO::Job*> m_pendingJobs; + TQValueList<KIO::Job*> 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 <typename T> - void call( const QString &method, const QValueList<T> &arg, - QObject* obj1, const char* faultSlot, - QObject* obj2, const char* messageSlot, const QVariant &id = QVariant() ); + void call( const TQString &method, const TQValueList<T> &arg, + TQObject* obj1, const char* faultSlot, + TQObject* obj2, const char* messageSlot, const TQVariant &id = TQVariant() ); public slots: - void call( const QString &method, const QValueList<QVariant> &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<TQVariant> &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<Query*> mPendingQueries; + TQValueList<Query*> mPendingQueries; }; } template <typename T> -void KXMLRPC::Server::call( const QString &method, const QValueList<T> &arg, - QObject* faultObj, const char* faultSlot, - QObject* msgObj, const char* messageSlot, const QVariant &id ) +void KXMLRPC::Server::call( const TQString &method, const TQValueList<T> &arg, + TQObject* faultObj, const char* faultSlot, + TQObject* msgObj, const char* messageSlot, const TQVariant &id ) { - QValueList<QVariant> args; + TQValueList<TQVariant> args; - typename QValueList<T>::ConstIterator it = arg.begin(); - typename QValueList<T>::ConstIterator end = arg.end(); + typename TQValueList<T>::ConstIterator it = arg.begin(); + typename TQValueList<T>::ConstIterator end = arg.end(); for ( ; it != end; ++it ) - args << QVariant( *it ); + args << TQVariant( *it ); return call( method, args, faultObj, faultSlot, msgObj, messageSlot, id ); } |