summaryrefslogtreecommitdiff
path: root/core
authorharlekin <harlekin>2002-11-21 16:25:44 (UTC)
committer harlekin <harlekin>2002-11-21 16:25:44 (UTC)
commit7edc36774d1deec4806ee9273e25a059f9ac1f9e (patch) (unidiff)
treeb672261ed87ae17b33e4ed47a70d4a82fccb8406 /core
parent10cd03eb7108ef66614790ba2b5482a9bc9a87fd (diff)
downloadopie-7edc36774d1deec4806ee9273e25a059f9ac1f9e.zip
opie-7edc36774d1deec4806ee9273e25a059f9ac1f9e.tar.gz
opie-7edc36774d1deec4806ee9273e25a059f9ac1f9e.tar.bz2
using now QInterfacePtr as Simon suggested, and another leak fix in datebook plugin
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginimpl.cpp1
-rw-r--r--core/pim/today/today.cpp10
2 files changed, 6 insertions, 5 deletions
diff --git a/core/pim/today/plugins/datebook/datebookpluginimpl.cpp b/core/pim/today/plugins/datebook/datebookpluginimpl.cpp
index 4159b49..45736bb 100644
--- a/core/pim/today/plugins/datebook/datebookpluginimpl.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginimpl.cpp
@@ -22,6 +22,7 @@ DatebookPluginImpl::DatebookPluginImpl() {
22} 22}
23 23
24DatebookPluginImpl::~DatebookPluginImpl() { 24DatebookPluginImpl::~DatebookPluginImpl() {
25 delete datebookPlugin;
25} 26}
26 27
27TodayPluginObject* DatebookPluginImpl::guiPart() { 28TodayPluginObject* DatebookPluginImpl::guiPart() {
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 01ef02d..1b31cfd 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -39,8 +39,9 @@
39 39
40 40
41struct TodayPlugin { 41struct TodayPlugin {
42 TodayPlugin() : library( 0 ), iface( 0 ), guiPart( 0 ), guiBox( 0 ) {}
42 QLibrary *library; 43 QLibrary *library;
43 TodayPluginInterface *iface; 44 QInterfacePtr<TodayPluginInterface> iface;
44 TodayPluginObject *guiPart; 45 TodayPluginObject *guiPart;
45 QWidget *guiBox; 46 QWidget *guiBox;
46 QString name; 47 QString name;
@@ -161,7 +162,6 @@ void Today::loadPlugins() {
161 pluginList.clear(); 162 pluginList.clear();
162 } 163 }
163 164
164
165 QString path = QPEApplication::qpeDir() + "/plugins/today"; 165 QString path = QPEApplication::qpeDir() + "/plugins/today";
166 QDir dir( path, "lib*.so" ); 166 QDir dir( path, "lib*.so" );
167 167
@@ -171,7 +171,8 @@ void Today::loadPlugins() {
171 QMap<QString, TodayPlugin> tempList; 171 QMap<QString, TodayPlugin> tempList;
172 172
173 for ( it = list.begin(); it != list.end(); ++it ) { 173 for ( it = list.begin(); it != list.end(); ++it ) {
174 TodayPluginInterface *iface = 0; 174 //TodayPluginInterface *iface = 0;
175 QInterfacePtr<TodayPluginInterface> iface;
175 QLibrary *lib = new QLibrary( path + "/" + *it ); 176 QLibrary *lib = new QLibrary( path + "/" + *it );
176 177
177 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); 178 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() );
@@ -182,7 +183,6 @@ void Today::loadPlugins() {
182 // If plugin is exludes from refresh, get it in the list again here. 183 // If plugin is exludes from refresh, get it in the list again here.
183 184
184 if ( pluginListRefreshExclude.contains( (*it) ) ) { 185 if ( pluginListRefreshExclude.contains( (*it) ) ) {
185
186 // if its not in allApplets list, add it to a layout 186 // if its not in allApplets list, add it to a layout
187 if ( !m_allApplets.contains( pluginListRefreshExclude[(*it)].name ) ) { 187 if ( !m_allApplets.contains( pluginListRefreshExclude[(*it)].name ) ) {
188 qDebug( "NUGASDA" ); 188 qDebug( "NUGASDA" );
@@ -243,7 +243,7 @@ void Today::loadPlugins() {
243 } 243 }
244 244
245 // if plugin is not yet in the list, add it to the layout too 245 // if plugin is not yet in the list, add it to the layout too
246 if ( !m_allApplets.contains( plugin.name ) ) { 246 else if ( !m_allApplets.contains( plugin.name ) ) {
247 layout->addWidget( plugin.guiBox ); 247 layout->addWidget( plugin.guiBox );
248 pluginList.append( plugin ); 248 pluginList.append( plugin );
249 } 249 }