summaryrefslogtreecommitdiff
path: root/core/settings/security/multiauthconfig.cpp
Unidiff
Diffstat (limited to 'core/settings/security/multiauthconfig.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/settings/security/multiauthconfig.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/settings/security/multiauthconfig.cpp b/core/settings/security/multiauthconfig.cpp
index e545e17..45d691b 100644
--- a/core/settings/security/multiauthconfig.cpp
+++ b/core/settings/security/multiauthconfig.cpp
@@ -109,97 +109,97 @@ void MultiauthGeneralConfig::tryAuth()
109 QMessageBox confirmSave( 109 QMessageBox confirmSave(
110 tr("Attention"), 110 tr("Attention"),
111 "<p>" + tr("You must save your current settings before trying to authenticate. Press OK to accept and launch a simulated authentication process.") + "</p><p><em>" + 111 "<p>" + tr("You must save your current settings before trying to authenticate. Press OK to accept and launch a simulated authentication process.") + "</p><p><em>" +
112 tr("If you don't like the result of this test, don't forget to change your settings before you exit the configuration application!") + "</em></p>", 112 tr("If you don't like the result of this test, don't forget to change your settings before you exit the configuration application!") + "</em></p>",
113 QMessageBox::Warning, 113 QMessageBox::Warning,
114 QMessageBox::Cancel, QMessageBox::Yes, QMessageBox::NoButton, 114 QMessageBox::Cancel, QMessageBox::Yes, QMessageBox::NoButton,
115 0, QString::null, TRUE, WStyle_StaysOnTop); 115 0, QString::null, TRUE, WStyle_StaysOnTop);
116 confirmSave.setButtonText(QMessageBox::Cancel, tr("Cancel")); 116 confirmSave.setButtonText(QMessageBox::Cancel, tr("Cancel"));
117 confirmSave.setButtonText(QMessageBox::Yes, tr("OK")); 117 confirmSave.setButtonText(QMessageBox::Yes, tr("OK"));
118 118
119 if ( confirmSave.exec() == QMessageBox::Yes) 119 if ( confirmSave.exec() == QMessageBox::Yes)
120 { 120 {
121 owarn << "writing config as user accepted" << oendl; 121 owarn << "writing config as user accepted" << oendl;
122 m_parentConfig->writeConfigs(); 122 m_parentConfig->writeConfigs();
123 owarn << "testing authentication" << oendl; 123 owarn << "testing authentication" << oendl;
124 // launch the authentication in testing mode 124 // launch the authentication in testing mode
125 Opie::Security::MultiauthPassword::authenticate(Opie::Security::TestNow); 125 Opie::Security::MultiauthPassword::authenticate(Opie::Security::TestNow);
126 } 126 }
127} 127}
128 128
129 129
130/// Builds and displays the Opie multi-authentication configuration dialog 130/// Builds and displays the Opie multi-authentication configuration dialog
131static void test_and_start() { 131static void test_and_start() {
132 Config pcfg("Security"); 132 Config pcfg("Security");
133 pcfg.setGroup( "Misc" ); 133 pcfg.setGroup( "Misc" );
134 bool protectConfigDialog = ! pcfg.readBoolEntry("noProtectConfig", true); 134 bool protectConfigDialog = ! pcfg.readBoolEntry("noProtectConfig", true);
135 135
136 if (protectConfigDialog && Opie::Security::Internal::runPlugins() != 0) { 136 if (protectConfigDialog && Opie::Security::Internal::runPlugins() != 0) {
137 owarn << "authentication failed, not showing opie-security" << oendl; 137 owarn << "authentication failed, not showing opie-security" << oendl;
138 exit( -1 ); 138 exit( -1 );
139 } 139 }
140} 140}
141 141
142 142
143 143
144 MultiauthConfig::MultiauthConfig(QWidget* par, const char* w = "MultiauthConfig dialog", WFlags f = 0) 144 MultiauthConfig::MultiauthConfig(QWidget* par, const char* w = "MultiauthConfig dialog", WFlags f = 0)
145: QDialog(par, w, TRUE, f), 145: QDialog(par, w, TRUE, f),
146 m_mainTW(0), m_pluginListView(0), m_pluginListWidget(0), 146 m_mainTW(0), m_pluginListView(0), m_pluginListWidget(0),
147 m_generalConfig(0), m_loginWidget(0), m_syncWidget(0), 147 m_generalConfig(0), m_loginWidget(0), m_syncWidget(0),
148 m_nbSuccessReq(0), m_plugins_changed(false) 148 m_nbSuccessReq(0), m_plugins_changed(false)
149{ 149{
150 /* Initializes the global configuration window 150 /* Initializes the global configuration window
151 */ 151 */
152 test_and_start(); 152 test_and_start();
153 153
154 /* Checks (and memorizes) if any authentication plugins are 154 /* Checks (and memorizes) if any authentication plugins are
155 * installed on the system 155 * installed on the system
156 */ 156 */
157 QString path = QPEApplication::qpeDir() + "/plugins/security"; 157 QString path = QPEApplication::qpeDir() + "plugins/security";
158 QDir dir( path, "lib*.so" ); 158 QDir dir( path, "lib*.so" );
159 QStringList list = dir.entryList(); 159 QStringList list = dir.entryList();
160 160
161 m_pluginsInstalled = ! list.isEmpty(); 161 m_pluginsInstalled = ! list.isEmpty();
162 if (m_pluginsInstalled == false) 162 if (m_pluginsInstalled == false)
163 owarn << "no authentication plugins installed! Talking about it in the last tab..." << oendl; 163 owarn << "no authentication plugins installed! Talking about it in the last tab..." << oendl;
164 164
165 setCaption( tr( "Security configuration" ) ); 165 setCaption( tr( "Security configuration" ) );
166 QVBoxLayout *layout = new QVBoxLayout( this ); 166 QVBoxLayout *layout = new QVBoxLayout( this );
167 m_mainTW = new Opie::Ui::OTabWidget( this, "main tab widget" ); 167 m_mainTW = new Opie::Ui::OTabWidget( this, "main tab widget" );
168 layout->addWidget(m_mainTW); 168 layout->addWidget(m_mainTW);
169 169
170 if (m_pluginsInstalled) 170 if (m_pluginsInstalled)
171 { 171 {
172 m_pluginListWidget = new QWidget(m_mainTW, "plugin list widget"); 172 m_pluginListWidget = new QWidget(m_mainTW, "plugin list widget");
173 QVBoxLayout * pluginListLayout = new QVBoxLayout(m_pluginListWidget); 173 QVBoxLayout * pluginListLayout = new QVBoxLayout(m_pluginListWidget);
174 pluginListLayout->setSpacing(6); 174 pluginListLayout->setSpacing(6);
175 pluginListLayout->setMargin(11); 175 pluginListLayout->setMargin(11);
176 QLabel * pluginListTitle = new QLabel( tr( "Load which plugins in what order:" ), m_pluginListWidget ); 176 QLabel * pluginListTitle = new QLabel( tr( "Load which plugins in what order:" ), m_pluginListWidget );
177 pluginListLayout->addWidget(pluginListTitle); 177 pluginListLayout->addWidget(pluginListTitle);
178 QHBox * pluginListHB = new QHBox(m_pluginListWidget); 178 QHBox * pluginListHB = new QHBox(m_pluginListWidget);
179 pluginListLayout->addWidget(pluginListHB); 179 pluginListLayout->addWidget(pluginListHB);
180 180
181 m_pluginListView = new QListView(pluginListHB); 181 m_pluginListView = new QListView(pluginListHB);
182 m_pluginListView->addColumn("PluginList"); 182 m_pluginListView->addColumn("PluginList");
183 m_pluginListView->header()->hide(); 183 m_pluginListView->header()->hide();
184 m_pluginListView->setSorting(-1); 184 m_pluginListView->setSorting(-1);
185 QWhatsThis::add(m_pluginListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the order they will appear in" )); 185 QWhatsThis::add(m_pluginListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the order they will appear in" ));
186 186
187 QVBox * pluginListVB = new QVBox(pluginListHB); 187 QVBox * pluginListVB = new QVBox(pluginListHB);
188 new ToolButton( pluginListVB, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) ); 188 new ToolButton( pluginListVB, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) );
189 new ToolButton( pluginListVB, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) ); 189 new ToolButton( pluginListVB, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) );
190 m_mainTW->addTab( m_pluginListWidget, "pass", tr( "plugins" ) ); 190 m_mainTW->addTab( m_pluginListWidget, "pass", tr( "plugins" ) );
191 191
192 connect ( m_pluginListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( pluginsChanged ( ) ) ); 192 connect ( m_pluginListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( pluginsChanged ( ) ) );
193 193
194 // general Opie multi-authentication configuration tab 194 // general Opie multi-authentication configuration tab
195 m_generalConfig = new MultiauthGeneralConfig(this, m_mainTW); 195 m_generalConfig = new MultiauthGeneralConfig(this, m_mainTW);
196 m_mainTW->addTab(m_generalConfig, "SettingsIcon", tr( "Authentication") ); 196 m_mainTW->addTab(m_generalConfig, "SettingsIcon", tr( "Authentication") );
197 197
198 } 198 }
199 // login settings page 199 // login settings page
200 m_loginWidget = new LoginBase(m_mainTW, "login config widget"); 200 m_loginWidget = new LoginBase(m_mainTW, "login config widget");
201 m_mainTW->addTab(m_loginWidget, "security/users", tr( "Login") ); 201 m_mainTW->addTab(m_loginWidget, "security/users", tr( "Login") );
202 202
203 // sync settings page 203 // sync settings page
204 m_syncWidget = new SyncBase( m_mainTW, "sync config widget" ); 204 m_syncWidget = new SyncBase( m_mainTW, "sync config widget" );
205 m_mainTW->addTab(m_syncWidget, "security/sync", tr( "Sync") ); 205 m_mainTW->addTab(m_syncWidget, "security/sync", tr( "Sync") );
@@ -329,97 +329,97 @@ void MultiauthConfig::readConfig()
329 329
330 pcfg->setGroup( "Plugins" ); 330 pcfg->setGroup( "Plugins" );
331 m_excludePlugins = pcfg->readListEntry( "ExcludePlugins", ',' ); 331 m_excludePlugins = pcfg->readListEntry( "ExcludePlugins", ',' );
332 m_allPlugins = pcfg->readListEntry( "AllPlugins", ',' ); 332 m_allPlugins = pcfg->readListEntry( "AllPlugins", ',' );
333 } 333 }
334 334
335 /* Login and Sync stuff */ 335 /* Login and Sync stuff */
336 pcfg->setGroup("Sync"); 336 pcfg->setGroup("Sync");
337 int auth_peer = pcfg->readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24 337 int auth_peer = pcfg->readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24
338 int auth_peer_bits = pcfg->readNumEntry("auth_peer_bits",24); 338 int auth_peer_bits = pcfg->readNumEntry("auth_peer_bits",24);
339 339
340 pcfg->setGroup("SyncMode"); 340 pcfg->setGroup("SyncMode");
341 int mode = pcfg->readNumEntry("Mode",2); // Default to Sharp 341 int mode = pcfg->readNumEntry("Mode",2); // Default to Sharp
342 switch( mode ) { 342 switch( mode ) {
343 case 0x01: 343 case 0x01:
344 m_syncWidget->syncModeCombo->setCurrentItem( 0 ); 344 m_syncWidget->syncModeCombo->setCurrentItem( 0 );
345 break; 345 break;
346 case 0x02: 346 case 0x02:
347 default: 347 default:
348 m_syncWidget->syncModeCombo->setCurrentItem( 1 ); 348 m_syncWidget->syncModeCombo->setCurrentItem( 1 );
349 break; 349 break;
350 case 0x04: 350 case 0x04:
351 m_syncWidget->syncModeCombo->setCurrentItem( 2 ); 351 m_syncWidget->syncModeCombo->setCurrentItem( 2 );
352 break; 352 break;
353 } 353 }
354 /* 354 /*
355 cfg.setGroup("Remote"); 355 cfg.setGroup("Remote");
356 if ( telnetAvailable() ) 356 if ( telnetAvailable() )
357 telnet->setChecked(cfg.readEntry("allow_telnet")); 357 telnet->setChecked(cfg.readEntry("allow_telnet"));
358 else 358 else
359 telnet->hide(); 359 telnet->hide();
360 360
361 if ( sshAvailable() ) 361 if ( sshAvailable() )
362 ssh->setChecked(cfg.readEntry("allow_ssh")); 362 ssh->setChecked(cfg.readEntry("allow_ssh"));
363 else 363 else
364 ssh->hide(); 364 ssh->hide();
365 */ 365 */
366 366
367 // release the Config handler 367 // release the Config handler
368 delete pcfg; 368 delete pcfg;
369 // indeed, selectNet will open the config file... 369 // indeed, selectNet will open the config file...
370 selectNet(auth_peer,auth_peer_bits,TRUE); 370 selectNet(auth_peer,auth_peer_bits,TRUE);
371 371
372 connect( m_syncWidget->syncnet, SIGNAL(textChanged(const QString&)), 372 connect( m_syncWidget->syncnet, SIGNAL(textChanged(const QString&)),
373 this, SLOT(setSyncNet(const QString&))); 373 this, SLOT(setSyncNet(const QString&)));
374 374
375 375
376 376
377 QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf"; 377 QString configFile = QPEApplication::qpeDir() + "etc/opie-login.conf";
378 Config loginCfg(configFile,Config::File); 378 Config loginCfg(configFile,Config::File);
379 379
380 loginCfg.setGroup("General"); 380 loginCfg.setGroup("General");
381 autoLoginName=loginCfg.readEntry("AutoLogin",""); 381 autoLoginName=loginCfg.readEntry("AutoLogin","");
382 382
383 if (autoLoginName.stripWhiteSpace().isEmpty()) { 383 if (autoLoginName.stripWhiteSpace().isEmpty()) {
384 autoLogin=false; 384 autoLogin=false;
385 } else { 385 } else {
386 autoLogin=true; 386 autoLogin=true;
387 } 387 }
388 388
389 389
390 connect(m_loginWidget->autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool))); 390 connect(m_loginWidget->autologinToggle, SIGNAL(toggled(bool)), this, SLOT(toggleAutoLogin(bool)));
391 connect(m_loginWidget->userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int))); 391 connect(m_loginWidget->userlist, SIGNAL(activated(int)), this, SLOT(changeLoginName(int)));
392 connect(m_syncWidget->restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults())); 392 connect(m_syncWidget->restoredefaults,SIGNAL(clicked()), this, SLOT(restoreDefaults()));
393 connect(m_syncWidget->deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry())); 393 connect(m_syncWidget->deleteentry,SIGNAL(clicked()), this, SLOT(deleteListEntry()));
394 394
395 loadUsers(); 395 loadUsers();
396 updateGUI(); 396 updateGUI();
397 397
398} 398}
399 399
400void MultiauthConfig::writeConfig() 400void MultiauthConfig::writeConfig()
401{ 401{
402 Config* pcfg = new Config("Security"); 402 Config* pcfg = new Config("Security");
403 403
404 if (m_pluginsInstalled) 404 if (m_pluginsInstalled)
405 { 405 {
406 pcfg->setGroup( "Plugins" ); 406 pcfg->setGroup( "Plugins" );
407 QStringList exclude; 407 QStringList exclude;
408 QStringList include; 408 QStringList include;
409 QStringList allPlugins; 409 QStringList allPlugins;
410 410
411 QListViewItemIterator list_it( m_pluginListView ); 411 QListViewItemIterator list_it( m_pluginListView );
412 412
413 // this makes sure the names get saved in the order selected 413 // this makes sure the names get saved in the order selected
414 for ( ; list_it.current(); ++list_it ) { 414 for ( ; list_it.current(); ++list_it ) {
415 QMap <QString, QCheckListItem *>::Iterator it; 415 QMap <QString, QCheckListItem *>::Iterator it;
416 for ( it = m_plugins.begin(); it != m_plugins. end (); ++it ) { 416 for ( it = m_plugins.begin(); it != m_plugins. end (); ++it ) {
417 if ( list_it.current() == (*it) && !(*it)-> isOn () ) { 417 if ( list_it.current() == (*it) && !(*it)-> isOn () ) {
418 exclude << it.key(); 418 exclude << it.key();
419 } else if ( list_it.current() == (*it) && (*it)-> isOn () ){ 419 } else if ( list_it.current() == (*it) && (*it)-> isOn () ){
420 include << it.key(); 420 include << it.key();
421 } 421 }
422 if ( list_it.current() == (*it) ) { 422 if ( list_it.current() == (*it) ) {
423 allPlugins << it.key(); 423 allPlugins << it.key();
424 } 424 }
425 } 425 }
@@ -444,117 +444,117 @@ void MultiauthConfig::writeConfig()
444 QString sn = m_syncWidget->syncnet->currentText(); 444 QString sn = m_syncWidget->syncnet->currentText();
445 parseNet(sn,auth_peer,auth_peer_bits); 445 parseNet(sn,auth_peer,auth_peer_bits);
446 446
447 //this is the *selected* (active) net range 447 //this is the *selected* (active) net range
448 pcfg->writeEntry("auth_peer",auth_peer); 448 pcfg->writeEntry("auth_peer",auth_peer);
449 pcfg->writeEntry("auth_peer_bits",auth_peer_bits); 449 pcfg->writeEntry("auth_peer_bits",auth_peer_bits);
450 450
451 //write back all other net ranges in *cleartext* 451 //write back all other net ranges in *cleartext*
452 for (int i=0; i<10; i++) { 452 for (int i=0; i<10; i++) {
453 QString target; 453 QString target;
454 target.sprintf("net%d", i); 454 target.sprintf("net%d", i);
455 if ( i < m_syncWidget->syncnet->count() ) 455 if ( i < m_syncWidget->syncnet->count() )
456 pcfg->writeEntry(target, m_syncWidget->syncnet->text(i)); 456 pcfg->writeEntry(target, m_syncWidget->syncnet->text(i));
457 else // no more entry in the syncnet list -> we clear the line 457 else // no more entry in the syncnet list -> we clear the line
458 pcfg->writeEntry(target, ""); 458 pcfg->writeEntry(target, "");
459 } 459 }
460 460
461#ifdef ODP 461#ifdef ODP
462#error "Use 0,1,2 and use Launcher" 462#error "Use 0,1,2 and use Launcher"
463#endif 463#endif
464 /* keep the old code so we don't use currentItem directly */ 464 /* keep the old code so we don't use currentItem directly */
465 int value = 0x02; 465 int value = 0x02;
466 switch( m_syncWidget->syncModeCombo->currentItem() ) { 466 switch( m_syncWidget->syncModeCombo->currentItem() ) {
467 case 0: 467 case 0:
468 value = 0x01; 468 value = 0x01;
469 break; 469 break;
470 case 1: 470 case 1:
471 value = 0x02; 471 value = 0x02;
472 break; 472 break;
473 case 2: 473 case 2:
474 value = 0x04; 474 value = 0x04;
475 break; 475 break;
476 } 476 }
477 pcfg->setGroup("SyncMode"); 477 pcfg->setGroup("SyncMode");
478 pcfg->writeEntry( "Mode", value ); 478 pcfg->writeEntry( "Mode", value );
479 479
480 /* 480 /*
481 pcfg->setGroup("Remote"); 481 pcfg->setGroup("Remote");
482 if ( telnetAvailable() ) 482 if ( telnetAvailable() )
483 pcfg->writeEntry("allow_telnet",telnet->isChecked()); 483 pcfg->writeEntry("allow_telnet",telnet->isChecked());
484 if ( sshAvailable() ) 484 if ( sshAvailable() )
485 pcfg->writeEntry("allow_ssh",ssh->isChecked()); 485 pcfg->writeEntry("allow_ssh",ssh->isChecked());
486 // ### write ssh/telnet sys config files 486 // ### write ssh/telnet sys config files
487 */ 487 */
488 488
489 //release the Config handler 489 //release the Config handler
490 delete pcfg; 490 delete pcfg;
491 491
492 QString configFile = QPEApplication::qpeDir() + "/etc/opie-login.conf"; 492 QString configFile = QPEApplication::qpeDir() + "etc/opie-login.conf";
493 Config loginCfg(configFile,Config::File); 493 Config loginCfg(configFile,Config::File);
494 loginCfg.setGroup("General"); 494 loginCfg.setGroup("General");
495 495
496 if (autoLogin) { 496 if (autoLogin) {
497 loginCfg.writeEntry("AutoLogin",autoLoginName); 497 loginCfg.writeEntry("AutoLogin",autoLoginName);
498 } else { 498 } else {
499 loginCfg.removeEntry("AutoLogin"); 499 loginCfg.removeEntry("AutoLogin");
500 } 500 }
501 501
502} 502}
503 503
504/// slot used to record the fact plugins order has been modified 504/// slot used to record the fact plugins order has been modified
505void MultiauthConfig::pluginsChanged() { 505void MultiauthConfig::pluginsChanged() {
506 m_plugins_changed = true; 506 m_plugins_changed = true;
507} 507}
508 508
509/// loads each multiauth plugin 509/// loads each multiauth plugin
510void MultiauthConfig::loadPlugins() { 510void MultiauthConfig::loadPlugins() {
511 511
512 QString path = QPEApplication::qpeDir() + "/plugins/security"; 512 QString path = QPEApplication::qpeDir() + "plugins/security";
513 QDir dir( path, "lib*.so" ); 513 QDir dir( path, "lib*.so" );
514 514
515 QStringList list = dir.entryList(); 515 QStringList list = dir.entryList();
516 QStringList::Iterator it; 516 QStringList::Iterator it;
517 517
518 // temporary list used to sort plugins 518 // temporary list used to sort plugins
519 QMap<QString, MultiauthPlugin> sortList; 519 QMap<QString, MultiauthPlugin> sortList;
520 520
521 for ( it = list.begin(); it != list.end(); ++it ) { 521 for ( it = list.begin(); it != list.end(); ++it ) {
522 QInterfacePtr<MultiauthPluginInterface> iface; 522 QInterfacePtr<MultiauthPluginInterface> iface;
523 QLibrary *lib = new QLibrary( path + "/" + *it ); 523 QLibrary *lib = new QLibrary( path + "/" + *it );
524 QString libPath(path + "/" + *it); 524 QString libPath(path + "/" + *it);
525 525
526 if ( lib->queryInterface( IID_MultiauthPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) { 526 if ( lib->queryInterface( IID_MultiauthPluginInterface, (QUnknownInterface**)&iface ) == QS_OK ) {
527 MultiauthPlugin plugin; 527 MultiauthPlugin plugin;
528 plugin.library = lib; 528 plugin.library = lib;
529 plugin.iface = iface; 529 plugin.iface = iface;
530 plugin.name = QString(*it); 530 plugin.name = QString(*it);
531 531
532 // find out if plugins should be launched 532 // find out if plugins should be launched
533 if ( m_excludePlugins.grep( *it ).isEmpty() ) { 533 if ( m_excludePlugins.grep( *it ).isEmpty() ) {
534 plugin.active = true; 534 plugin.active = true;
535 } else { 535 } else {
536 plugin.active = false; 536 plugin.active = false;
537 } 537 }
538 538
539 plugin.pluginObject = plugin.iface->plugin(); 539 plugin.pluginObject = plugin.iface->plugin();
540 540
541 // "prebuffer" it in one more list, to get the sorting done 541 // "prebuffer" it in one more list, to get the sorting done
542 sortList.insert( plugin.name, plugin ); 542 sortList.insert( plugin.name, plugin );
543 543
544 // on first start the list is off course empty 544 // on first start the list is off course empty
545 if ( m_allPlugins.isEmpty() ) { 545 if ( m_allPlugins.isEmpty() ) {
546 pluginList.append( plugin ); 546 pluginList.append( plugin );
547 } 547 }
548 // if plugin is not yet in the list, add it to the layout too 548 // if plugin is not yet in the list, add it to the layout too
549 else if ( !m_allPlugins.contains( plugin.name ) ) { 549 else if ( !m_allPlugins.contains( plugin.name ) ) {
550 pluginList.append( plugin ); 550 pluginList.append( plugin );
551 } 551 }
552 552
553 } else { 553 } else {
554 delete lib; 554 delete lib;
555 } 555 }
556 556
557 } // end for 557 } // end for
558 558
559 // put m_allPlugins tempPlugin objects into pluginList 559 // put m_allPlugins tempPlugin objects into pluginList
560 if ( !m_allPlugins.isEmpty() ) { 560 if ( !m_allPlugins.isEmpty() ) {