author | zecke <zecke> | 2004-10-16 00:01:01 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-16 00:01:01 (UTC) |
commit | df14f647ff1a60ca82e0fa9bd91458be146153b8 (patch) (unidiff) | |
tree | 4859961352851a4392e1442f2080c15bff8ad7bc /core/launcher/startmenu.cpp | |
parent | 419f9710c488f56a7a117eb1529970d3371e0094 (diff) | |
download | opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.zip opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.tar.gz opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.tar.bz2 |
Replace QPEApplication::qpeDir() + "/ with
QPEApplication::qpeDir() + "
as it is guranteed that qpeDir() will have '/' as the last
charachter
-rw-r--r-- | core/launcher/startmenu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp index f3a7651..66f665f 100644 --- a/core/launcher/startmenu.cpp +++ b/core/launcher/startmenu.cpp | |||
@@ -306,44 +306,44 @@ void StartMenu::loadApplets() | |||
306 | { | 306 | { |
307 | Config cfg( "StartMenu" ); | 307 | Config cfg( "StartMenu" ); |
308 | cfg.setGroup( "Applets" ); | 308 | cfg.setGroup( "Applets" ); |
309 | 309 | ||
310 | // SafeMode causes too much problems, so we disable it for now -- | 310 | // SafeMode causes too much problems, so we disable it for now -- |
311 | // maybe we should reenable it for OPIE 1.0 - sandman 26.09.02 | 311 | // maybe we should reenable it for OPIE 1.0 - sandman 26.09.02 |
312 | // removed in the remerge PluginManager could handle it | 312 | // removed in the remerge PluginManager could handle it |
313 | // we don't currently use it -zecke | 313 | // we don't currently use it -zecke |
314 | 314 | ||
315 | QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' ); | 315 | QStringList exclude = cfg.readListEntry( "ExcludeApplets", ',' ); |
316 | 316 | ||
317 | QString lang = getenv( "LANG" ); | 317 | QString lang = getenv( "LANG" ); |
318 | QString path = QPEApplication::qpeDir() + "/plugins/applets"; | 318 | QString path = QPEApplication::qpeDir() + "plugins/applets"; |
319 | QDir dir( path, "lib*.so" ); | 319 | QDir dir( path, "lib*.so" ); |
320 | QStringList list = dir.entryList(); | 320 | QStringList list = dir.entryList(); |
321 | QStringList::Iterator it; | 321 | QStringList::Iterator it; |
322 | int napplets = 0; | 322 | int napplets = 0; |
323 | MenuApplet* *xapplets = new MenuApplet*[list.count()]; | 323 | MenuApplet* *xapplets = new MenuApplet*[list.count()]; |
324 | for ( it = list.begin(); it != list.end(); ++it ) { | 324 | for ( it = list.begin(); it != list.end(); ++it ) { |
325 | if ( exclude.find( *it ) != exclude.end() ) | 325 | if ( exclude.find( *it ) != exclude.end() ) |
326 | continue; | 326 | continue; |
327 | MenuAppletInterface *iface = 0; | 327 | MenuAppletInterface *iface = 0; |
328 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 328 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
329 | if (( lib->queryInterface( IID_MenuApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { | 329 | if (( lib->queryInterface( IID_MenuApplet, (QUnknownInterface**)&iface ) == QS_OK ) && iface ) { |
330 | MenuApplet *applet = new MenuApplet; | 330 | MenuApplet *applet = new MenuApplet; |
331 | xapplets[napplets++] = applet; | 331 | xapplets[napplets++] = applet; |
332 | applet->library = lib; | 332 | applet->library = lib; |
333 | applet->iface = iface; | 333 | applet->iface = iface; |
334 | 334 | ||
335 | QTranslator *trans = new QTranslator(qApp); | 335 | QTranslator *trans = new QTranslator(qApp); |
336 | QString type = (*it).left( (*it).find(".") ); | 336 | QString type = (*it).left( (*it).find(".") ); |
337 | QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; | 337 | QString tfn = QPEApplication::qpeDir()+"i18n/"+lang+"/"+type+".qm"; |
338 | if ( trans->load( tfn )) | 338 | if ( trans->load( tfn )) |
339 | qApp->installTranslator( trans ); | 339 | qApp->installTranslator( trans ); |
340 | else | 340 | else |
341 | delete trans; | 341 | delete trans; |
342 | } else { | 342 | } else { |
343 | exclude += *it; | 343 | exclude += *it; |
344 | delete lib; | 344 | delete lib; |
345 | } | 345 | } |
346 | } | 346 | } |
347 | cfg.writeEntry( "ExcludeApplets", exclude, ',' ); | 347 | cfg.writeEntry( "ExcludeApplets", exclude, ',' ); |
348 | qsort(xapplets, napplets, sizeof(menuApplets[0]), compareAppletPositions); | 348 | qsort(xapplets, napplets, sizeof(menuApplets[0]), compareAppletPositions); |
349 | 349 | ||