summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/opluginloader.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/opluginloader.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/opluginloader.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/libopie2/opiecore/opluginloader.cpp b/libopie2/opiecore/opluginloader.cpp
index 1edf3a1..b8b6b79 100644
--- a/libopie2/opiecore/opluginloader.cpp
+++ b/libopie2/opiecore/opluginloader.cpp
@@ -556,14 +556,17 @@ OPluginItem::List OGenericPluginLoader::plugins( const QString& _dir, bool sorte
556 for ( QStringList::Iterator it = excludes.begin(); it != excludes.end(); ++it ) 556 for ( QStringList::Iterator it = excludes.begin(); it != excludes.end(); ++it )
557 excludedMap.insert( *it, -2 ); 557 excludedMap.insert( *it, -2 );
558 558
559 if ( sorted ) { 559 if ( sorted ) {
560 QStringList pos = cfg.readListEntry( "Positions", '.' ); 560 QStringList pos = cfg.readListEntry( "Positions", '.' );
561 QStringList::Iterator it = pos.begin(); 561 QStringList::Iterator it = pos.begin();
562 while ( it != pos.end() ) 562 QString tmp; int i;
563 positionMap.insert( *it++, (*it++).toInt() ); 563 while ( it != pos.end() ) {
564 tmp = *it++; i = (*it++).toInt();
565 positionMap.insert( tmp, i );
566 }
564 567
565 } 568 }
566 569
567 570
568 571
569 572
@@ -582,12 +585,13 @@ OPluginItem::List OGenericPluginLoader::plugins( const QString& _dir, bool sorte
582 item.setEnabled( false ); 585 item.setEnabled( false );
583 else if ( ex && disabled ) 586 else if ( ex && disabled )
584 continue; 587 continue;
585 else if ( sorted ) 588 else if ( sorted )
586 item.setPosition( positionMap[str] ); 589 item.setPosition( positionMap[str] );
587 590
591
588 lst.append( item ); 592 lst.append( item );
589 } 593 }
590 594
591 return lst; 595 return lst;
592} 596}
593 597
@@ -831,12 +835,15 @@ void OPluginManager::save() {
831 positions[path].append( item.name() ); 835 positions[path].append( item.name() );
832 positions[path].append( QString::number( item.position() ) ); 836 positions[path].append( QString::number( item.position() ) );
833 } 837 }
834 838
835 if ( !item.isEnabled() ) 839 if ( !item.isEnabled() )
836 excluded[path].append( item.name() ); 840 excluded[path].append( item.name() );
841 if ( !excluded.contains( path ) )
842 excluded[path] = QString::null;
843
837 } 844 }
838 845
839/* 846/*
840 * The code below wouldn't work because we can't delete groups/keys from the config 847 * The code below wouldn't work because we can't delete groups/keys from the config
841 * ### for ODP make Config right! 848 * ### for ODP make Config right!
842 */ 849 */