summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 2e7e1a8..139c91b 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -168,49 +168,54 @@ void Today::init() {
168 m_sv->addChild( m_big_box ); 168 m_sv->addChild( m_big_box );
169 m_bblayout = new QVBoxLayout ( m_big_box ); 169 m_bblayout = new QVBoxLayout ( m_big_box );
170} 170}
171 171
172/** 172/**
173 * Load the plugins 173 * Load the plugins
174 */ 174 */
175void Today::loadPlugins() { 175void Today::loadPlugins() {
176 176
177 init(); 177 init();
178 178
179 QValueList<TodayPlugin>::Iterator tit; 179 QValueList<TodayPlugin>::Iterator tit;
180 if ( !pluginList.isEmpty() ) { 180 if ( !pluginList.isEmpty() ) {
181 for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { 181 for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) {
182 (*tit).guiBox->hide(); 182 (*tit).guiBox->hide();
183 (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) ); 183 (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) );
184 delete (*tit).guiBox; 184 delete (*tit).guiBox;
185 (*tit).library->unload(); 185 (*tit).library->unload();
186 delete (*tit).library; 186 delete (*tit).library;
187 } 187 }
188 pluginList.clear(); 188 pluginList.clear();
189 } 189 }
190 190
191 QString path = QPEApplication::qpeDir() + "/plugins/today"; 191 QString path = QPEApplication::qpeDir() + "/plugins/today";
192#ifdef Q_OS_MACX
193 qWarning("Searching for Plugins in: %s", path.latin1());
194 QDir dir( path, "lib*.dylib" );
195#else
192 QDir dir( path, "lib*.so" ); 196 QDir dir( path, "lib*.so" );
197#endif
193 198
194 QStringList list = dir.entryList(); 199 QStringList list = dir.entryList();
195 QStringList::Iterator it; 200 QStringList::Iterator it;
196 201
197 // QMap<QString, TodayPlugin> tempList; 202 // QMap<QString, TodayPlugin> tempList;
198 203
199 for ( it = list.begin(); it != list.end(); ++it ) { 204 for ( it = list.begin(); it != list.end(); ++it ) {
200 QInterfacePtr<TodayPluginInterface> iface; 205 QInterfacePtr<TodayPluginInterface> iface;
201 QLibrary *lib = new QLibrary( path + "/" + *it ); 206 QLibrary *lib = new QLibrary( path + "/" + *it );
202 207
203 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); 208 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() );
204 if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { 209 if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
205 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() ); 210 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() );
206 qDebug( QString(*it) ); 211 qDebug( QString(*it) );
207 212
208 TodayPlugin plugin; 213 TodayPlugin plugin;
209 plugin.library = lib; 214 plugin.library = lib;
210 plugin.iface = iface; 215 plugin.iface = iface;
211 plugin.name = QString(*it); 216 plugin.name = QString(*it);
212 217
213 QString type = (*it).left( (*it).find(".") ); 218 QString type = (*it).left( (*it).find(".") );
214 219
215 QString lang; 220 QString lang;
216 Config config("locale"); 221 Config config("locale");