summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-23 14:56:10 (UTC)
committer zautrix <zautrix>2004-10-23 14:56:10 (UTC)
commita682b1d39c63cff8d709c67460569c70b661d889 (patch) (unidiff)
treedd5cb4052b07927b63bafa68b2fd6d40bce6a6dc
parent73c0cb5307a8276f628765c651ef0284b85d64de (diff)
downloadkdepimpi-a682b1d39c63cff8d709c67460569c70b661d889.zip
kdepimpi-a682b1d39c63cff8d709c67460569c70b661d889.tar.gz
kdepimpi-a682b1d39c63cff8d709c67460569c70b661d889.tar.bz2
fixed several memory leaks
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/mainembedded.cpp5
-rw-r--r--kmicromail/main.cpp3
-rw-r--r--korganizer/kolistview.cpp1
-rw-r--r--korganizer/koprefs.cpp10
-rw-r--r--korganizer/main.cpp3
-rw-r--r--libkdepim/externalapphandler.cpp10
-rw-r--r--libkdepim/externalapphandler.h2
-rw-r--r--libkdepim/kpimglobalprefs.cpp3
-rw-r--r--microkde/kdeui/klistview.cpp5
-rw-r--r--pwmanager/pwmanager/main.cpp2
-rw-r--r--pwmanager/pwmanager/pwm.cpp2
11 files changed, 26 insertions, 20 deletions
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index a8816f9..547d208 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -78,9 +78,9 @@ int main( int argc, char **argv )
78//US MainWindow m; 78//US MainWindow m;
79 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 79 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
80 80
81 { 81
82 KPimGlobalPrefs::instance()->setGlobalConfig(); 82 KPimGlobalPrefs::instance()->setGlobalConfig();
83 } 83
84#ifndef DESKTOP_VERSION 84#ifndef DESKTOP_VERSION
85 a.showMainWidget( &m ); 85 a.showMainWidget( &m );
86 86
@@ -93,6 +93,7 @@ int main( int argc, char **argv )
93 93
94 dumpMissing(); 94 dumpMissing();
95 95
96 KPimGlobalPrefs::instance()->writeConfig();
96 } 97 }
97 qDebug("KA: Bye! "); 98 qDebug("KA: Bye! ");
98} 99}
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp
index 8947ff8..8341c5a 100644
--- a/kmicromail/main.cpp
+++ b/kmicromail/main.cpp
@@ -19,6 +19,7 @@
19#include <stdio.h> 19#include <stdio.h>
20#include "mainwindow.h" 20#include "mainwindow.h"
21#include "koprefs.h" 21#include "koprefs.h"
22#include <libkdepim/kpimglobalprefs.h>
22void dumpMissing(); 23void dumpMissing();
23//using namespace Opie::Core; 24//using namespace Opie::Core;
24int main( int argc, char **argv ) { 25int main( int argc, char **argv ) {
@@ -58,6 +59,8 @@ int main( int argc, char **argv ) {
58#endif 59#endif
59 int rv = a.exec(); 60 int rv = a.exec();
60 dumpMissing(); 61 dumpMissing();
62
63 KPimGlobalPrefs::instance()->writeConfig();
61 return rv; 64 return rv;
62 65
63} 66}
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index d3aa650..3d4acb7 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -1006,6 +1006,7 @@ KOListViewListView::KOListViewListView(KOListView * lv )
1006#ifndef DESKTOP_VERSION 1006#ifndef DESKTOP_VERSION
1007 QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); 1007 QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold );
1008#endif 1008#endif
1009 mYMousePos = -1000;
1009 setSelectionMode( QListView::Multi ); 1010 setSelectionMode( QListView::Multi );
1010 setMultiSelection( true); 1011 setMultiSelection( true);
1011 mAllowPopupMenu = true; 1012 mAllowPopupMenu = true;
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index f44debc..8dca3ae 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -167,17 +167,7 @@ KOPrefs::KOPrefs() :
167 addItemFont("WhatsNextView Font",&mWhatsNextFont); 167 addItemFont("WhatsNextView Font",&mWhatsNextFont);
168 addItemFont("EventView Font",&mEventViewFont); 168 addItemFont("EventView Font",&mEventViewFont);
169 169
170// KPrefs::setCurrentGroup("SyncProfiles");
171// addItemString("LocalMachineName",&mLocalMachineName, "undefined");
172// addItemStringList("SyncProfileNames",&mSyncProfileNames);
173// addItemStringList("ExternSyncProfiles",&mExternSyncProfileNames);
174
175 KPrefs::setCurrentGroup("RemoteSyncing"); 170 KPrefs::setCurrentGroup("RemoteSyncing");
176// addItemBool("UsePasswd",&mUsePassWd,false);
177// addItemBool("WriteBackFile",&mWriteBackFile,true);
178// addItemBool("WriteBackExistingOnly",&mWriteBackExistingOnly,false);
179// addItemBool("AskForPreferences",&mAskForPreferences,true);
180// addItemBool("ShowSyncSummary",&mShowSyncSummary,true);
181 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); 171 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" );
182 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); 172 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" );
183 addItemBool("ShowSyncEvents",&mShowSyncEvents,false); 173 addItemBool("ShowSyncEvents",&mShowSyncEvents,false);
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 4194d12..2481ca4 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -19,6 +19,7 @@
19#include <kglobal.h> 19#include <kglobal.h>
20#include <stdio.h> 20#include <stdio.h>
21#include "mainwindow.h" 21#include "mainwindow.h"
22#include <libkdepim/kpimglobalprefs.h>
22void dumpMissing(); 23void dumpMissing();
23int main( int argc, char **argv ) 24int main( int argc, char **argv )
24{ 25{
@@ -101,6 +102,8 @@ int main( int argc, char **argv )
101 102
102 a.exec(); 103 a.exec();
103 dumpMissing(); 104 dumpMissing();
105
106 KPimGlobalPrefs::instance()->writeConfig();
104 } 107 }
105 qDebug("KO: Bye! "); 108 qDebug("KO: Bye! ");
106} 109}
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index 779b20e..9085673 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -61,7 +61,7 @@ QCopTransferItem::QCopTransferItem(int usedSourceParameters, const QString& sour
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)
@@ -257,6 +257,10 @@ bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& da
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)
@@ -376,6 +380,10 @@ ExternalAppHandler::ExternalAppHandler()
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,
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index 4c6f1ea..6f5d345 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -100,7 +100,7 @@ class QCopListTransferItem : public QCopTransferItem
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
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 3771569..0fdc3e4 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -144,6 +144,7 @@ void KPimGlobalPrefs::setGlobalConfig()
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());
@@ -188,8 +189,6 @@ KPimGlobalPrefs::~KPimGlobalPrefs()
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}
diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp
index 5b50ba9..3c809b4 100644
--- a/microkde/kdeui/klistview.cpp
+++ b/microkde/kdeui/klistview.cpp
@@ -94,7 +94,6 @@ public:
94 itemsMovable (true), 94 itemsMovable (true),
95 selectedBySimpleMove(false), 95 selectedBySimpleMove(false),
96 selectedUsingMouse(false), 96 selectedUsingMouse(false),
97 showContextMenusOnPress(true),
98 itemsRenameable (false), 97 itemsRenameable (false),
99 validDrag (false), 98 validDrag (false),
100 dragEnabled (false), 99 dragEnabled (false),
@@ -111,8 +110,8 @@ public:
111 selectionDirection(0), 110 selectionDirection(0),
112 tooltipColumn (0), 111 tooltipColumn (0),
113 selectionMode (Single), 112 selectionMode (Single),
114//US contextMenuKey (KGlobalSettings::contextMenuKey()), 113 contextMenuKey ( Qt::Key_Menu ),//KGlobalSettings::contextMenuKey()),
115//US showContextMenusOnPress (KGlobalSettings::showContextMenusOnPress()), 114 showContextMenusOnPress (true),//showContextMenusOnPress (KGlobalSettings::showContextMenusOnPress()),
116 mDropVisualizerWidth (4) 115 mDropVisualizerWidth (4)
117 { 116 {
118 renameable += 0; 117 renameable += 0;
diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp
index 3f2d055..81e257f 100644
--- a/pwmanager/pwmanager/main.cpp
+++ b/pwmanager/pwmanager/main.cpp
@@ -204,7 +204,7 @@ int main(int argc, char *argv[])
204#endif 204#endif
205 */ 205 */
206 a.exec(); 206 a.exec();
207 207 KPimGlobalPrefs::instance()->writeConfig();
208 } 208 }
209 qDebug("PWMPI: Bye! "); 209 qDebug("PWMPI: Bye! ");
210 210
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index b7b5307..d92c90d 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -172,6 +172,7 @@ PwM::PwM(PwMInit *_init, PwMDoc *doc,
172 , forceQuit (false) 172 , forceQuit (false)
173 , forceMinimizeToTray (false) 173 , forceMinimizeToTray (false)
174{ 174{
175 syncManager = 0;
175 virgin = !virginity; 176 virgin = !virginity;
176 init = _init; 177 init = _init;
177 connect(doc, SIGNAL(docClosed(PwMDoc *)), 178 connect(doc, SIGNAL(docClosed(PwMDoc *)),
@@ -199,6 +200,7 @@ PwM::~PwM()
199 emit closed(this); 200 emit closed(this);
200 //qDebug("PwM::~PwM() emited closed(this)"); 201 //qDebug("PwM::~PwM() emited closed(this)");
201 delete view; 202 delete view;
203 delete syncManager;
202} 204}
203 205
204void PwM::initMenubar() 206void PwM::initMenubar()