Diffstat (limited to 'core/settings/security/multiauthconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/security/multiauthconfig.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/core/settings/security/multiauthconfig.cpp b/core/settings/security/multiauthconfig.cpp index 0ce4542..93e73c3 100644 --- a/core/settings/security/multiauthconfig.cpp +++ b/core/settings/security/multiauthconfig.cpp | |||
@@ -403,44 +403,39 @@ void MultiauthConfig::writeConfig() | |||
403 | } | 403 | } |
404 | 404 | ||
405 | } | 405 | } |
406 | 406 | ||
407 | /// slot used to record the fact plugins order has been modified | 407 | /// slot used to record the fact plugins order has been modified |
408 | void MultiauthConfig::pluginsChanged() { | 408 | void MultiauthConfig::pluginsChanged() { |
409 | m_plugins_changed = true; | 409 | m_plugins_changed = true; |
410 | } | 410 | } |
411 | 411 | ||
412 | /// loads each multiauth plugin | 412 | /// loads each multiauth plugin |
413 | void MultiauthConfig::loadPlugins() { | 413 | void MultiauthConfig::loadPlugins() { |
414 | 414 | ||
415 | odebug << "loading plugins..." << oendl; | ||
416 | QString path = QPEApplication::qpeDir() + "/plugins/security"; | 415 | QString path = QPEApplication::qpeDir() + "/plugins/security"; |
417 | QDir dir( path, "lib*.so" ); | 416 | QDir dir( path, "lib*.so" ); |
418 | 417 | ||
419 | QStringList list = dir.entryList(); | 418 | QStringList list = dir.entryList(); |
420 | QStringList::Iterator it; | 419 | QStringList::Iterator it; |
421 | 420 | ||
422 | // temporary list used to sort plugins | 421 | // temporary list used to sort plugins |
423 | QMap<QString, MultiauthPlugin> sortList; | 422 | QMap<QString, MultiauthPlugin> sortList; |
424 | 423 | ||
425 | for ( it = list.begin(); it != list.end(); ++it ) { | 424 | for ( it = list.begin(); it != list.end(); ++it ) { |
426 | QInterfacePtr<MultiauthPluginInterface> iface; | 425 | QInterfacePtr<MultiauthPluginInterface> iface; |
427 | QLibrary *lib = new QLibrary( path + "/" + *it ); | 426 | QLibrary *lib = new QLibrary( path + "/" + *it ); |
428 | QString libPath(path + "/" + *it); | 427 | QString libPath(path + "/" + *it); |
429 | odebug << "library path: " << libPath << oendl; | ||
430 | 428 | ||
431 | odebug << "querying: " << QString( path + "/" + *it ) << oendl; | ||
432 | if ( lib->queryInterface( IID_MultiauthPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { | 429 | if ( lib->queryInterface( IID_MultiauthPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { |
433 | odebug << "accepted: " << QString( path + "/" + *it ) << oendl; | ||
434 | |||
435 | MultiauthPlugin plugin; | 430 | MultiauthPlugin plugin; |
436 | plugin.library = lib; | 431 | plugin.library = lib; |
437 | plugin.iface = iface; | 432 | plugin.iface = iface; |
438 | plugin.name = QString(*it); | 433 | plugin.name = QString(*it); |
439 | 434 | ||
440 | // find out if plugins should be launched | 435 | // find out if plugins should be launched |
441 | if ( m_excludePlugins.grep( *it ).isEmpty() ) { | 436 | if ( m_excludePlugins.grep( *it ).isEmpty() ) { |
442 | plugin.active = true; | 437 | plugin.active = true; |
443 | } else { | 438 | } else { |
444 | plugin.active = false; | 439 | plugin.active = false; |
445 | } | 440 | } |
446 | 441 | ||
@@ -450,25 +445,24 @@ void MultiauthConfig::loadPlugins() { | |||
450 | sortList.insert( plugin.name, plugin ); | 445 | sortList.insert( plugin.name, plugin ); |
451 | 446 | ||
452 | // on first start the list is off course empty | 447 | // on first start the list is off course empty |
453 | if ( m_allPlugins.isEmpty() ) { | 448 | if ( m_allPlugins.isEmpty() ) { |
454 | pluginList.append( plugin ); | 449 | pluginList.append( plugin ); |
455 | } | 450 | } |
456 | // if plugin is not yet in the list, add it to the layout too | 451 | // if plugin is not yet in the list, add it to the layout too |
457 | else if ( !m_allPlugins.contains( plugin.name ) ) { | 452 | else if ( !m_allPlugins.contains( plugin.name ) ) { |
458 | pluginList.append( plugin ); | 453 | pluginList.append( plugin ); |
459 | } | 454 | } |
460 | 455 | ||
461 | } else { | 456 | } else { |
462 | odebug << "could not recognize " << QString( path + "/" + *it ) << oendl; | ||
463 | delete lib; | 457 | delete lib; |
464 | } | 458 | } |
465 | 459 | ||
466 | } // end for | 460 | } // end for |
467 | 461 | ||
468 | // put m_allPlugins tempPlugin objects into pluginList | 462 | // put m_allPlugins tempPlugin objects into pluginList |
469 | if ( !m_allPlugins.isEmpty() ) { | 463 | if ( !m_allPlugins.isEmpty() ) { |
470 | MultiauthPlugin tempPlugin; | 464 | MultiauthPlugin tempPlugin; |
471 | QStringList::Iterator stringit; | 465 | QStringList::Iterator stringit; |
472 | for( stringit = m_allPlugins.begin(); stringit != m_allPlugins.end(); ++stringit ) { | 466 | for( stringit = m_allPlugins.begin(); stringit != m_allPlugins.end(); ++stringit ) { |
473 | tempPlugin = ( sortList.find( *stringit ) ).data(); | 467 | tempPlugin = ( sortList.find( *stringit ) ).data(); |
474 | if ( !( (tempPlugin.name).isEmpty() ) ) { | 468 | if ( !( (tempPlugin.name).isEmpty() ) ) { |