author | harlekin <harlekin> | 2003-01-31 17:29:47 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-01-31 17:29:47 (UTC) |
commit | 22e4e7263314b0ebcafedc2b1d67ecae69a5d10f (patch) (unidiff) | |
tree | 0538e1c7d4458348b2187d82e9fae73d780ca804 | |
parent | 0d5ec3a2162111161fed2022851ebfbc4d6d0333 (diff) | |
download | opie-22e4e7263314b0ebcafedc2b1d67ecae69a5d10f.zip opie-22e4e7263314b0ebcafedc2b1d67ecae69a5d10f.tar.gz opie-22e4e7263314b0ebcafedc2b1d67ecae69a5d10f.tar.bz2 |
leaks less now, still one more leak to go
-rw-r--r-- | core/pim/today/changelog | 5 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/core/pim/today/changelog b/core/pim/today/changelog index ba3cdbc..ea618c8 100644 --- a/core/pim/today/changelog +++ b/core/pim/today/changelog | |||
@@ -1,24 +1,29 @@ | |||
1 | 0.6.1 | ||
2 | |||
3 | * datebook plugin now can now also show following days | ||
4 | * fixed one mem leak | ||
5 | |||
1 | 0.6 | 6 | 0.6 |
2 | 7 | ||
3 | * longer refresh intervals possible | 8 | * longer refresh intervals possible |
4 | * plugins can decide now if they want to take part in refresh cycles | 9 | * plugins can decide now if they want to take part in refresh cycles |
5 | 10 | ||
6 | 0.5.2 | 11 | 0.5.2 |
7 | 12 | ||
8 | * refresh settings | 13 | * refresh settings |
9 | * only launch datebook config when clicked on a date ( opie only ) | 14 | * only launch datebook config when clicked on a date ( opie only ) |
10 | * less qcop trouble on sharps retail rom | 15 | * less qcop trouble on sharps retail rom |
11 | 16 | ||
12 | 0.5.1 | 17 | 0.5.1 |
13 | 18 | ||
14 | * icons scalable and clickable again | 19 | * icons scalable and clickable again |
15 | 20 | ||
16 | 0.5 | 21 | 0.5 |
17 | 22 | ||
18 | * now fully plugin based | 23 | * now fully plugin based |
19 | 24 | ||
20 | 0.3.4 | 25 | 0.3.4 |
21 | 26 | ||
22 | * "fill our business card now a clickable label" | 27 | * "fill our business card now a clickable label" |
23 | * Several bugfixes regarding todo section. | 28 | * Several bugfixes regarding todo section. |
24 | 29 | ||
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 76bd6de..91028c8 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -131,73 +131,76 @@ void Today::init() { | |||
131 | 131 | ||
132 | cfg.setGroup( "Plugins" ); | 132 | cfg.setGroup( "Plugins" ); |
133 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); | 133 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); |
134 | m_allApplets = cfg.readListEntry( "AllApplets", ',' ); | 134 | m_allApplets = cfg.readListEntry( "AllApplets", ',' ); |
135 | 135 | ||
136 | cfg.setGroup( "General" ); | 136 | cfg.setGroup( "General" ); |
137 | m_iconSize = cfg.readNumEntry( "IconSize", 18 ); | 137 | m_iconSize = cfg.readNumEntry( "IconSize", 18 ); |
138 | setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) ); | 138 | setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) ); |
139 | } | 139 | } |
140 | 140 | ||
141 | 141 | ||
142 | /** | 142 | /** |
143 | * Load the plugins | 143 | * Load the plugins |
144 | */ | 144 | */ |
145 | void Today::loadPlugins() { | 145 | void Today::loadPlugins() { |
146 | 146 | ||
147 | // extra list for plugins that exclude themself from periodic refresh | 147 | // extra list for plugins that exclude themself from periodic refresh |
148 | QMap<QString, TodayPlugin> pluginListRefreshExclude; | 148 | QMap<QString, TodayPlugin> pluginListRefreshExclude; |
149 | 149 | ||
150 | QValueList<TodayPlugin>::Iterator tit; | 150 | QValueList<TodayPlugin>::Iterator tit; |
151 | if ( !pluginList.isEmpty() ) { | 151 | if ( !pluginList.isEmpty() ) { |
152 | for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { | 152 | for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { |
153 | if ( (*tit).excludeRefresh ) { | 153 | if ( (*tit).excludeRefresh ) { |
154 | pluginListRefreshExclude.insert( (*tit).name , (*tit) ); | 154 | pluginListRefreshExclude.insert( (*tit).name , (*tit) ); |
155 | qDebug( "Found an plugin that does not want refresh feature" ); | 155 | qDebug( "Found a plugin that does not want refresh feature" ); |
156 | } else { | 156 | } else { |
157 | (*tit).guiBox->hide(); | ||
158 | (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) ); | ||
157 | (*tit).library->unload(); | 159 | (*tit).library->unload(); |
160 | delete (*tit).guiBox; | ||
158 | delete (*tit).library; | 161 | delete (*tit).library; |
159 | } | 162 | } |
160 | } | 163 | } |
161 | pluginList.clear(); | 164 | pluginList.clear(); |
162 | } | 165 | } |
163 | 166 | ||
164 | QString path = QPEApplication::qpeDir() + "/plugins/today"; | 167 | QString path = QPEApplication::qpeDir() + "/plugins/today"; |
165 | QDir dir( path, "lib*.so" ); | 168 | QDir dir( path, "lib*.so" ); |
166 | 169 | ||
167 | QStringList list = dir.entryList(); | 170 | QStringList list = dir.entryList(); |
168 | QStringList::Iterator it; | 171 | QStringList::Iterator it; |
169 | 172 | ||
170 | QMap<QString, TodayPlugin> tempList; | 173 | QMap<QString, TodayPlugin> tempList; |
171 | 174 | ||
172 | for ( it = list.begin(); it != list.end(); ++it ) { | 175 | for ( it = list.begin(); it != list.end(); ++it ) { |
173 | //TodayPluginInterface *iface = 0; | 176 | //TodayPluginInterface *iface = 0; |
174 | QInterfacePtr<TodayPluginInterface> iface; | 177 | QInterfacePtr<TodayPluginInterface> iface; |
175 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 178 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
176 | 179 | ||
177 | qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); | 180 | qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); |
178 | if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { | 181 | if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { |
179 | qDebug( "loading: %s", QString( path + "/" + *it ).latin1() ); | 182 | qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() ); |
180 | qDebug( QString(*it) ); | 183 | qDebug( QString(*it) ); |
181 | 184 | ||
182 | // If plugin is exludes from refresh, get it in the list again here. | 185 | // If plugin is exludes from refresh, get it in the list again here. |
183 | 186 | ||
184 | if ( pluginListRefreshExclude.contains( (*it) ) ) { | 187 | if ( pluginListRefreshExclude.contains( (*it) ) ) { |
185 | // if its not in allApplets list, add it to a layout | 188 | // if its not in allApplets list, add it to a layout |
186 | if ( !m_allApplets.contains( pluginListRefreshExclude[(*it)].name ) ) { | 189 | if ( !m_allApplets.contains( pluginListRefreshExclude[(*it)].name ) ) { |
187 | layout->addWidget( pluginListRefreshExclude[(*it)].guiBox ); | 190 | layout->addWidget( pluginListRefreshExclude[(*it)].guiBox ); |
188 | pluginList.append( pluginListRefreshExclude[(*it)] ); | 191 | pluginList.append( pluginListRefreshExclude[(*it)] ); |
189 | } else { | 192 | } else { |
190 | tempList.insert( pluginListRefreshExclude[(*it)].name, pluginListRefreshExclude[(*it)] ); | 193 | tempList.insert( pluginListRefreshExclude[(*it)].name, pluginListRefreshExclude[(*it)] ); |
191 | } | 194 | } |
192 | } else { | 195 | } else { |
193 | 196 | ||
194 | TodayPlugin plugin; | 197 | TodayPlugin plugin; |
195 | plugin.library = lib; | 198 | plugin.library = lib; |
196 | plugin.iface = iface; | 199 | plugin.iface = iface; |
197 | plugin.name = QString(*it); | 200 | plugin.name = QString(*it); |
198 | 201 | ||
199 | // find out if plugins should be shown | 202 | // find out if plugins should be shown |
200 | if ( m_excludeApplets.grep( *it ).isEmpty() ) { | 203 | if ( m_excludeApplets.grep( *it ).isEmpty() ) { |
201 | plugin.active = true; | 204 | plugin.active = true; |
202 | } else { | 205 | } else { |
203 | plugin.active = false; | 206 | plugin.active = false; |