summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-01-31 17:29:47 (UTC)
committer harlekin <harlekin>2003-01-31 17:29:47 (UTC)
commit22e4e7263314b0ebcafedc2b1d67ecae69a5d10f (patch) (side-by-side diff)
tree0538e1c7d4458348b2187d82e9fae73d780ca804
parent0d5ec3a2162111161fed2022851ebfbc4d6d0333 (diff)
downloadopie-22e4e7263314b0ebcafedc2b1d67ecae69a5d10f.zip
opie-22e4e7263314b0ebcafedc2b1d67ecae69a5d10f.tar.gz
opie-22e4e7263314b0ebcafedc2b1d67ecae69a5d10f.tar.bz2
leaks less now, still one more leak to go
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/changelog5
-rw-r--r--core/pim/today/today.cpp7
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 @@
+0.6.1
+
+* datebook plugin now can now also show following days
+* fixed one mem leak
+
0.6
* longer refresh intervals possible
* plugins can decide now if they want to take part in refresh cycles
0.5.2
* refresh settings
* only launch datebook config when clicked on a date ( opie only )
* less qcop trouble on sharps retail rom
0.5.1
* icons scalable and clickable again
0.5
* now fully plugin based
0.3.4
* "fill our business card now a clickable label"
* Several bugfixes regarding todo section.
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() {
cfg.setGroup( "Plugins" );
m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' );
m_allApplets = cfg.readListEntry( "AllApplets", ',' );
cfg.setGroup( "General" );
m_iconSize = cfg.readNumEntry( "IconSize", 18 );
setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) );
}
/**
* Load the plugins
*/
void Today::loadPlugins() {
// extra list for plugins that exclude themself from periodic refresh
QMap<QString, TodayPlugin> pluginListRefreshExclude;
QValueList<TodayPlugin>::Iterator tit;
if ( !pluginList.isEmpty() ) {
for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) {
if ( (*tit).excludeRefresh ) {
pluginListRefreshExclude.insert( (*tit).name , (*tit) );
- qDebug( "Found an plugin that does not want refresh feature" );
+ qDebug( "Found a plugin that does not want refresh feature" );
} else {
+ (*tit).guiBox->hide();
+ (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) );
(*tit).library->unload();
+ delete (*tit).guiBox;
delete (*tit).library;
}
}
pluginList.clear();
}
QString path = QPEApplication::qpeDir() + "/plugins/today";
QDir dir( path, "lib*.so" );
QStringList list = dir.entryList();
QStringList::Iterator it;
QMap<QString, TodayPlugin> tempList;
for ( it = list.begin(); it != list.end(); ++it ) {
// TodayPluginInterface *iface = 0;
QInterfacePtr<TodayPluginInterface> iface;
QLibrary *lib = new QLibrary( path + "/" + *it );
qDebug( "querying: %s", QString( path + "/" + *it ).latin1() );
if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
- qDebug( "loading: %s", QString( path + "/" + *it ).latin1() );
+ qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() );
qDebug( QString(*it) );
// If plugin is exludes from refresh, get it in the list again here.
if ( pluginListRefreshExclude.contains( (*it) ) ) {
// if its not in allApplets list, add it to a layout
if ( !m_allApplets.contains( pluginListRefreshExclude[(*it)].name ) ) {
layout->addWidget( pluginListRefreshExclude[(*it)].guiBox );
pluginList.append( pluginListRefreshExclude[(*it)] );
} else {
tempList.insert( pluginListRefreshExclude[(*it)].name, pluginListRefreshExclude[(*it)] );
}
} else {
TodayPlugin plugin;
plugin.library = lib;
plugin.iface = iface;
plugin.name = QString(*it);
// find out if plugins should be shown
if ( m_excludeApplets.grep( *it ).isEmpty() ) {
plugin.active = true;
} else {
plugin.active = false;