summaryrefslogtreecommitdiff
path: root/core/pim/today/today.cpp
authoreilers <eilers>2003-11-03 16:52:18 (UTC)
committer eilers <eilers>2003-11-03 16:52:18 (UTC)
commitd34dc773591a2d467c68875a68a671d6a809f861 (patch) (unidiff)
treeb57e5ae15c51e3d87ca95d57aedfd1ca3db57bfe /core/pim/today/today.cpp
parentce84f2d8bdd65c438821f0457cdad6bbbfa73380 (diff)
downloadopie-d34dc773591a2d467c68875a68a671d6a809f861.zip
opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.gz
opie-d34dc773591a2d467c68875a68a671d6a809f861.tar.bz2
Porting Opie to MacOS-X.
The base system and all platform independent applications and platforms should work. Please see $OPIEDIR/development/macosx for details
Diffstat (limited to 'core/pim/today/today.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/today.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index f213943..cb18c1c 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -153,53 +153,60 @@ void Today::init() {
153 layout = new QVBoxLayout( this ); 153 layout = new QVBoxLayout( this );
154 layout->addWidget( Frame ); 154 layout->addWidget( Frame );
155 layout->addWidget( OwnerField ); 155 layout->addWidget( OwnerField );
156} 156}
157 157
158/** 158/**
159 * Load the plugins 159 * Load the plugins
160 */ 160 */
161void Today::loadPlugins() { 161void Today::loadPlugins() {
162 162
163 init(); 163 init();
164 QValueList<TodayPlugin>::Iterator tit; 164 QValueList<TodayPlugin>::Iterator tit;
165 if ( !pluginList.isEmpty() ) { 165 if ( !pluginList.isEmpty() ) {
166 for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { 166 for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) {
167 (*tit).guiBox->hide(); 167 (*tit).guiBox->hide();
168 (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) ); 168 (*tit).guiBox->reparent( 0, QPoint( 0, 0 ) );
169 delete (*tit).guiBox; 169 delete (*tit).guiBox;
170 (*tit).library->unload(); 170 (*tit).library->unload();
171 delete (*tit).library; 171 delete (*tit).library;
172 } 172 }
173 pluginList.clear(); 173 pluginList.clear();
174 } 174 }
175 175
176 QString path = QPEApplication::qpeDir() + "/plugins/today"; 176 QString path = QPEApplication::qpeDir() + "/plugins/today";
177 qWarning("Searching for Plugins in: %s", path.latin1());
178#ifdef Q_OS_MACX
179 QDir dir( path, "lib*.dylib" );
180#else
177 QDir dir( path, "lib*.so" ); 181 QDir dir( path, "lib*.so" );
182#endif
178 183
179 QStringList list = dir.entryList(); 184 QStringList list = dir.entryList();
180 QStringList::Iterator it; 185 QStringList::Iterator it;
181 186
187 qWarning("Found: %d entries !", list.count() );
188
182 QMap<QString, TodayPlugin> tempList; 189 QMap<QString, TodayPlugin> tempList;
183 190
184 for ( it = list.begin(); it != list.end(); ++it ) { 191 for ( it = list.begin(); it != list.end(); ++it ) {
185 QInterfacePtr<TodayPluginInterface> iface; 192 QInterfacePtr<TodayPluginInterface> iface;
186 QLibrary *lib = new QLibrary( path + "/" + *it ); 193 QLibrary *lib = new QLibrary( path + "/" + *it );
187 194
188 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() ); 195 qDebug( "querying: %s", QString( path + "/" + *it ).latin1() );
189 if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { 196 if ( lib->queryInterface( IID_TodayPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
190 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() ); 197 qDebug( "accepted: %s", QString( path + "/" + *it ).latin1() );
191 qDebug( QString(*it) ); 198 qDebug( QString(*it) );
192 199
193 TodayPlugin plugin; 200 TodayPlugin plugin;
194 plugin.library = lib; 201 plugin.library = lib;
195 plugin.iface = iface; 202 plugin.iface = iface;
196 plugin.name = QString(*it); 203 plugin.name = QString(*it);
197 204
198 QString type = (*it).left( (*it).find(".") ); 205 QString type = (*it).left( (*it).find(".") );
199 206
200 // grr, sharp rom does not know Global::languageList(); 207 // grr, sharp rom does not know Global::languageList();
201 // QStringList langs = Global::languageList(); 208 // QStringList langs = Global::languageList();
202 QString tfn = QPEApplication::qpeDir() + "/i18n/"; 209 QString tfn = QPEApplication::qpeDir() + "/i18n/";
203 QDir langDir = tfn; 210 QDir langDir = tfn;
204 QStringList langs = langDir.entryList("*", QDir::Dirs ); 211 QStringList langs = langDir.entryList("*", QDir::Dirs );
205 212