summaryrefslogtreecommitdiffabout
path: root/libkdepim
Unidiff
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/externalapphandler.cpp12
-rw-r--r--libkdepim/externalapphandler.h2
-rw-r--r--libkdepim/kpimglobalprefs.cpp3
3 files changed, 12 insertions, 5 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index 779b20e..9085673 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -56,17 +56,17 @@ $Id$
56 ********************************************************************************/ 56 ********************************************************************************/
57 57
58 58
59QCopTransferItem::QCopTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) 59QCopTransferItem::QCopTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage)
60 : _usedSourceParameters(usedSourceParameters), _sourceMessage(sourceMessage), _targetChannel(targetChannel), _targetMessage(targetMessage) 60 : _usedSourceParameters(usedSourceParameters), _sourceMessage(sourceMessage), _targetChannel(targetChannel), _targetMessage(targetMessage)
61{ 61{
62 //sourceMessage passes later three parameters: sourceChannel, uid, param1 62 //sourceMessage passes later three parameters: sourceChannel, uid, param1
63 if (_usedSourceParameters == 0) 63 if (_usedSourceParameters == 0)
64 _sourceMessageParameters = "(QString,QString)"; 64 _sourceMessageParameters = "QString,QString)";
65 else if (_usedSourceParameters == 1) 65 else if (_usedSourceParameters == 1)
66 _sourceMessageParameters = "(QString,QString,QString)"; 66 _sourceMessageParameters = "(QString,QString,QString)";
67 else if (_usedSourceParameters == 2) 67 else if (_usedSourceParameters == 2)
68 _sourceMessageParameters = "(QString,QString,QString,QString)"; 68 _sourceMessageParameters = "(QString,QString,QString,QString)";
69 else if (_usedSourceParameters == 3) 69 else if (_usedSourceParameters == 3)
70 _sourceMessageParameters = "(QString,QString,QString,QString,QString)"; 70 _sourceMessageParameters = "(QString,QString,QString,QString,QString)";
71} 71}
72 72
@@ -252,16 +252,20 @@ bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& da
252 return false; 252 return false;
253} 253}
254 254
255 255
256/********************************************************************************* 256/*********************************************************************************
257 * 257 *
258 ********************************************************************************/ 258 ********************************************************************************/
259 259
260QCopListTransferItem::~QCopListTransferItem()
261{
262
263}
260 264
261QCopListTransferItem::QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) 265QCopListTransferItem::QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage)
262 : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage) 266 : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage)
263{ 267{
264 //targetMessage returns later two parameters: uid, and three lists 268 //targetMessage returns later two parameters: uid, and three lists
265 _targetMessageParameters = "(QString,QStringList,QStringList,QStringList,QStringList,QStringList,QStringList)"; 269 _targetMessageParameters = "(QString,QStringList,QStringList,QStringList,QStringList,QStringList,QStringList)";
266} 270}
267 271
@@ -370,17 +374,21 @@ ExternalAppHandler::ExternalAppHandler()
370 mBirthdayListFromKAPITransfer = new QCopListTransferItem(0, "requestBirthdayListFromKAPI", "QPE/Application/kapi", "receiveBirthdayList"); 374 mBirthdayListFromKAPITransfer = new QCopListTransferItem(0, "requestBirthdayListFromKAPI", "QPE/Application/kapi", "receiveBirthdayList");
371 connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForBirthdayList(const QString&, const QString&))); 375 connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForBirthdayList(const QString&, const QString&)));
372 connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); 376 connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)));
373 377
374 378
375} 379}
376 380
377ExternalAppHandler::~ExternalAppHandler() 381ExternalAppHandler::~ExternalAppHandler()
378{ 382{
383 delete mNameEmailUidListFromKAPITransfer;
384 //delete mFindByEmailFromKAPITransfer;
385 delete mDisplayDetails;
386 delete mBirthdayListFromKAPITransfer;
379} 387}
380 388
381void ExternalAppHandler::receivedNameEmailUidList_Slot(const QString& uid, 389void ExternalAppHandler::receivedNameEmailUidList_Slot(const QString& uid,
382 const QStringList& nameList, 390 const QStringList& nameList,
383 const QStringList& emailList, 391 const QStringList& emailList,
384 const QStringList& uidList, 392 const QStringList& uidList,
385 const QStringList&, 393 const QStringList&,
386 const QStringList&, 394 const QStringList&,
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index 4c6f1ea..6f5d345 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -95,17 +95,17 @@ class QCopMapTransferItem : public QCopTransferItem
95 * 95 *
96 ********************************************************************************/ 96 ********************************************************************************/
97 97
98class QCopListTransferItem : public QCopTransferItem 98class QCopListTransferItem : public QCopTransferItem
99{ 99{
100 Q_OBJECT 100 Q_OBJECT
101 public: 101 public:
102 QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); 102 QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage);
103 103 ~QCopListTransferItem();
104 bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6); 104 bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6);
105 105
106 106
107 virtual bool appMessage( const QCString& msg, const QByteArray& data ); 107 virtual bool appMessage( const QCString& msg, const QByteArray& data );
108 108
109 109
110 signals: 110 signals:
111 void receivedMessageFromTarget(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4 , const QStringList& list5, const QStringList& list6); 111 void receivedMessageFromTarget(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4 , const QStringList& list5, const QStringList& list6);
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 3771569..0fdc3e4 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -139,16 +139,17 @@ void KPimGlobalPrefs::setGlobalConfig()
139 QString wt; 139 QString wt;
140 int br = 0; 140 int br = 0;
141 int nbr; 141 int nbr;
142 nbr = text.find ( "},", br ); 142 nbr = text.find ( "},", br );
143 line = text.mid( br, nbr - br ); 143 line = text.mid( br, nbr - br );
144 br = nbr+1; 144 br = nbr+1;
145 int se, ee, st, et; 145 int se, ee, st, et;
146 mLocaleDict = new QDict<QString>; 146 mLocaleDict = new QDict<QString>;
147 mLocaleDict->setAutoDelete( true );
147 QString end = "{ \"\",\"\" }"; 148 QString end = "{ \"\",\"\" }";
148 while ( (line != end) && (br > 1) ) { 149 while ( (line != end) && (br > 1) ) {
149 //qDebug("%d *%s* ", br, line.latin1()); 150 //qDebug("%d *%s* ", br, line.latin1());
150 se = line.find("\"")+1; 151 se = line.find("\"")+1;
151 et = line.findRev("\"",-1); 152 et = line.findRev("\"",-1);
152 ee = line.find("\",\""); 153 ee = line.find("\",\"");
153 st = ee+3; 154 st = ee+3;
154 we = line.mid( se, ee-se ); 155 we = line.mid( se, ee-se );
@@ -183,18 +184,16 @@ void KPimGlobalPrefs::setGlobalConfig()
183 184
184} 185}
185KPimGlobalPrefs::~KPimGlobalPrefs() 186KPimGlobalPrefs::~KPimGlobalPrefs()
186{ 187{
187 if (sInstance == this) 188 if (sInstance == this)
188 sInstance = staticDeleterGP.setObject(0); 189 sInstance = staticDeleterGP.setObject(0);
189 else 190 else
190 qDebug("Whats this? Error in KPimGlobalPrefs::~KPimGlobalPrefs() ?"); 191 qDebug("Whats this? Error in KPimGlobalPrefs::~KPimGlobalPrefs() ?");
191 //qDebug("KPimGlobalPrefs::~KPimGlobalPrefs() ");
192 writeConfig();
193 if ( mLocaleDict ) 192 if ( mLocaleDict )
194 delete mLocaleDict; 193 delete mLocaleDict;
195} 194}
196 195
197KPimGlobalPrefs *KPimGlobalPrefs::instance() 196KPimGlobalPrefs *KPimGlobalPrefs::instance()
198{ 197{
199 if ( !sInstance ) { 198 if ( !sInstance ) {
200 sInstance = staticDeleterGP.setObject( new KPimGlobalPrefs() ); 199 sInstance = staticDeleterGP.setObject( new KPimGlobalPrefs() );