Adjusted to use new TQStringVariantMap type.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/30/head
Michele Calgaro 6 years ago
parent 2852e8272a
commit 6d2f3127be
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -374,7 +374,7 @@ public:
DecryptVerifyJob * decryptVerifyJob( bool ) const { return 0; } DecryptVerifyJob * decryptVerifyJob( bool ) const { return 0; }
RefreshKeysJob * refreshKeysJob() const { return 0; } RefreshKeysJob * refreshKeysJob() const { return 0; }
SpecialJob * specialJob( const char * type, const TQMap<TQString,TQVariant> & args ) const { SpecialJob * specialJob( const char * type, const TQStringVariantMap & args ) const {
if ( tqstricmp( type, "x-obtain-keys" ) == 0 && args.size() == 0 ) if ( tqstricmp( type, "x-obtain-keys" ) == 0 && args.size() == 0 )
return new ObtainKeysJob(); return new ObtainKeysJob();
if ( tqstricmp( type, "x-encrypt" ) == 0 && args.size() == 0 ) if ( tqstricmp( type, "x-encrypt" ) == 0 && args.size() == 0 )

@ -56,7 +56,7 @@ namespace Kleo {
To use, create an ObtainKeysJob instance like this: To use, create an ObtainKeysJob instance like this:
<code> <code>
Kleo::SpecialJob * job = Kleo::SpecialJob * job =
protocol->specialJob("x-obtain-keys", TQMap<TQString,TQVariant>()); protocol->specialJob("x-obtain-keys", TQStringVariantMap());
</code> </code>
The resulting TQVariant will contain a TQStringList containing the The resulting TQVariant will contain a TQStringList containing the

@ -813,7 +813,7 @@ public:
Kleo::DecryptVerifyJob * decryptVerifyJob( bool textmode=false ) const; Kleo::DecryptVerifyJob * decryptVerifyJob( bool textmode=false ) const;
Kleo::RefreshKeysJob * refreshKeysJob() const; Kleo::RefreshKeysJob * refreshKeysJob() const;
Kleo::SpecialJob * specialJob( const char *, const TQMap<TQString,TQVariant> & ) const { return 0; } Kleo::SpecialJob * specialJob( const char *, const TQStringVariantMap & ) const { return 0; }
GpgME::ImportResult importCertificate( const char* data, size_t length ); GpgME::ImportResult importCertificate( const char* data, size_t length );

@ -2,7 +2,7 @@
kleo/cryptobackend.h kleo/cryptobackend.h
This file is part of libkleopatra, the KDE keymanagement library This file is part of libkleopatra, the KDE keymanagement library
Copyright (c) 2004,2005 Klarälvdalens Datakonsult AB Copyright (c) 2004,2005 Klar<EFBFBD>lvdalens Datakonsult AB
Libkleopatra is free software; you can redistribute it and/or Libkleopatra is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as modify it under the terms of the GNU General Public License as
@ -34,6 +34,7 @@
#define __KLEO_CRYPTOBACKEND_H__ #define __KLEO_CRYPTOBACKEND_H__
#include <tqstring.h> #include <tqstring.h>
#include <tqvariant.h>
namespace Kleo { namespace Kleo {
class CryptoConfig; class CryptoConfig;
@ -54,10 +55,6 @@ namespace Kleo {
class SpecialJob; class SpecialJob;
} }
class TQString;
class TQVariant;
template <typename T_Key, typename T_Value> class TQMap;
namespace Kleo { namespace Kleo {
class CryptoBackend { class CryptoBackend {
@ -114,7 +111,7 @@ namespace Kleo {
virtual DecryptVerifyJob * decryptVerifyJob( bool textmode=false ) const = 0; virtual DecryptVerifyJob * decryptVerifyJob( bool textmode=false ) const = 0;
virtual RefreshKeysJob * refreshKeysJob() const = 0; virtual RefreshKeysJob * refreshKeysJob() const = 0;
virtual SpecialJob * specialJob( const char * type, const TQMap<TQString,TQVariant> & args ) const = 0; virtual SpecialJob * specialJob( const char * type, const TQStringVariantMap & args ) const = 0;
}; };
} }

@ -3239,7 +3239,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
if ( !chiasmus ) if ( !chiasmus )
return; return;
const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", TQMap<TQString,TQVariant>() ) ); const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", TQStringVariantMap() ) );
if ( !listjob.get() ) { if ( !listjob.get() ) {
const TQString msg = i18n( "Chiasmus backend does not offer the " const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." ); "\"x-obtain-keys\" function. Please report this bug." );
@ -3280,7 +3280,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
GlobalSettings::setChiasmusDecryptionKey( selectorDlg.key() ); GlobalSettings::setChiasmusDecryptionKey( selectorDlg.key() );
assert( !GlobalSettings::chiasmusDecryptionKey().isEmpty() ); assert( !GlobalSettings::chiasmusDecryptionKey().isEmpty() );
Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", TQMap<TQString,TQVariant>() ); Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", TQStringVariantMap() );
if ( !job ) { if ( !job ) {
const TQString msg = i18n( "Chiasmus backend does not offer the " const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-decrypt\" function. Please report this bug." ); "\"x-decrypt\" function. Please report this bug." );

@ -5311,7 +5311,7 @@ void KMComposeWin::slotEncryptChiasmusToggled( bool on ) {
return; return;
} }
STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-obtain-keys", TQMap<TQString,TQVariant>() ) ); STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-obtain-keys", TQStringVariantMap() ) );
if ( !job.get() ) { if ( !job.get() ) {
const TQString msg = i18n( "Chiasmus backend does not offer the " const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." ); "\"x-obtain-keys\" function. Please report this bug." );

@ -552,7 +552,7 @@ bool MessageComposer::encryptWithChiasmus( const Kleo::CryptoBackend::Protocol *
const TQByteArray& body, const TQByteArray& body,
TQByteArray& resultData ) TQByteArray& resultData )
{ {
std::auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-encrypt", TQMap<TQString,TQVariant>() ) ); std::auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-encrypt", TQStringVariantMap() ) );
if ( !job.get() ) { if ( !job.get() ) {
const TQString msg = i18n( "Chiasmus backend does not offer the " const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-encrypt\" function. Please report this bug." ); "\"x-encrypt\" function. Please report this bug." );

@ -1853,7 +1853,7 @@ bool ObjectTreeParser::decryptChiasmus( const TQByteArray& data, TQByteArray& bo
if ( !chiasmus ) if ( !chiasmus )
return false; return false;
const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", TQMap<TQString,TQVariant>() ) ); const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", TQStringVariantMap() ) );
if ( !listjob.get() ) { if ( !listjob.get() ) {
errorText = i18n( "Chiasmus backend does not offer the " errorText = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." ); "\"x-obtain-keys\" function. Please report this bug." );
@ -1892,7 +1892,7 @@ bool ObjectTreeParser::decryptChiasmus( const TQByteArray& data, TQByteArray& bo
GlobalSettings::setChiasmusDecryptionKey( selectorDlg.key() ); GlobalSettings::setChiasmusDecryptionKey( selectorDlg.key() );
assert( !GlobalSettings::chiasmusDecryptionKey().isEmpty() ); assert( !GlobalSettings::chiasmusDecryptionKey().isEmpty() );
const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-decrypt", TQMap<TQString,TQVariant>() ) ); const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-decrypt", TQStringVariantMap() ) );
if ( !job.get() ) { if ( !job.get() ) {
errorText = i18n( "Chiasmus backend does not offer the " errorText = i18n( "Chiasmus backend does not offer the "
"\"x-decrypt\" function. Please report this bug." ); "\"x-decrypt\" function. Please report this bug." );

@ -95,7 +95,7 @@ bool IdMapper::save()
TQString content; TQString content;
TQMap<TQString, TQVariant>::Iterator it; TQStringVariantMap::Iterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) { for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) {
TQString fingerprint( "" ); TQString fingerprint( "" );
if ( mFingerprintMap.contains( it.key() ) ) if ( mFingerprintMap.contains( it.key() ) )
@ -122,7 +122,7 @@ void IdMapper::setRemoteId( const TQString &localId, const TQString &remoteId )
void IdMapper::removeRemoteId( const TQString &remoteId ) void IdMapper::removeRemoteId( const TQString &remoteId )
{ {
TQMap<TQString, TQVariant>::Iterator it; TQStringVariantMap::Iterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) for ( it = mIdMap.begin(); it != mIdMap.end(); ++it )
if ( it.data().toString() == remoteId ) { if ( it.data().toString() == remoteId ) {
mIdMap.remove( it ); mIdMap.remove( it );
@ -133,7 +133,7 @@ void IdMapper::removeRemoteId( const TQString &remoteId )
TQString IdMapper::remoteId( const TQString &localId ) const TQString IdMapper::remoteId( const TQString &localId ) const
{ {
TQMap<TQString, TQVariant>::ConstIterator it; TQStringVariantMap::ConstIterator it;
it = mIdMap.find( localId ); it = mIdMap.find( localId );
if ( it != mIdMap.end() ) if ( it != mIdMap.end() )
@ -144,7 +144,7 @@ TQString IdMapper::remoteId( const TQString &localId ) const
TQString IdMapper::localId( const TQString &remoteId ) const TQString IdMapper::localId( const TQString &remoteId ) const
{ {
TQMap<TQString, TQVariant>::ConstIterator it; TQStringVariantMap::ConstIterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) for ( it = mIdMap.begin(); it != mIdMap.end(); ++it )
if ( it.data().toString() == remoteId ) if ( it.data().toString() == remoteId )
return it.key(); return it.key();
@ -156,7 +156,7 @@ TQString IdMapper::asString() const
{ {
TQString content; TQString content;
TQMap<TQString, TQVariant>::ConstIterator it; TQStringVariantMap::ConstIterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) { for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) {
TQString fp; TQString fp;
if ( mFingerprintMap.contains( it.key() ) ) if ( mFingerprintMap.contains( it.key() ) )
@ -183,7 +183,7 @@ const TQString& IdMapper::fingerprint( const TQString &localId ) const
TQMap<TQString, TQString> IdMapper::remoteIdMap() const TQMap<TQString, TQString> IdMapper::remoteIdMap() const
{ {
TQMap<TQString, TQString> reverseMap; TQMap<TQString, TQString> reverseMap;
TQMap<TQString, TQVariant>::ConstIterator it; TQStringVariantMap::ConstIterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) { for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) {
reverseMap.insert( it.data().toString(), it.key() ); reverseMap.insert( it.data().toString(), it.key() );
} }

@ -147,7 +147,7 @@ class KDE_EXPORT IdMapper
TQString filename(); TQString filename();
private: private:
TQMap<TQString, TQVariant> mIdMap; TQStringVariantMap mIdMap;
TQMap<TQString, TQString> mFingerprintMap; TQMap<TQString, TQString> mFingerprintMap;
TQString mPath; TQString mPath;

@ -159,7 +159,7 @@ bool APIBlogger::interpretUserInfoJob( TDEIO::Job *job )
TQValueList<TQVariant>::ConstIterator end = posts.end(); TQValueList<TQVariant>::ConstIterator end = posts.end();
for ( ; it != end; ++it ) { for ( ; it != end; ++it ) {
kdDebug () << "MIDDLE: " << ( *it ).typeName() << endl; kdDebug () << "MIDDLE: " << ( *it ).typeName() << endl;
const TQMap<TQString, TQVariant> postInfo = ( *it ).toMap(); const TQStringVariantMap postInfo = ( *it ).toMap();
const TQString nickname = postInfo[ "nickname" ].toString(); const TQString nickname = postInfo[ "nickname" ].toString();
const TQString userid = postInfo[ "userid" ].toString(); const TQString userid = postInfo[ "userid" ].toString();
const TQString email = postInfo[ "email" ].toString(); const TQString email = postInfo[ "email" ].toString();
@ -188,7 +188,7 @@ kdDebug() << "APIBlogger::interpretListFoldersJob, no error!" << endl;
TQValueList<TQVariant>::ConstIterator end = posts.end(); TQValueList<TQVariant>::ConstIterator end = posts.end();
for ( ; it != end; ++it ) { for ( ; it != end; ++it ) {
kdDebug () << "MIDDLE: " << ( *it ).typeName() << endl; kdDebug () << "MIDDLE: " << ( *it ).typeName() << endl;
const TQMap<TQString, TQVariant> postInfo = ( *it ).toMap(); const TQStringVariantMap postInfo = ( *it ).toMap();
const TQString id( postInfo[ "blogid" ].toString() ); const TQString id( postInfo[ "blogid" ].toString() );
const TQString name( postInfo[ "blogName" ].toString() ); const TQString name( postInfo[ "blogName" ].toString() );
@ -230,7 +230,7 @@ bool APIBlogger::interpretDownloadItemsJob( TDEIO::Job *job )
for ( ; it != end; ++it ) { for ( ; it != end; ++it ) {
BlogPosting posting; BlogPosting posting;
kdDebug () << "MIDDLE: " << ( *it ).typeName() << endl; kdDebug () << "MIDDLE: " << ( *it ).typeName() << endl;
const TQMap<TQString, TQVariant> postInfo = ( *it ).toMap(); const TQStringVariantMap postInfo = ( *it ).toMap();
if ( readPostingFromMap( &posting, postInfo ) ) { if ( readPostingFromMap( &posting, postInfo ) ) {
KCal::Journal *j = journalFromPosting( &posting ); KCal::Journal *j = journalFromPosting( &posting );
// dumpBlog( &posting ); // dumpBlog( &posting );
@ -252,7 +252,7 @@ bool APIBlogger::interpretDownloadItemsJob( TDEIO::Job *job )
} }
bool APIBlogger::readPostingFromMap( BlogPosting *post, const TQMap<TQString, TQVariant> &postInfo ) bool APIBlogger::readPostingFromMap( BlogPosting *post, const TQStringVariantMap &postInfo )
{ {
// FIXME: // FIXME:
if ( !post ) return false; if ( !post ) return false;

@ -50,7 +50,7 @@ class APIBlogger : public APIBlog
bool interpretListItemsJob( TDEIO::Job *job ); bool interpretListItemsJob( TDEIO::Job *job );
bool interpretDownloadItemsJob( TDEIO::Job *job ); bool interpretDownloadItemsJob( TDEIO::Job *job );
protected: protected:
bool readPostingFromMap( BlogPosting *post, const TQMap<TQString, TQVariant> &postInfo ); bool readPostingFromMap( BlogPosting *post, const TQStringVariantMap &postInfo );
}; };
} }

@ -278,9 +278,9 @@ TQString XmlrpcJob::marshal( const TQVariant &arg )
case TQVariant::Map: case TQVariant::Map:
{ {
TQString markup = "<value><struct>\r\n"; TQString markup = "<value><struct>\r\n";
TQMap<TQString, TQVariant> map = arg.toMap(); TQStringVariantMap map = arg.toMap();
TQMap<TQString, TQVariant>::ConstIterator it = map.begin(); TQStringVariantMap::ConstIterator it = map.begin();
TQMap<TQString, TQVariant>::ConstIterator end = map.end(); TQStringVariantMap::ConstIterator end = map.end();
for ( ; it != end; ++it ) for ( ; it != end; ++it )
{ {
markup += "<member>\r\n"; markup += "<member>\r\n";
@ -357,7 +357,7 @@ kdDebug()<<"Demarshalling element \"" << elem.text() <<"\"" << endl;
} else if ( typeName == "struct" ) { } else if ( typeName == "struct" ) {
TQMap<TQString, TQVariant> map; TQStringVariantMap map;
TQDomNode memberNode = typeElement.firstChild(); TQDomNode memberNode = typeElement.firstChild();
while ( !memberNode.isNull() ) { while ( !memberNode.isNull() ) {
const TQString key = memberNode.toElement().elementsByTagName( "name" ).item( 0 ).toElement().text(); const TQString key = memberNode.toElement().elementsByTagName( "name" ).item( 0 ).toElement().text();

@ -191,7 +191,7 @@ bool ResourceXMLRPC::doOpen()
mServer->setUrl( KURL( mPrefs->url() ) ); mServer->setUrl( KURL( mPrefs->url() ) );
mServer->setUserAgent( "KDE-Calendar" ); mServer->setUserAgent( "KDE-Calendar" );
TQMap<TQString, TQVariant> args; TQStringVariantMap args;
args.insert( "domain", mPrefs->domain() ); args.insert( "domain", mPrefs->domain() );
args.insert( "username", mPrefs->user() ); args.insert( "username", mPrefs->user() );
args.insert( "password", mPrefs->password() ); args.insert( "password", mPrefs->password() );
@ -209,7 +209,7 @@ void ResourceXMLRPC::doClose()
{ {
kdDebug(5800) << "ResourceXMLRPC::doClose()" << endl; kdDebug(5800) << "ResourceXMLRPC::doClose()" << endl;
TQMap<TQString, TQVariant> args; TQStringVariantMap args;
args.insert( "sessionid", mSessionID ); args.insert( "sessionid", mSessionID );
args.insert( "kp3", mKp3 ); args.insert( "kp3", mKp3 );
@ -238,7 +238,7 @@ bool ResourceXMLRPC::doLoad()
mTodoStateMapper.setIdentifier( type() + "_" + identifier() ); mTodoStateMapper.setIdentifier( type() + "_" + identifier() );
mTodoStateMapper.load(); mTodoStateMapper.load();
TQMap<TQString, TQVariant> args, columns; TQStringVariantMap args, columns;
args.insert( "start", TQDateTime( TQDate::currentDate().addDays( -12 ) ) ); args.insert( "start", TQDateTime( TQDate::currentDate().addDays( -12 ) ) );
args.insert( "end", TQDateTime( TQDate::currentDate().addDays( 2000 ) ) ); args.insert( "end", TQDateTime( TQDate::currentDate().addDays( 2000 ) ) );
@ -256,7 +256,7 @@ bool ResourceXMLRPC::doLoad()
this, TQT_SLOT( listTodosFinished( const TQValueList<TQVariant>&, const TQVariant& ) ), this, TQT_SLOT( listTodosFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
mServer->call( LoadEventCategoriesCommand, TQVariant( TQMap<TQString, TQVariant>() ), mServer->call( LoadEventCategoriesCommand, TQVariant( TQStringVariantMap() ),
this, TQT_SLOT( loadEventCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& ) ), this, TQT_SLOT( loadEventCategoriesFinished( const TQValueList<TQVariant>&, const TQVariant& ) ),
this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) ); this, TQT_SLOT( fault( int, const TQString&, const TQVariant& ) ) );
@ -281,7 +281,7 @@ bool ResourceXMLRPC::doSave()
uint counter = 0; uint counter = 0;
for ( evIt = events.begin(); evIt != events.end(); ++evIt ) { for ( evIt = events.begin(); evIt != events.end(); ++evIt ) {
if ( !(*evIt)->isReadOnly() ) { if ( !(*evIt)->isReadOnly() ) {
TQMap<TQString, TQVariant> args; TQStringVariantMap args;
writeEvent( (*evIt), args ); writeEvent( (*evIt), args );
args.insert( "id", idMapper().remoteId( (*evIt)->uid() ).toInt() ); args.insert( "id", idMapper().remoteId( (*evIt)->uid() ).toInt() );
@ -297,7 +297,7 @@ bool ResourceXMLRPC::doSave()
for ( todoIt = todos.begin(); todoIt != todos.end(); ++todoIt ) { for ( todoIt = todos.begin(); todoIt != todos.end(); ++todoIt ) {
if ( !(*todoIt)->isReadOnly() ) { if ( !(*todoIt)->isReadOnly() ) {
TQMap<TQString, TQVariant> args; TQStringVariantMap args;
writeTodo( (*todoIt), args ); writeTodo( (*todoIt), args );
args.insert( "id", idMapper().remoteId( (*todoIt)->uid() ).toInt() ); args.insert( "id", idMapper().remoteId( (*todoIt)->uid() ).toInt() );
@ -329,7 +329,7 @@ TDEABC::Lock *ResourceXMLRPC::lock()
bool ResourceXMLRPC::addEvent( Event* ev ) bool ResourceXMLRPC::addEvent( Event* ev )
{ {
TQMap<TQString, TQVariant> args; TQStringVariantMap args;
disableChangeNotification(); disableChangeNotification();
@ -409,7 +409,7 @@ Event::List ResourceXMLRPC::rawEvents()
bool ResourceXMLRPC::addTodo( Todo *todo ) bool ResourceXMLRPC::addTodo( Todo *todo )
{ {
TQMap<TQString, TQVariant> args; TQStringVariantMap args;
disableChangeNotification(); disableChangeNotification();
@ -516,7 +516,7 @@ void ResourceXMLRPC::reload()
void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant, void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant,
const TQVariant& ) const TQVariant& )
{ {
TQMap<TQString, TQVariant> map = variant[ 0 ].toMap(); TQStringVariantMap map = variant[ 0 ].toMap();
KURL url = KURL( mPrefs->url() ); KURL url = KURL( mPrefs->url() );
if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed
@ -536,7 +536,7 @@ void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant,
void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant>& variant, void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant>& variant,
const TQVariant& ) const TQVariant& )
{ {
TQMap<TQString, TQVariant> map = variant[ 0 ].toMap(); TQStringVariantMap map = variant[ 0 ].toMap();
if ( map[ "GOODBYE" ].toString() != "XOXO" ) if ( map[ "GOODBYE" ].toString() != "XOXO" )
kdError() << "logout failed" << endl; kdError() << "logout failed" << endl;
@ -562,7 +562,7 @@ void ResourceXMLRPC::listEventsFinished( const TQValueList<TQVariant>& list,
bool changed = false; bool changed = false;
for ( eventIt = eventList.begin(); eventIt != eventList.end(); ++eventIt ) { for ( eventIt = eventList.begin(); eventIt != eventList.end(); ++eventIt ) {
TQMap<TQString, TQVariant> map = (*eventIt).toMap(); TQStringVariantMap map = (*eventIt).toMap();
Event *event = new Event; Event *event = new Event;
event->setFloats( false ); event->setFloats( false );
@ -644,8 +644,8 @@ void ResourceXMLRPC::loadEventCategoriesFinished( const TQValueList<TQVariant> &
{ {
mEventCategoryMap.clear(); mEventCategoryMap.clear();
const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap(); const TQStringVariantMap map = mapList[ 0 ].toMap();
TQMap<TQString, TQVariant>::ConstIterator it; TQStringVariantMap::ConstIterator it;
KPimPrefs prefs( "korganizerrc" ); KPimPrefs prefs( "korganizerrc" );
for ( it = map.begin(); it != map.end(); ++it ) { for ( it = map.begin(); it != map.end(); ++it ) {
@ -673,7 +673,7 @@ void ResourceXMLRPC::listTodosFinished( const TQValueList<TQVariant>& list,
bool changed = false; bool changed = false;
for ( todoIt = todoList.begin(); todoIt != todoList.end(); ++todoIt ) { for ( todoIt = todoList.begin(); todoIt != todoList.end(); ++todoIt ) {
TQMap<TQString, TQVariant> map = (*todoIt).toMap(); TQStringVariantMap map = (*todoIt).toMap();
Todo *todo = new Todo; Todo *todo = new Todo;
@ -749,8 +749,8 @@ void ResourceXMLRPC::loadTodoCategoriesFinished( const TQValueList<TQVariant> &m
{ {
mTodoCategoryMap.clear(); mTodoCategoryMap.clear();
const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap(); const TQStringVariantMap map = mapList[ 0 ].toMap();
TQMap<TQString, TQVariant>::ConstIterator it; TQStringVariantMap::ConstIterator it;
KPimPrefs prefs( "korganizerrc" ); KPimPrefs prefs( "korganizerrc" );
for ( it = map.begin(); it != map.end(); ++it ) { for ( it = map.begin(); it != map.end(); ++it ) {
@ -773,7 +773,7 @@ void ResourceXMLRPC::fault( int error, const TQString& errorMsg,
mSynchronizer->stop(); mSynchronizer->stop();
} }
void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *event, void ResourceXMLRPC::readEvent( const TQStringVariantMap &args, Event *event,
TQString &uid ) TQString &uid )
{ {
// for recurrence // for recurrence
@ -784,7 +784,7 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
TQDateTime rEndDate; TQDateTime rEndDate;
TQValueList<TQDateTime> rExceptions; TQValueList<TQDateTime> rExceptions;
TQMap<TQString, TQVariant>::ConstIterator it; TQStringVariantMap::ConstIterator it;
for ( it = args.begin(); it != args.end(); ++it ) { for ( it = args.begin(); it != args.end(); ++it ) {
if ( it.key() == "id" ) { if ( it.key() == "id" ) {
uid = it.data().toString(); uid = it.data().toString();
@ -816,8 +816,8 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
event->setSecrecy( (it.data().toString() == "public" ? event->setSecrecy( (it.data().toString() == "public" ?
Incidence::SecrecyPublic : Incidence::SecrecyPrivate) ); Incidence::SecrecyPublic : Incidence::SecrecyPrivate) );
} else if ( it.key() == "category" ) { } else if ( it.key() == "category" ) {
const TQMap<TQString, TQVariant> categories = it.data().toMap(); const TQStringVariantMap categories = it.data().toMap();
TQMap<TQString, TQVariant>::ConstIterator catIt; TQStringVariantMap::ConstIterator catIt;
TQStringList eventCategories; TQStringList eventCategories;
for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
@ -850,17 +850,17 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
} else if ( it.key() == "recur_data" ) { } else if ( it.key() == "recur_data" ) {
rData = it.data().toInt(); rData = it.data().toInt();
} else if ( it.key() == "recur_exception" ) { } else if ( it.key() == "recur_exception" ) {
const TQMap<TQString, TQVariant> dateList = it.data().toMap(); const TQStringVariantMap dateList = it.data().toMap();
TQMap<TQString, TQVariant>::ConstIterator dateIt; TQStringVariantMap::ConstIterator dateIt;
for ( dateIt = dateList.begin(); dateIt != dateList.end(); ++dateIt ) for ( dateIt = dateList.begin(); dateIt != dateList.end(); ++dateIt )
rExceptions.append( (*dateIt).toDateTime() ); rExceptions.append( (*dateIt).toDateTime() );
} else if ( it.key() == "participants" ) { } else if ( it.key() == "participants" ) {
const TQMap<TQString, TQVariant> persons = it.data().toMap(); const TQStringVariantMap persons = it.data().toMap();
TQMap<TQString, TQVariant>::ConstIterator personsIt; TQStringVariantMap::ConstIterator personsIt;
for ( personsIt = persons.begin(); personsIt != persons.end(); ++personsIt ) { for ( personsIt = persons.begin(); personsIt != persons.end(); ++personsIt ) {
TQMap<TQString, TQVariant> person = (*personsIt).toMap(); TQStringVariantMap person = (*personsIt).toMap();
Attendee::PartStat status = Attendee::InProcess; Attendee::PartStat status = Attendee::InProcess;
if ( person[ "status" ] == "A" ) if ( person[ "status" ] == "A" )
status = Attendee::Accepted; status = Attendee::Accepted;
@ -878,11 +878,11 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
event->addAttendee( attendee ); event->addAttendee( attendee );
} }
} else if ( it.key() == "alarm" ) { } else if ( it.key() == "alarm" ) {
const TQMap<TQString, TQVariant> alarmList = it.data().toMap(); const TQStringVariantMap alarmList = it.data().toMap();
TQMap<TQString, TQVariant>::ConstIterator alarmIt; TQStringVariantMap::ConstIterator alarmIt;
for ( alarmIt = alarmList.begin(); alarmIt != alarmList.end(); ++alarmIt ) { for ( alarmIt = alarmList.begin(); alarmIt != alarmList.end(); ++alarmIt ) {
TQMap<TQString, TQVariant> alarm = (*alarmIt).toMap(); TQStringVariantMap alarm = (*alarmIt).toMap();
Alarm *vAlarm = event->newAlarm(); Alarm *vAlarm = event->newAlarm();
vAlarm->setText( event->summary() ); vAlarm->setText( event->summary() );
@ -940,7 +940,7 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
setRights( event, rights ); setRights( event, rights );
} }
void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args ) void ResourceXMLRPC::writeEvent( Event *event, TQStringVariantMap &args )
{ {
args.insert( "start", event->dtStart() ); args.insert( "start", event->dtStart() );
@ -961,7 +961,7 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
// CATEGORY // CATEGORY
const TQStringList categories = event->categories(); const TQStringList categories = event->categories();
TQStringList::ConstIterator catIt; TQStringList::ConstIterator catIt;
TQMap<TQString, TQVariant> catMap; TQStringVariantMap catMap;
int counter = 0; int counter = 0;
for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
TQMap<TQString, int>::Iterator it = mEventCategoryMap.find( *catIt ); TQMap<TQString, int>::Iterator it = mEventCategoryMap.find( *catIt );
@ -990,7 +990,7 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
args.insert( "recur_interval", int( 0 ) ); args.insert( "recur_interval", int( 0 ) );
args.insert( "recur_enddate", TQDateTime() ); args.insert( "recur_enddate", TQDateTime() );
args.insert( "recur_data", int( 0 ) ); args.insert( "recur_data", int( 0 ) );
args.insert( "recur_exception", TQMap<TQString, TQVariant>() ); args.insert( "recur_exception", TQStringVariantMap() );
} else { } else {
switch ( rec->recurrenceType() ) { switch ( rec->recurrenceType() ) {
case Recurrence::rDaily: case Recurrence::rDaily:
@ -1036,7 +1036,7 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
// TODO: Also use exception dates! // TODO: Also use exception dates!
const TQValueList<TQDateTime> dates = event->recurrence()->exDateTimes(); const TQValueList<TQDateTime> dates = event->recurrence()->exDateTimes();
TQValueList<TQDateTime>::ConstIterator dateIt; TQValueList<TQDateTime>::ConstIterator dateIt;
TQMap<TQString, TQVariant> exMap; TQStringVariantMap exMap;
int counter = 0; int counter = 0;
for ( dateIt = dates.begin(); dateIt != dates.end(); ++dateIt, ++counter ) for ( dateIt = dates.begin(); dateIt != dates.end(); ++dateIt, ++counter )
exMap.insert( TQString::number( counter ), *dateIt ); exMap.insert( TQString::number( counter ), *dateIt );
@ -1047,9 +1047,9 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
// PARTICIPANTS // PARTICIPANTS
const Attendee::List attendees = event->attendees(); const Attendee::List attendees = event->attendees();
Attendee::List::ConstIterator attIt; Attendee::List::ConstIterator attIt;
TQMap<TQString, TQVariant> persons; TQStringVariantMap persons;
for ( attIt = attendees.begin(); attIt != attendees.end(); ++attIt ) { for ( attIt = attendees.begin(); attIt != attendees.end(); ++attIt ) {
TQMap<TQString, TQVariant> person; TQStringVariantMap person;
TQString status; TQString status;
if ( (*attIt)->status() == Attendee::Accepted ) if ( (*attIt)->status() == Attendee::Accepted )
@ -1072,9 +1072,9 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
// ALARMS // ALARMS
const Alarm::List alarms = event->alarms(); const Alarm::List alarms = event->alarms();
Alarm::List::ConstIterator alarmIt; Alarm::List::ConstIterator alarmIt;
TQMap<TQString, TQVariant> alarmMap; TQStringVariantMap alarmMap;
for ( alarmIt = alarms.begin(); alarmIt != alarms.end(); ++alarmIt ) { for ( alarmIt = alarms.begin(); alarmIt != alarms.end(); ++alarmIt ) {
TQMap<TQString, TQVariant> alarm; TQStringVariantMap alarm;
alarm.insert( "time", (*alarmIt)->time() ); alarm.insert( "time", (*alarmIt)->time() );
alarm.insert( "offset", (*alarmIt)->startOffset().asSeconds() ); alarm.insert( "offset", (*alarmIt)->startOffset().asSeconds() );
alarm.insert( "enabled", ( (*alarmIt)->enabled() ? int( 1 ) : int( 0 ) ) ); alarm.insert( "enabled", ( (*alarmIt)->enabled() ? int( 1 ) : int( 0 ) ) );
@ -1085,7 +1085,7 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
args.insert( "alarm", alarmMap ); args.insert( "alarm", alarmMap );
} }
void ResourceXMLRPC::writeTodo( Todo* todo, TQMap<TQString, TQVariant>& args ) void ResourceXMLRPC::writeTodo( Todo* todo, TQStringVariantMap& args )
{ {
args.insert( "subject", todo->summary() ); args.insert( "subject", todo->summary() );
args.insert( "des", todo->description() ); args.insert( "des", todo->description() );
@ -1093,7 +1093,7 @@ void ResourceXMLRPC::writeTodo( Todo* todo, TQMap<TQString, TQVariant>& args )
(todo->secrecy() == Todo::SecrecyPublic ? "public" : "private" ) ); (todo->secrecy() == Todo::SecrecyPublic ? "public" : "private" ) );
// CATEGORIES // CATEGORIES
TQMap<TQString, TQVariant> catMap; TQStringVariantMap catMap;
const TQStringList categories = todo->categories(); const TQStringList categories = todo->categories();
TQStringList::ConstIterator catIt; TQStringList::ConstIterator catIt;
@ -1124,7 +1124,7 @@ void ResourceXMLRPC::writeTodo( Todo* todo, TQMap<TQString, TQVariant>& args )
args.insert( "status", status ); args.insert( "status", status );
} }
void ResourceXMLRPC::readTodo( const TQMap<TQString, TQVariant>& args, Todo *todo, TQString &uid ) void ResourceXMLRPC::readTodo( const TQStringVariantMap& args, Todo *todo, TQString &uid )
{ {
uid = args[ "id" ].toString(); uid = args[ "id" ].toString();
@ -1141,8 +1141,8 @@ void ResourceXMLRPC::readTodo( const TQMap<TQString, TQVariant>& args, Todo *tod
todo->setSecrecy( args[ "access" ].toString() == "public" ? Todo::SecrecyPublic : Todo::SecrecyPrivate ); todo->setSecrecy( args[ "access" ].toString() == "public" ? Todo::SecrecyPublic : Todo::SecrecyPrivate );
// CATEGORIES // CATEGORIES
const TQMap<TQString, TQVariant> categories = args[ "category" ].toMap(); const TQStringVariantMap categories = args[ "category" ].toMap();
TQMap<TQString, TQVariant>::ConstIterator it; TQStringVariantMap::ConstIterator it;
TQStringList todoCategories; TQStringList todoCategories;
for ( it = categories.begin(); it != categories.end(); ++it ) { for ( it = categories.begin(); it != categories.end(); ++it ) {

@ -206,11 +206,11 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
void init(); void init();
void initEGroupware(); void initEGroupware();
void writeEvent( Event*, TQMap<TQString, TQVariant>& ); void writeEvent( Event*, TQStringVariantMap& );
void readEvent( const TQMap<TQString, TQVariant>&, Event*, TQString& ); void readEvent( const TQStringVariantMap&, Event*, TQString& );
void writeTodo( Todo*, TQMap<TQString, TQVariant>& ); void writeTodo( Todo*, TQStringVariantMap& );
void readTodo( const TQMap<TQString, TQVariant>&, Todo*, TQString& ); void readTodo( const TQStringVariantMap&, Todo*, TQString& );
void checkLoadingFinished(); void checkLoadingFinished();

@ -117,7 +117,7 @@ bool ResourceXMLRPC::load()
mServer->setUrl( KURL( mPrefs->url() ) ); mServer->setUrl( KURL( mPrefs->url() ) );
mServer->setUserAgent( "KDE-Notes" ); mServer->setUserAgent( "KDE-Notes" );
TQMap<TQString, TQVariant> args, columns; TQStringVariantMap args, columns;
args.insert( "domain", mPrefs->domain() ); args.insert( "domain", mPrefs->domain() );
args.insert( "username", mPrefs->user() ); args.insert( "username", mPrefs->user() );
args.insert( "password", mPrefs->password() ); args.insert( "password", mPrefs->password() );
@ -152,7 +152,7 @@ bool ResourceXMLRPC::save()
bool ResourceXMLRPC::addNote( KCal::Journal *journal ) bool ResourceXMLRPC::addNote( KCal::Journal *journal )
{ {
TQMap<TQString, TQVariant> args; TQStringVariantMap args;
writeNote( journal, args ); writeNote( journal, args );
KCal::Journal *oldJournal = mCalendar.journal( journal->uid() ); KCal::Journal *oldJournal = mCalendar.journal( journal->uid() );
@ -223,7 +223,7 @@ KCal::Alarm::List ResourceXMLRPC::alarms( const TQDateTime& from, const TQDateTi
void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant, void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant,
const TQVariant& ) const TQVariant& )
{ {
TQMap<TQString, TQVariant> map = variant[ 0 ].toMap(); TQStringVariantMap map = variant[ 0 ].toMap();
KURL url = KURL( mPrefs->url() ); KURL url = KURL( mPrefs->url() );
if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed
@ -243,7 +243,7 @@ void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant,
void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant>& variant, void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant>& variant,
const TQVariant& ) const TQVariant& )
{ {
TQMap<TQString, TQVariant> map = variant[ 0 ].toMap(); TQStringVariantMap map = variant[ 0 ].toMap();
if ( map[ "GOODBYE" ].toString() != "XOXO" ) if ( map[ "GOODBYE" ].toString() != "XOXO" )
kdError() << "logout failed" << endl; kdError() << "logout failed" << endl;
@ -271,7 +271,7 @@ void ResourceXMLRPC::listNotesFinished( const TQValueList<TQVariant> &list, cons
TQValueList<TQVariant>::Iterator noteIt; TQValueList<TQVariant>::Iterator noteIt;
for ( noteIt = noteList.begin(); noteIt != noteList.end(); ++noteIt ) { for ( noteIt = noteList.begin(); noteIt != noteList.end(); ++noteIt ) {
TQMap<TQString, TQVariant> map = (*noteIt).toMap(); TQStringVariantMap map = (*noteIt).toMap();
KCal::Journal *journal = new KCal::Journal(); KCal::Journal *journal = new KCal::Journal();
@ -315,7 +315,7 @@ void ResourceXMLRPC::fault( int error, const TQString& errorMsg, const TQVariant
mSynchronizer->stop(); mSynchronizer->stop();
} }
void ResourceXMLRPC::writeNote( KCal::Journal* journal, TQMap<TQString, TQVariant>& args ) void ResourceXMLRPC::writeNote( KCal::Journal* journal, TQStringVariantMap& args )
{ {
args.insert( "subject", journal->summary() ); args.insert( "subject", journal->summary() );
args.insert( "des", journal->description() ); args.insert( "des", journal->description() );
@ -323,7 +323,7 @@ void ResourceXMLRPC::writeNote( KCal::Journal* journal, TQMap<TQString, TQVarian
(journal->secrecy() == KCal::Journal::SecrecyPublic ? "public" : "private" ) ); (journal->secrecy() == KCal::Journal::SecrecyPublic ? "public" : "private" ) );
} }
void ResourceXMLRPC::readNote( const TQMap<TQString, TQVariant>& args, KCal::Journal *journal, TQString &uid ) void ResourceXMLRPC::readNote( const TQStringVariantMap& args, KCal::Journal *journal, TQString &uid )
{ {
uid = args[ "id" ].toString(); uid = args[ "id" ].toString();

@ -84,8 +84,8 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceNotes
void init(); void init();
void initEGroupware(); void initEGroupware();
void writeNote( KCal::Journal*, TQMap<TQString, TQVariant>& ); void writeNote( KCal::Journal*, TQStringVariantMap& );
void readNote( const TQMap<TQString, TQVariant>&, KCal::Journal*, TQString& ); void readNote( const TQStringVariantMap&, KCal::Journal*, TQString& );
KCal::CalendarLocal mCalendar; KCal::CalendarLocal mCalendar;
KXMLRPC::Server *mServer; KXMLRPC::Server *mServer;

@ -153,7 +153,7 @@ bool ResourceXMLRPC::doOpen()
mServer->setUrl( KURL( mPrefs->url() ) ); mServer->setUrl( KURL( mPrefs->url() ) );
mServer->setUserAgent( "KDE-AddressBook" ); mServer->setUserAgent( "KDE-AddressBook" );
TQMap<TQString, TQVariant> args; TQStringVariantMap args;
args.insert( "domain", mPrefs->domain() ); args.insert( "domain", mPrefs->domain() );
args.insert( "username", mPrefs->user() ); args.insert( "username", mPrefs->user() );
args.insert( "password", mPrefs->password() ); args.insert( "password", mPrefs->password() );
@ -169,7 +169,7 @@ bool ResourceXMLRPC::doOpen()
void ResourceXMLRPC::doClose() void ResourceXMLRPC::doClose()
{ {
TQMap<TQString, TQVariant> args; TQStringVariantMap args;
args.insert( "sessionid", mSessionID ); args.insert( "sessionid", mSessionID );
args.insert( "kp3", mKp3 ); args.insert( "kp3", mKp3 );
@ -196,7 +196,7 @@ bool ResourceXMLRPC::asyncLoad()
loadCache(); loadCache();
TQMap<TQString, TQVariant> args; TQStringVariantMap args;
args.insert( "start", "0" ); args.insert( "start", "0" );
args.insert( "query", "" ); args.insert( "query", "" );
args.insert( "filter", "" ); args.insert( "filter", "" );
@ -249,7 +249,7 @@ bool ResourceXMLRPC::asyncSave( Ticket* )
void ResourceXMLRPC::addContact( const Addressee& addr ) void ResourceXMLRPC::addContact( const Addressee& addr )
{ {
TQMap<TQString, TQVariant> args; TQStringVariantMap args;
writeContact( addr, args ); writeContact( addr, args );
mServer->call( AddContactCommand, args, mServer->call( AddContactCommand, args,
@ -265,7 +265,7 @@ void ResourceXMLRPC::updateContact( const Addressee& addr )
return; return;
} }
TQMap<TQString, TQVariant> args; TQStringVariantMap args;
writeContact( addr, args ); writeContact( addr, args );
args.insert( "id", idMapper().remoteId( addr.uid() ) ); args.insert( "id", idMapper().remoteId( addr.uid() ) );
@ -292,7 +292,7 @@ void ResourceXMLRPC::deleteContact( const Addressee& addr )
void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant> &variant, void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant> &variant,
const TQVariant& ) const TQVariant& )
{ {
TQMap<TQString, TQVariant> map = variant[0].toMap(); TQStringVariantMap map = variant[0].toMap();
KURL url( mPrefs->url() ); KURL url( mPrefs->url() );
if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed
@ -313,7 +313,7 @@ void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant> &variant,
void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant> &variant, void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant> &variant,
const TQVariant& ) const TQVariant& )
{ {
TQMap<TQString, TQVariant> map = variant[0].toMap(); TQStringVariantMap map = variant[0].toMap();
if ( map[ "GOODBYE" ].toString() != "XOXO" ) if ( map[ "GOODBYE" ].toString() != "XOXO" )
addressBook()->error( i18n( "Logout failed, please check your username and password." ) ); addressBook()->error( i18n( "Logout failed, please check your username and password." ) );
@ -335,7 +335,7 @@ void ResourceXMLRPC::listContactsFinished( const TQValueList<TQVariant> &mapList
TDEABC::Addressee::List serverContacts; TDEABC::Addressee::List serverContacts;
for ( contactIt = contactList.begin(); contactIt != contactList.end(); ++contactIt ) { for ( contactIt = contactList.begin(); contactIt != contactList.end(); ++contactIt ) {
const TQMap<TQString, TQVariant> map = (*contactIt).toMap(); const TQStringVariantMap map = (*contactIt).toMap();
Addressee addr; Addressee addr;
TQString uid; TQString uid;
@ -451,7 +451,7 @@ TQString ResourceXMLRPC::addrTypesToTypeStr( int typeMask )
return types.join( ";" ); return types.join( ";" );
} }
void ResourceXMLRPC::writeContact( const Addressee &addr, TQMap<TQString, TQVariant> &args ) void ResourceXMLRPC::writeContact( const Addressee &addr, TQStringVariantMap &args )
{ {
args.insert( "access", ( addr.secrecy().type() == Secrecy::Private ? "private" : "public" ) ); args.insert( "access", ( addr.secrecy().type() == Secrecy::Private ? "private" : "public" ) );
args.insert( "fn", addr.formattedName() ); args.insert( "fn", addr.formattedName() );
@ -476,7 +476,7 @@ void ResourceXMLRPC::writeContact( const Addressee &addr, TQMap<TQString, TQVari
TQStringList::ConstIterator catIt; TQStringList::ConstIterator catIt;
const TQStringList categories = addr.categories(); const TQStringList categories = addr.categories();
TQMap<TQString, TQVariant> catMap; TQStringVariantMap catMap;
int counter = 0; int counter = 0;
for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
TQMap<TQString, int>::ConstIterator it = mCategoryMap.find( *catIt ); TQMap<TQString, int>::ConstIterator it = mCategoryMap.find( *catIt );
@ -593,11 +593,11 @@ void ResourceXMLRPC::writeContact( const Addressee &addr, TQMap<TQString, TQVari
args.insert( "freebusy_url", url ); args.insert( "freebusy_url", url );
} }
void ResourceXMLRPC::readContact( const TQMap<TQString, TQVariant> &args, Addressee &addr, TQString &uid ) void ResourceXMLRPC::readContact( const TQStringVariantMap &args, Addressee &addr, TQString &uid )
{ {
Address addrOne, addrTwo; Address addrOne, addrTwo;
TQMap<TQString, TQVariant>::ConstIterator it; TQStringVariantMap::ConstIterator it;
for ( it = args.begin(); it != args.end(); ++it ) { for ( it = args.begin(); it != args.end(); ++it ) {
if ( it.key() == "id" ) { if ( it.key() == "id" ) {
uid = it.data().toString(); uid = it.data().toString();
@ -710,8 +710,8 @@ void ResourceXMLRPC::readContact( const TQMap<TQString, TQVariant> &args, Addres
addr.insertEmail( it.data().toString(), false ); addr.insertEmail( it.data().toString(), false );
} else if ( it.key() == "email_home_type" ) { } else if ( it.key() == "email_home_type" ) {
} else if ( it.key() == "cat_id" ) { } else if ( it.key() == "cat_id" ) {
const TQMap<TQString, TQVariant> categories = it.data().toMap(); const TQStringVariantMap categories = it.data().toMap();
TQMap<TQString, TQVariant>::ConstIterator it; TQStringVariantMap::ConstIterator it;
for ( it = categories.begin(); it != categories.end(); ++it ) for ( it = categories.begin(); it != categories.end(); ++it )
addr.insertCategory( it.data().toString() ); addr.insertCategory( it.data().toString() );
@ -744,8 +744,8 @@ void ResourceXMLRPC::loadCategoriesFinished( const TQValueList<TQVariant> &mapLi
{ {
mCategoryMap.clear(); mCategoryMap.clear();
const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap(); const TQStringVariantMap map = mapList[ 0 ].toMap();
TQMap<TQString, TQVariant>::ConstIterator it; TQStringVariantMap::ConstIterator it;
KABPrefs *prefs = KABPrefs::instance(); KABPrefs *prefs = KABPrefs::instance();
for ( it = map.begin(); it != map.end(); ++it ) { for ( it = map.begin(); it != map.end(); ++it ) {
@ -764,8 +764,8 @@ void ResourceXMLRPC::loadCustomFieldsFinished( const TQValueList<TQVariant> &map
{ {
mCustomFieldsMap.clear(); mCustomFieldsMap.clear();
const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap(); const TQStringVariantMap map = mapList[ 0 ].toMap();
TQMap<TQString, TQVariant>::ConstIterator it; TQStringVariantMap::ConstIterator it;
for ( it = map.begin(); it != map.end(); ++it ) for ( it = map.begin(); it != map.end(); ++it )
mCustomFieldsMap.insert( it.key(), it.data().toString() ); mCustomFieldsMap.insert( it.key(), it.data().toString() );

@ -91,8 +91,8 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
TQString addrTypesToTypeStr( int ); TQString addrTypesToTypeStr( int );
void writeContact( const Addressee&, TQMap<TQString, TQVariant>& ); void writeContact( const Addressee&, TQStringVariantMap& );
void readContact( const TQMap<TQString, TQVariant>&, Addressee &addr, TQString& ); void readContact( const TQStringVariantMap&, Addressee &addr, TQString& );
EGroupwarePrefs *mPrefs; EGroupwarePrefs *mPrefs;

@ -237,9 +237,9 @@ TQString Query::marshal( const TQVariant &arg ) const
case TQVariant::Map: case TQVariant::Map:
{ {
TQString markup = "<value><struct>\r\n"; TQString markup = "<value><struct>\r\n";
TQMap<TQString, TQVariant> map = arg.toMap(); TQStringVariantMap map = arg.toMap();
TQMap<TQString, TQVariant>::ConstIterator it = map.begin(); TQStringVariantMap::ConstIterator it = map.begin();
TQMap<TQString, TQVariant>::ConstIterator end = map.end(); TQStringVariantMap::ConstIterator end = map.end();
for ( ; it != end; ++it ) for ( ; it != end; ++it )
{ {
markup += "<member>\r\n"; markup += "<member>\r\n";
@ -293,7 +293,7 @@ TQVariant Query::demarshal( const TQDomElement &elem ) const
} }
else if ( typeName == "struct" ) else if ( typeName == "struct" )
{ {
TQMap<TQString, TQVariant> map; TQStringVariantMap map;
TQDomNode memberNode = typeElement.firstChild(); TQDomNode memberNode = typeElement.firstChild();
while ( !memberNode.isNull() ) while ( !memberNode.isNull() )
{ {

Loading…
Cancel
Save