summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2004-10-23 14:56:10 (UTC)
committer zautrix <zautrix>2004-10-23 14:56:10 (UTC)
commita682b1d39c63cff8d709c67460569c70b661d889 (patch) (unidiff)
treedd5cb4052b07927b63bafa68b2fd6d40bce6a6dc /korganizer
parent73c0cb5307a8276f628765c651ef0284b85d64de (diff)
downloadkdepimpi-a682b1d39c63cff8d709c67460569c70b661d889.zip
kdepimpi-a682b1d39c63cff8d709c67460569c70b661d889.tar.gz
kdepimpi-a682b1d39c63cff8d709c67460569c70b661d889.tar.bz2
fixed several memory leaks
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kolistview.cpp1
-rw-r--r--korganizer/koprefs.cpp10
-rw-r--r--korganizer/main.cpp3
3 files changed, 4 insertions, 10 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index d3aa650..3d4acb7 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -997,24 +997,25 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
997 } 997 }
998 break; 998 break;
999 default: 999 default:
1000 e->ignore(); 1000 e->ignore();
1001 } 1001 }
1002} 1002}
1003KOListViewListView::KOListViewListView(KOListView * lv ) 1003KOListViewListView::KOListViewListView(KOListView * lv )
1004 : KListView( lv ) 1004 : KListView( lv )
1005{ 1005{
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;
1012 mMouseDown = false; 1013 mMouseDown = false;
1013 1014
1014} 1015}
1015void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) 1016void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
1016{ 1017{
1017 if (!e) return; 1018 if (!e) return;
1018 QPoint vp = contentsToViewport(e->pos()); 1019 QPoint vp = contentsToViewport(e->pos());
1019 QListViewItem *item = itemAt(vp); 1020 QListViewItem *item = itemAt(vp);
1020 if (!item) { 1021 if (!item) {
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index f44debc..8dca3ae 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -158,35 +158,25 @@ KOPrefs::KOPrefs() :
158 addItemFont("MonthView Font",&mMonthViewFont); 158 addItemFont("MonthView Font",&mMonthViewFont);
159 addItemFont("AgendaView Font",&mAgendaViewFont); 159 addItemFont("AgendaView Font",&mAgendaViewFont);
160 addItemFont("MarcusBains Font",&mMarcusBainsFont); 160 addItemFont("MarcusBains Font",&mMarcusBainsFont);
161 addItemFont("TimeLabels Font",&mTimeLabelsFont); 161 addItemFont("TimeLabels Font",&mTimeLabelsFont);
162 addItemFont("TodoView Font",&mTodoViewFont); 162 addItemFont("TodoView Font",&mTodoViewFont);
163 addItemFont("ListView Font",&mListViewFont); 163 addItemFont("ListView Font",&mListViewFont);
164 addItemFont("DateNavigator Font",&mDateNavigatorFont); 164 addItemFont("DateNavigator Font",&mDateNavigatorFont);
165 addItemFont("EditBox Font",&mEditBoxFont); 165 addItemFont("EditBox Font",&mEditBoxFont);
166 addItemFont("JournalView Font",&mJornalViewFont); 166 addItemFont("JournalView Font",&mJornalViewFont);
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);
184 addItemInt("LastSyncTime",&mLastSyncTime,0); 174 addItemInt("LastSyncTime",&mLastSyncTime,0);
185 175
186#ifdef _WIN32_ 176#ifdef _WIN32_
187 QString hdp= locateLocal("data","korganizer")+"\\\\"; 177 QString hdp= locateLocal("data","korganizer")+"\\\\";
188#else 178#else
189 QString hdp= locateLocal("data","korganizer")+"/"; 179 QString hdp= locateLocal("data","korganizer")+"/";
190#endif 180#endif
191 181
192 KPrefs::setCurrentGroup("LoadSaveFileNames"); 182 KPrefs::setCurrentGroup("LoadSaveFileNames");
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 4194d12..2481ca4 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -10,24 +10,25 @@
10#include <qstring.h> 10#include <qstring.h>
11#include <qwindowsstyle.h> 11#include <qwindowsstyle.h>
12#include <qplatinumstyle.h> 12#include <qplatinumstyle.h>
13#include <qsgistyle.h> 13#include <qsgistyle.h>
14#endif 14#endif
15#include <qtextcodec.h> 15#include <qtextcodec.h>
16 16
17#include <qdir.h> 17#include <qdir.h>
18#include <kstandarddirs.h> 18#include <kstandarddirs.h>
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{
25#ifndef DESKTOP_VERSION 26#ifndef DESKTOP_VERSION
26 QPEApplication a( argc, argv ); 27 QPEApplication a( argc, argv );
27 a.setKeepRunning (); 28 a.setKeepRunning ();
28#else 29#else
29 QApplication a( argc, argv ); 30 QApplication a( argc, argv );
30 QApplication::setStyle( new QPlatinumStyle ()); 31 QApplication::setStyle( new QPlatinumStyle ());
31 QString hdir = QDir::homeDirPath(); 32 QString hdir = QDir::homeDirPath();
32 // there is a bug when creating dirs for WIN 98 33 // there is a bug when creating dirs for WIN 98
33 // it is difficult to fix, because we have no WIN 98 runnung 34 // it is difficult to fix, because we have no WIN 98 runnung
@@ -92,15 +93,17 @@ int main( int argc, char **argv )
92#endif 93#endif
93 if ( argc > 1 ) { 94 if ( argc > 1 ) {
94 QCString command = argv[1]; 95 QCString command = argv[1];
95 if ( argc > 2 ) 96 if ( argc > 2 )
96 command += argv[2]; 97 command += argv[2];
97 qApp->processEvents(); 98 qApp->processEvents();
98 m.recieve(command, QByteArray() ); 99 m.recieve(command, QByteArray() );
99 100
100 } 101 }
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}