summaryrefslogtreecommitdiffstats
path: root/kresources/egroupware/kcal_resourcexmlrpc.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kresources/egroupware/kcal_resourcexmlrpc.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-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/kcal_resourcexmlrpc.cpp')
-rw-r--r--kresources/egroupware/kcal_resourcexmlrpc.cpp346
1 files changed, 173 insertions, 173 deletions
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 );