From f05a19bd1e248ea8cea29d361a1a8085ca145c6a Mon Sep 17 00:00:00 2001 From: zecke Date: Sun, 12 Sep 2004 23:18:37 +0000 Subject: If there is no 'excluded' plugin the excluded-list wasn't made empty and the old/prior setting still was used. This fix makes sure that an empty string is written if no plugin is excluded --- (limited to 'libopie2/opiecore/opluginloader.cpp') 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 @@ -559,8 +559,11 @@ OPluginItem::List OGenericPluginLoader::plugins( const QString& _dir, bool sorte 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 ); + } } @@ -585,6 +588,7 @@ OPluginItem::List OGenericPluginLoader::plugins( const QString& _dir, bool sorte else if ( sorted ) item.setPosition( positionMap[str] ); + lst.append( item ); } @@ -834,6 +838,9 @@ void OPluginManager::save() { if ( !item.isEnabled() ) excluded[path].append( item.name() ); + if ( !excluded.contains( path ) ) + excluded[path] = QString::null; + } /* -- cgit v0.9.0.2