summaryrefslogtreecommitdiff
path: root/core
Unidiff
Diffstat (limited to 'core') (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
@@ -109,30 +109,31 @@ void Today::init() {
109 // read config 109 // read config
110 Config cfg( "today" ); 110 Config cfg( "today" );
111 111
112 cfg.setGroup( "Applets" ); 112 cfg.setGroup( "Applets" );
113 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); 113 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' );
114} 114}
115 115
116 116
117/** 117/**
118 * Load the plugins 118 * Load the plugins
119 */ 119 */
120void Today::loadPlugins() { 120void Today::loadPlugins() {
121 121 qWarning("pluginList count %d", pluginList.count() );
122 QValueList<TodayPlugin>::Iterator tit; 122 QValueList<TodayPlugin>::Iterator tit;
123 for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { 123 for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) {
124 (*tit).library->unload(); 124 (*tit).library->unload();
125 delete (*tit).library; 125 delete (*tit).library;
126 } 126 }
127 pluginList.clear();
127 128
128 QString path = QPEApplication::qpeDir() + "/plugins/today"; 129 QString path = QPEApplication::qpeDir() + "/plugins/today";
129 QDir dir( path, "lib*.so" ); 130 QDir dir( path, "lib*.so" );
130 131
131 QStringList list = dir.entryList(); 132 QStringList list = dir.entryList();
132 QStringList::Iterator it; 133 QStringList::Iterator it;
133 134
134 uint count = 0; 135 uint count = 0;
135 for ( it = list.begin(); it != list.end(); ++it ) { 136 for ( it = list.begin(); it != list.end(); ++it ) {
136 TodayPluginInterface *iface = 0; 137 TodayPluginInterface *iface = 0;
137 QLibrary *lib = new QLibrary( path + "/" + *it ); 138 QLibrary *lib = new QLibrary( path + "/" + *it );
138 139
@@ -149,24 +150,25 @@ void Today::loadPlugins() {
149 plugin.active = true; 150 plugin.active = true;
150 } else { 151 } else {
151 plugin.active = false; 152 plugin.active = false;
152 } 153 }
153 plugin.guiPart = plugin.iface->guiPart(); 154 plugin.guiPart = plugin.iface->guiPart();
154 pluginList.append( plugin ); 155 pluginList.append( plugin );
155 count++; 156 count++;
156 } else { 157 } else {
157 qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() ); 158 qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() );
158 delete lib; 159 delete lib;
159 } 160 }
160 } 161 }
162 qWarning("pluginList count end %d", pluginList.count() );
161} 163}
162 164
163 165
164/** 166/**
165 * Repaint method. Reread all fields. 167 * Repaint method. Reread all fields.
166 */ 168 */
167void Today::draw() { 169void Today::draw() {
168 170
169 if ( pluginLayout ) { 171 if ( pluginLayout ) {
170 delete pluginLayout; 172 delete pluginLayout;
171 } 173 }
172 pluginLayout = new QVBoxLayout( layout ); 174 pluginLayout = new QVBoxLayout( layout );