-rw-r--r-- | libopie2/opiecore/opluginloader.cpp | 11 |
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 for ( QStringList::Iterator it = excludes.begin(); it != excludes.end(); ++it ) excludedMap.insert( *it, -2 ); if ( sorted ) { QStringList pos = cfg.readListEntry( "Positions", '.' ); QStringList::Iterator it = pos.begin(); - while ( it != pos.end() ) - positionMap.insert( *it++, (*it++).toInt() ); + QString tmp; int i; + while ( it != pos.end() ) { + tmp = *it++; i = (*it++).toInt(); + positionMap.insert( tmp, i ); + } } @@ -582,12 +585,13 @@ OPluginItem::List OGenericPluginLoader::plugins( const QString& _dir, bool sorte item.setEnabled( false ); else if ( ex && disabled ) continue; else if ( sorted ) item.setPosition( positionMap[str] ); + lst.append( item ); } return lst; } @@ -831,12 +835,15 @@ void OPluginManager::save() { positions[path].append( item.name() ); positions[path].append( QString::number( item.position() ) ); } if ( !item.isEnabled() ) excluded[path].append( item.name() ); + if ( !excluded.contains( path ) ) + excluded[path] = QString::null; + } /* * The code below wouldn't work because we can't delete groups/keys from the config * ### for ODP make Config right! */ |