Просмотр исходного кода

Adjusted to use new TQStringVariantMap type.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/30/head
Michele Calgaro 1 год назад
Родитель
Сommit
6d2f3127be
Подписано: MicheleC Идентификатор GPG ключа: 2A75B7CA8ADED5CF
20 измененных файлов: 106 добавлений и 109 удалений
  1. +1
    -1
      certmanager/lib/backends/chiasmus/chiasmusbackend.cpp
  2. +1
    -1
      certmanager/lib/backends/chiasmus/obtainkeysjob.h
  3. +1
    -1
      certmanager/lib/cryptplugwrapper.h
  4. +3
    -6
      certmanager/lib/kleo/cryptobackend.h
  5. +2
    -2
      kmail/kmcommands.cpp
  6. +1
    -1
      kmail/kmcomposewin.cpp
  7. +1
    -1
      kmail/messagecomposer.cpp
  8. +2
    -2
      kmail/objecttreeparser.cpp
  9. +6
    -6
      libemailfunctions/idmapper.cpp
  10. +1
    -1
      libemailfunctions/idmapper.h
  11. +4
    -4
      tderesources/blogging/API_Blogger.cpp
  12. +1
    -1
      tderesources/blogging/API_Blogger.h
  13. +4
    -4
      tderesources/blogging/xmlrpcjob.cpp
  14. +41
    -41
      tderesources/egroupware/kcal_resourcexmlrpc.cpp
  15. +4
    -4
      tderesources/egroupware/kcal_resourcexmlrpc.h
  16. +7
    -7
      tderesources/egroupware/knotes_resourcexmlrpc.cpp
  17. +2
    -2
      tderesources/egroupware/knotes_resourcexmlrpc.h
  18. +18
    -18
      tderesources/egroupware/tdeabc_resourcexmlrpc.cpp
  19. +2
    -2
      tderesources/egroupware/tdeabc_resourcexmlrpc.h
  20. +4
    -4
      tderesources/egroupware/xmlrpciface.cpp

+ 1
- 1
certmanager/lib/backends/chiasmus/chiasmusbackend.cpp Просмотреть файл

@@ -374,7 +374,7 @@ public:
DecryptVerifyJob * decryptVerifyJob( bool ) 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 )
return new ObtainKeysJob();
if ( tqstricmp( type, "x-encrypt" ) == 0 && args.size() == 0 )


+ 1
- 1
certmanager/lib/backends/chiasmus/obtainkeysjob.h Просмотреть файл

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

The resulting TQVariant will contain a TQStringList containing the


+ 1
- 1
certmanager/lib/cryptplugwrapper.h Просмотреть файл

@@ -813,7 +813,7 @@ public:
Kleo::DecryptVerifyJob * decryptVerifyJob( bool textmode=false ) 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 );



+ 3
- 6
certmanager/lib/kleo/cryptobackend.h Просмотреть файл

@@ -2,7 +2,7 @@
kleo/cryptobackend.h

This file is part of libkleopatra, the KDE keymanagement library
Copyright (c) 2004,2005 Klarälvdalens Datakonsult AB
Copyright (c) 2004,2005 Klar�lvdalens Datakonsult AB

Libkleopatra is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -34,6 +34,7 @@
#define __KLEO_CRYPTOBACKEND_H__

#include <tqstring.h>
#include <tqvariant.h>

namespace Kleo {
class CryptoConfig;
@@ -54,10 +55,6 @@ namespace Kleo {
class SpecialJob;
}

class TQString;
class TQVariant;
template <typename T_Key, typename T_Value> class TQMap;

namespace Kleo {

class CryptoBackend {
@@ -114,7 +111,7 @@ namespace Kleo {
virtual DecryptVerifyJob * decryptVerifyJob( bool textmode=false ) 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;
};

}


+ 2
- 2
kmail/kmcommands.cpp Просмотреть файл

@@ -3239,7 +3239,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
if ( !chiasmus )
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() ) {
const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." );
@@ -3280,7 +3280,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
GlobalSettings::setChiasmusDecryptionKey( selectorDlg.key() );
assert( !GlobalSettings::chiasmusDecryptionKey().isEmpty() );

Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", TQMap<TQString,TQVariant>() );
Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", TQStringVariantMap() );
if ( !job ) {
const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-decrypt\" function. Please report this bug." );


+ 1
- 1
kmail/kmcomposewin.cpp Просмотреть файл

@@ -5311,7 +5311,7 @@ void KMComposeWin::slotEncryptChiasmusToggled( bool on ) {
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() ) {
const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." );


+ 1
- 1
kmail/messagecomposer.cpp Просмотреть файл

@@ -552,7 +552,7 @@ bool MessageComposer::encryptWithChiasmus( const Kleo::CryptoBackend::Protocol *
const TQByteArray& body,
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() ) {
const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-encrypt\" function. Please report this bug." );


+ 2
- 2
kmail/objecttreeparser.cpp Просмотреть файл

@@ -1853,7 +1853,7 @@ bool ObjectTreeParser::decryptChiasmus( const TQByteArray& data, TQByteArray& bo
if ( !chiasmus )
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() ) {
errorText = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." );
@@ -1892,7 +1892,7 @@ bool ObjectTreeParser::decryptChiasmus( const TQByteArray& data, TQByteArray& bo
GlobalSettings::setChiasmusDecryptionKey( selectorDlg.key() );
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() ) {
errorText = i18n( "Chiasmus backend does not offer the "
"\"x-decrypt\" function. Please report this bug." );


+ 6
- 6
libemailfunctions/idmapper.cpp Просмотреть файл

@@ -95,7 +95,7 @@ bool IdMapper::save()

TQString content;

TQMap<TQString, TQVariant>::Iterator it;
TQStringVariantMap::Iterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) {
TQString fingerprint( "" );
if ( mFingerprintMap.contains( it.key() ) )
@@ -122,7 +122,7 @@ void IdMapper::setRemoteId( const TQString &localId, 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 )
if ( it.data().toString() == remoteId ) {
mIdMap.remove( it );
@@ -133,7 +133,7 @@ void IdMapper::removeRemoteId( const TQString &remoteId )

TQString IdMapper::remoteId( const TQString &localId ) const
{
TQMap<TQString, TQVariant>::ConstIterator it;
TQStringVariantMap::ConstIterator it;
it = mIdMap.find( localId );

if ( it != mIdMap.end() )
@@ -144,7 +144,7 @@ TQString IdMapper::remoteId( const TQString &localId ) const

TQString IdMapper::localId( const TQString &remoteId ) const
{
TQMap<TQString, TQVariant>::ConstIterator it;
TQStringVariantMap::ConstIterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it )
if ( it.data().toString() == remoteId )
return it.key();
@@ -156,7 +156,7 @@ TQString IdMapper::asString() const
{
TQString content;

TQMap<TQString, TQVariant>::ConstIterator it;
TQStringVariantMap::ConstIterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) {
TQString fp;
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> reverseMap;
TQMap<TQString, TQVariant>::ConstIterator it;
TQStringVariantMap::ConstIterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) {
reverseMap.insert( it.data().toString(), it.key() );
}


+ 1
- 1
libemailfunctions/idmapper.h Просмотреть файл

@@ -147,7 +147,7 @@ class KDE_EXPORT IdMapper
TQString filename();

private:
TQMap<TQString, TQVariant> mIdMap;
TQStringVariantMap mIdMap;
TQMap<TQString, TQString> mFingerprintMap;

TQString mPath;


+ 4
- 4
tderesources/blogging/API_Blogger.cpp Просмотреть файл

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


+ 1
- 1
tderesources/blogging/API_Blogger.h Просмотреть файл

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

}


+ 4
- 4
tderesources/blogging/xmlrpcjob.cpp Просмотреть файл

@@ -278,9 +278,9 @@ TQString XmlrpcJob::marshal( const TQVariant &arg )
case TQVariant::Map:
{
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();
TQStringVariantMap map = arg.toMap();
TQStringVariantMap::ConstIterator it = map.begin();
TQStringVariantMap::ConstIterator end = map.end();
for ( ; it != end; ++it )
{
markup += "<member>\r\n";
@@ -357,7 +357,7 @@ kdDebug()<<"Demarshalling element \"" << elem.text() <<"\"" << endl;

} else if ( typeName == "struct" ) {

TQMap<TQString, TQVariant> map;
TQStringVariantMap map;
TQDomNode memberNode = typeElement.firstChild();
while ( !memberNode.isNull() ) {
const TQString key = memberNode.toElement().elementsByTagName( "name" ).item( 0 ).toElement().text();


+ 41
- 41
tderesources/egroupware/kcal_resourcexmlrpc.cpp Просмотреть файл

@@ -191,7 +191,7 @@ bool ResourceXMLRPC::doOpen()
mServer->setUrl( KURL( mPrefs->url() ) );
mServer->setUserAgent( "KDE-Calendar" );

TQMap<TQString, TQVariant> args;
TQStringVariantMap args;
args.insert( "domain", mPrefs->domain() );
args.insert( "username", mPrefs->user() );
args.insert( "password", mPrefs->password() );
@@ -209,7 +209,7 @@ void ResourceXMLRPC::doClose()
{
kdDebug(5800) << "ResourceXMLRPC::doClose()" << endl;

TQMap<TQString, TQVariant> args;
TQStringVariantMap args;
args.insert( "sessionid", mSessionID );
args.insert( "kp3", mKp3 );

@@ -238,7 +238,7 @@ bool ResourceXMLRPC::doLoad()
mTodoStateMapper.setIdentifier( type() + "_" + identifier() );
mTodoStateMapper.load();

TQMap<TQString, TQVariant> args, columns;
TQStringVariantMap args, columns;
args.insert( "start", TQDateTime( TQDate::currentDate().addDays( -12 ) ) );
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( 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( fault( int, const TQString&, const TQVariant& ) ) );

@@ -281,7 +281,7 @@ bool ResourceXMLRPC::doSave()
uint counter = 0;
for ( evIt = events.begin(); evIt != events.end(); ++evIt ) {
if ( !(*evIt)->isReadOnly() ) {
TQMap<TQString, TQVariant> args;
TQStringVariantMap args;
writeEvent( (*evIt), args );

args.insert( "id", idMapper().remoteId( (*evIt)->uid() ).toInt() );
@@ -297,7 +297,7 @@ bool ResourceXMLRPC::doSave()

for ( todoIt = todos.begin(); todoIt != todos.end(); ++todoIt ) {
if ( !(*todoIt)->isReadOnly() ) {
TQMap<TQString, TQVariant> args;
TQStringVariantMap args;
writeTodo( (*todoIt), args );

args.insert( "id", idMapper().remoteId( (*todoIt)->uid() ).toInt() );
@@ -329,7 +329,7 @@ TDEABC::Lock *ResourceXMLRPC::lock()

bool ResourceXMLRPC::addEvent( Event* ev )
{
TQMap<TQString, TQVariant> args;
TQStringVariantMap args;

disableChangeNotification();

@@ -409,7 +409,7 @@ Event::List ResourceXMLRPC::rawEvents()

bool ResourceXMLRPC::addTodo( Todo *todo )
{
TQMap<TQString, TQVariant> args;
TQStringVariantMap args;

disableChangeNotification();

@@ -516,7 +516,7 @@ void ResourceXMLRPC::reload()
void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant,
const TQVariant& )
{
TQMap<TQString, TQVariant> map = variant[ 0 ].toMap();
TQStringVariantMap map = variant[ 0 ].toMap();

KURL url = KURL( mPrefs->url() );
if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed
@@ -536,7 +536,7 @@ void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant,
void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant>& variant,
const TQVariant& )
{
TQMap<TQString, TQVariant> map = variant[ 0 ].toMap();
TQStringVariantMap map = variant[ 0 ].toMap();

if ( map[ "GOODBYE" ].toString() != "XOXO" )
kdError() << "logout failed" << endl;
@@ -562,7 +562,7 @@ void ResourceXMLRPC::listEventsFinished( const TQValueList<TQVariant>& list,

bool changed = false;
for ( eventIt = eventList.begin(); eventIt != eventList.end(); ++eventIt ) {
TQMap<TQString, TQVariant> map = (*eventIt).toMap();
TQStringVariantMap map = (*eventIt).toMap();

Event *event = new Event;
event->setFloats( false );
@@ -644,8 +644,8 @@ void ResourceXMLRPC::loadEventCategoriesFinished( const TQValueList<TQVariant> &
{
mEventCategoryMap.clear();

const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap();
TQMap<TQString, TQVariant>::ConstIterator it;
const TQStringVariantMap map = mapList[ 0 ].toMap();
TQStringVariantMap::ConstIterator it;

KPimPrefs prefs( "korganizerrc" );
for ( it = map.begin(); it != map.end(); ++it ) {
@@ -673,7 +673,7 @@ void ResourceXMLRPC::listTodosFinished( const TQValueList<TQVariant>& list,

bool changed = false;
for ( todoIt = todoList.begin(); todoIt != todoList.end(); ++todoIt ) {
TQMap<TQString, TQVariant> map = (*todoIt).toMap();
TQStringVariantMap map = (*todoIt).toMap();

Todo *todo = new Todo;

@@ -749,8 +749,8 @@ void ResourceXMLRPC::loadTodoCategoriesFinished( const TQValueList<TQVariant> &m
{
mTodoCategoryMap.clear();

const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap();
TQMap<TQString, TQVariant>::ConstIterator it;
const TQStringVariantMap map = mapList[ 0 ].toMap();
TQStringVariantMap::ConstIterator it;

KPimPrefs prefs( "korganizerrc" );
for ( it = map.begin(); it != map.end(); ++it ) {
@@ -773,7 +773,7 @@ void ResourceXMLRPC::fault( int error, const TQString& errorMsg,
mSynchronizer->stop();
}

void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *event,
void ResourceXMLRPC::readEvent( const TQStringVariantMap &args, Event *event,
TQString &uid )
{
// for recurrence
@@ -784,7 +784,7 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
TQDateTime rEndDate;
TQValueList<TQDateTime> rExceptions;

TQMap<TQString, TQVariant>::ConstIterator it;
TQStringVariantMap::ConstIterator it;
for ( it = args.begin(); it != args.end(); ++it ) {
if ( it.key() == "id" ) {
uid = it.data().toString();
@@ -816,8 +816,8 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
event->setSecrecy( (it.data().toString() == "public" ?
Incidence::SecrecyPublic : Incidence::SecrecyPrivate) );
} else if ( it.key() == "category" ) {
const TQMap<TQString, TQVariant> categories = it.data().toMap();
TQMap<TQString, TQVariant>::ConstIterator catIt;
const TQStringVariantMap categories = it.data().toMap();
TQStringVariantMap::ConstIterator catIt;

TQStringList eventCategories;
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" ) {
rData = it.data().toInt();
} else if ( it.key() == "recur_exception" ) {
const TQMap<TQString, TQVariant> dateList = it.data().toMap();
TQMap<TQString, TQVariant>::ConstIterator dateIt;
const TQStringVariantMap dateList = it.data().toMap();
TQStringVariantMap::ConstIterator dateIt;

for ( dateIt = dateList.begin(); dateIt != dateList.end(); ++dateIt )
rExceptions.append( (*dateIt).toDateTime() );
} else if ( it.key() == "participants" ) {
const TQMap<TQString, TQVariant> persons = it.data().toMap();
TQMap<TQString, TQVariant>::ConstIterator personsIt;
const TQStringVariantMap persons = it.data().toMap();
TQStringVariantMap::ConstIterator personsIt;

for ( personsIt = persons.begin(); personsIt != persons.end(); ++personsIt ) {
TQMap<TQString, TQVariant> person = (*personsIt).toMap();
TQStringVariantMap person = (*personsIt).toMap();
Attendee::PartStat status = Attendee::InProcess;
if ( person[ "status" ] == "A" )
status = Attendee::Accepted;
@@ -878,11 +878,11 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
event->addAttendee( attendee );
}
} else if ( it.key() == "alarm" ) {
const TQMap<TQString, TQVariant> alarmList = it.data().toMap();
TQMap<TQString, TQVariant>::ConstIterator alarmIt;
const TQStringVariantMap alarmList = it.data().toMap();
TQStringVariantMap::ConstIterator alarmIt;

for ( alarmIt = alarmList.begin(); alarmIt != alarmList.end(); ++alarmIt ) {
TQMap<TQString, TQVariant> alarm = (*alarmIt).toMap();
TQStringVariantMap alarm = (*alarmIt).toMap();

Alarm *vAlarm = event->newAlarm();
vAlarm->setText( event->summary() );
@@ -940,7 +940,7 @@ void ResourceXMLRPC::readEvent( const TQMap<TQString, TQVariant> &args, Event *e
setRights( event, rights );
}

void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args )
void ResourceXMLRPC::writeEvent( Event *event, TQStringVariantMap &args )
{
args.insert( "start", event->dtStart() );

@@ -961,7 +961,7 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
// CATEGORY
const TQStringList categories = event->categories();
TQStringList::ConstIterator catIt;
TQMap<TQString, TQVariant> catMap;
TQStringVariantMap catMap;
int counter = 0;
for ( catIt = categories.begin(); catIt != categories.end(); ++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_enddate", TQDateTime() );
args.insert( "recur_data", int( 0 ) );
args.insert( "recur_exception", TQMap<TQString, TQVariant>() );
args.insert( "recur_exception", TQStringVariantMap() );
} else {
switch ( rec->recurrenceType() ) {
case Recurrence::rDaily:
@@ -1036,7 +1036,7 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
// TODO: Also use exception dates!
const TQValueList<TQDateTime> dates = event->recurrence()->exDateTimes();
TQValueList<TQDateTime>::ConstIterator dateIt;
TQMap<TQString, TQVariant> exMap;
TQStringVariantMap exMap;
int counter = 0;
for ( dateIt = dates.begin(); dateIt != dates.end(); ++dateIt, ++counter )
exMap.insert( TQString::number( counter ), *dateIt );
@@ -1047,9 +1047,9 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
// PARTICIPANTS
const Attendee::List attendees = event->attendees();
Attendee::List::ConstIterator attIt;
TQMap<TQString, TQVariant> persons;
TQStringVariantMap persons;
for ( attIt = attendees.begin(); attIt != attendees.end(); ++attIt ) {
TQMap<TQString, TQVariant> person;
TQStringVariantMap person;
TQString status;

if ( (*attIt)->status() == Attendee::Accepted )
@@ -1072,9 +1072,9 @@ void ResourceXMLRPC::writeEvent( Event *event, TQMap<TQString, TQVariant> &args
// ALARMS
const Alarm::List alarms = event->alarms();
Alarm::List::ConstIterator alarmIt;
TQMap<TQString, TQVariant> alarmMap;
TQStringVariantMap alarmMap;
for ( alarmIt = alarms.begin(); alarmIt != alarms.end(); ++alarmIt ) {
TQMap<TQString, TQVariant> alarm;
TQStringVariantMap alarm;
alarm.insert( "time", (*alarmIt)->time() );
alarm.insert( "offset", (*alarmIt)->startOffset().asSeconds() );
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 );
}

void ResourceXMLRPC::writeTodo( Todo* todo, TQMap<TQString, TQVariant>& args )
void ResourceXMLRPC::writeTodo( Todo* todo, TQStringVariantMap& args )
{
args.insert( "subject", todo->summary() );
args.insert( "des", todo->description() );
@@ -1093,7 +1093,7 @@ void ResourceXMLRPC::writeTodo( Todo* todo, TQMap<TQString, TQVariant>& args )
(todo->secrecy() == Todo::SecrecyPublic ? "public" : "private" ) );

// CATEGORIES
TQMap<TQString, TQVariant> catMap;
TQStringVariantMap catMap;

const TQStringList categories = todo->categories();
TQStringList::ConstIterator catIt;
@@ -1124,7 +1124,7 @@ void ResourceXMLRPC::writeTodo( Todo* todo, TQMap<TQString, TQVariant>& args )
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();

@@ -1141,8 +1141,8 @@ void ResourceXMLRPC::readTodo( const TQMap<TQString, TQVariant>& args, Todo *tod
todo->setSecrecy( args[ "access" ].toString() == "public" ? Todo::SecrecyPublic : Todo::SecrecyPrivate );

// CATEGORIES
const TQMap<TQString, TQVariant> categories = args[ "category" ].toMap();
TQMap<TQString, TQVariant>::ConstIterator it;
const TQStringVariantMap categories = args[ "category" ].toMap();
TQStringVariantMap::ConstIterator it;

TQStringList todoCategories;
for ( it = categories.begin(); it != categories.end(); ++it ) {


+ 4
- 4
tderesources/egroupware/kcal_resourcexmlrpc.h Просмотреть файл

@@ -206,11 +206,11 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached
void init();
void initEGroupware();

void writeEvent( Event*, TQMap<TQString, TQVariant>& );
void readEvent( const TQMap<TQString, TQVariant>&, Event*, TQString& );
void writeEvent( Event*, TQStringVariantMap& );
void readEvent( const TQStringVariantMap&, Event*, TQString& );

void writeTodo( Todo*, TQMap<TQString, TQVariant>& );
void readTodo( const TQMap<TQString, TQVariant>&, Todo*, TQString& );
void writeTodo( Todo*, TQStringVariantMap& );
void readTodo( const TQStringVariantMap&, Todo*, TQString& );

void checkLoadingFinished();



+ 7
- 7
tderesources/egroupware/knotes_resourcexmlrpc.cpp Просмотреть файл

@@ -117,7 +117,7 @@ bool ResourceXMLRPC::load()
mServer->setUrl( KURL( mPrefs->url() ) );
mServer->setUserAgent( "KDE-Notes" );

TQMap<TQString, TQVariant> args, columns;
TQStringVariantMap args, columns;
args.insert( "domain", mPrefs->domain() );
args.insert( "username", mPrefs->user() );
args.insert( "password", mPrefs->password() );
@@ -152,7 +152,7 @@ bool ResourceXMLRPC::save()

bool ResourceXMLRPC::addNote( KCal::Journal *journal )
{
TQMap<TQString, TQVariant> args;
TQStringVariantMap args;
writeNote( journal, args );

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,
const TQVariant& )
{
TQMap<TQString, TQVariant> map = variant[ 0 ].toMap();
TQStringVariantMap map = variant[ 0 ].toMap();

KURL url = KURL( mPrefs->url() );
if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed
@@ -243,7 +243,7 @@ void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant>& variant,
void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant>& variant,
const TQVariant& )
{
TQMap<TQString, TQVariant> map = variant[ 0 ].toMap();
TQStringVariantMap map = variant[ 0 ].toMap();

if ( map[ "GOODBYE" ].toString() != "XOXO" )
kdError() << "logout failed" << endl;
@@ -271,7 +271,7 @@ void ResourceXMLRPC::listNotesFinished( const TQValueList<TQVariant> &list, cons
TQValueList<TQVariant>::Iterator 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();

@@ -315,7 +315,7 @@ void ResourceXMLRPC::fault( int error, const TQString& errorMsg, const TQVariant
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( "des", journal->description() );
@@ -323,7 +323,7 @@ void ResourceXMLRPC::writeNote( KCal::Journal* journal, TQMap<TQString, TQVarian
(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();



+ 2
- 2
tderesources/egroupware/knotes_resourcexmlrpc.h Просмотреть файл

@@ -84,8 +84,8 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceNotes
void init();
void initEGroupware();

void writeNote( KCal::Journal*, TQMap<TQString, TQVariant>& );
void readNote( const TQMap<TQString, TQVariant>&, KCal::Journal*, TQString& );
void writeNote( KCal::Journal*, TQStringVariantMap& );
void readNote( const TQStringVariantMap&, KCal::Journal*, TQString& );

KCal::CalendarLocal mCalendar;
KXMLRPC::Server *mServer;


+ 18
- 18
tderesources/egroupware/tdeabc_resourcexmlrpc.cpp Просмотреть файл

@@ -153,7 +153,7 @@ bool ResourceXMLRPC::doOpen()
mServer->setUrl( KURL( mPrefs->url() ) );
mServer->setUserAgent( "KDE-AddressBook" );

TQMap<TQString, TQVariant> args;
TQStringVariantMap args;
args.insert( "domain", mPrefs->domain() );
args.insert( "username", mPrefs->user() );
args.insert( "password", mPrefs->password() );
@@ -169,7 +169,7 @@ bool ResourceXMLRPC::doOpen()

void ResourceXMLRPC::doClose()
{
TQMap<TQString, TQVariant> args;
TQStringVariantMap args;
args.insert( "sessionid", mSessionID );
args.insert( "kp3", mKp3 );

@@ -196,7 +196,7 @@ bool ResourceXMLRPC::asyncLoad()

loadCache();

TQMap<TQString, TQVariant> args;
TQStringVariantMap args;
args.insert( "start", "0" );
args.insert( "query", "" );
args.insert( "filter", "" );
@@ -249,7 +249,7 @@ bool ResourceXMLRPC::asyncSave( Ticket* )

void ResourceXMLRPC::addContact( const Addressee& addr )
{
TQMap<TQString, TQVariant> args;
TQStringVariantMap args;
writeContact( addr, args );

mServer->call( AddContactCommand, args,
@@ -265,7 +265,7 @@ void ResourceXMLRPC::updateContact( const Addressee& addr )
return;
}

TQMap<TQString, TQVariant> args;
TQStringVariantMap args;
writeContact( addr, args );

args.insert( "id", idMapper().remoteId( addr.uid() ) );
@@ -292,7 +292,7 @@ void ResourceXMLRPC::deleteContact( const Addressee& addr )
void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant> &variant,
const TQVariant& )
{
TQMap<TQString, TQVariant> map = variant[0].toMap();
TQStringVariantMap map = variant[0].toMap();

KURL url( mPrefs->url() );
if ( map[ "GOAWAY" ].toString() == "XOXO" ) { // failed
@@ -313,7 +313,7 @@ void ResourceXMLRPC::loginFinished( const TQValueList<TQVariant> &variant,
void ResourceXMLRPC::logoutFinished( const TQValueList<TQVariant> &variant,
const TQVariant& )
{
TQMap<TQString, TQVariant> map = variant[0].toMap();
TQStringVariantMap map = variant[0].toMap();

if ( map[ "GOODBYE" ].toString() != "XOXO" )
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;
for ( contactIt = contactList.begin(); contactIt != contactList.end(); ++contactIt ) {
const TQMap<TQString, TQVariant> map = (*contactIt).toMap();
const TQStringVariantMap map = (*contactIt).toMap();

Addressee addr;
TQString uid;
@@ -451,7 +451,7 @@ TQString ResourceXMLRPC::addrTypesToTypeStr( int typeMask )
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( "fn", addr.formattedName() );
@@ -476,7 +476,7 @@ void ResourceXMLRPC::writeContact( const Addressee &addr, TQMap<TQString, TQVari
TQStringList::ConstIterator catIt;
const TQStringList categories = addr.categories();

TQMap<TQString, TQVariant> catMap;
TQStringVariantMap catMap;
int counter = 0;
for ( catIt = categories.begin(); catIt != categories.end(); ++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 );
}

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;

TQMap<TQString, TQVariant>::ConstIterator it;
TQStringVariantMap::ConstIterator it;
for ( it = args.begin(); it != args.end(); ++it ) {
if ( it.key() == "id" ) {
uid = it.data().toString();
@@ -710,8 +710,8 @@ void ResourceXMLRPC::readContact( const TQMap<TQString, TQVariant> &args, Addres
addr.insertEmail( it.data().toString(), false );
} else if ( it.key() == "email_home_type" ) {
} else if ( it.key() == "cat_id" ) {
const TQMap<TQString, TQVariant> categories = it.data().toMap();
TQMap<TQString, TQVariant>::ConstIterator it;
const TQStringVariantMap categories = it.data().toMap();
TQStringVariantMap::ConstIterator it;

for ( it = categories.begin(); it != categories.end(); ++it )
addr.insertCategory( it.data().toString() );
@@ -744,8 +744,8 @@ void ResourceXMLRPC::loadCategoriesFinished( const TQValueList<TQVariant> &mapLi
{
mCategoryMap.clear();

const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap();
TQMap<TQString, TQVariant>::ConstIterator it;
const TQStringVariantMap map = mapList[ 0 ].toMap();
TQStringVariantMap::ConstIterator it;

KABPrefs *prefs = KABPrefs::instance();
for ( it = map.begin(); it != map.end(); ++it ) {
@@ -764,8 +764,8 @@ void ResourceXMLRPC::loadCustomFieldsFinished( const TQValueList<TQVariant> &map
{
mCustomFieldsMap.clear();

const TQMap<TQString, TQVariant> map = mapList[ 0 ].toMap();
TQMap<TQString, TQVariant>::ConstIterator it;
const TQStringVariantMap map = mapList[ 0 ].toMap();
TQStringVariantMap::ConstIterator it;

for ( it = map.begin(); it != map.end(); ++it )
mCustomFieldsMap.insert( it.key(), it.data().toString() );


+ 2
- 2
tderesources/egroupware/tdeabc_resourcexmlrpc.h Просмотреть файл

@@ -91,8 +91,8 @@ class KDE_EXPORT ResourceXMLRPC : public ResourceCached

TQString addrTypesToTypeStr( int );

void writeContact( const Addressee&, TQMap<TQString, TQVariant>& );
void readContact( const TQMap<TQString, TQVariant>&, Addressee &addr, TQString& );
void writeContact( const Addressee&, TQStringVariantMap& );
void readContact( const TQStringVariantMap&, Addressee &addr, TQString& );

EGroupwarePrefs *mPrefs;



+ 4
- 4
tderesources/egroupware/xmlrpciface.cpp Просмотреть файл

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


Загрузка…
Отмена
Сохранить