summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 09540bd..7decf8e 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -105,38 +105,39 @@ void Today::init() {
QString time = ( tr( date.toString() ) );
DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) );
// read config
Config cfg( "today" );
cfg.setGroup( "Applets" );
m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' );
}
/**
* Load the plugins
*/
void Today::loadPlugins() {
-
+ qWarning("pluginList count %d", pluginList.count() );
QValueList<TodayPlugin>::Iterator tit;
for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) {
(*tit).library->unload();
delete (*tit).library;
}
+ pluginList.clear();
QString path = QPEApplication::qpeDir() + "/plugins/today";
QDir dir( path, "lib*.so" );
QStringList list = dir.entryList();
QStringList::Iterator it;
uint count = 0;
for ( it = list.begin(); it != list.end(); ++it ) {
TodayPluginInterface *iface = 0;
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( QString(*it).latin1() );
@@ -145,32 +146,33 @@ void Today::loadPlugins() {
plugin.iface = iface;
plugin.name = QString(*it).latin1();
if ( m_excludeApplets.grep( *it ).isEmpty() ) {
plugin.active = true;
} else {
plugin.active = false;
}
plugin.guiPart = plugin.iface->guiPart();
pluginList.append( plugin );
count++;
} else {
qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() );
delete lib;
}
}
+ qWarning("pluginList count end %d", pluginList.count() );
}
/**
* Repaint method. Reread all fields.
*/
void Today::draw() {
if ( pluginLayout ) {
delete pluginLayout;
}
pluginLayout = new QVBoxLayout( layout );
if ( pluginList.count() == 0 ) {
QLabel *noPlugins = new QLabel( this );
noPlugins->setText( tr( "No plugins found" ) );