correctly check whether a generator was already loaded, even when no generator was previously loaded

fixes the ghostcript config page not showing when starting an empty okular

svn path=/trunk/KDE/kdegraphics/okular/; revision=741308
This commit is contained in:
Pino Toscano 2007-11-25 12:08:37 +00:00
parent b3b533d206
commit 1e08dc6a95

View file

@ -457,7 +457,7 @@ void DocumentPrivate::loadServiceList( const KService::List& offers )
QString propName = offers.at(i)->name();
// don't load already loaded generators
QHash< QString, GeneratorInfo >::const_iterator genIt = m_loadedGenerators.constFind( propName );
if ( genIt != m_loadedGenerators.end() )
if ( !m_loadedGenerators.isEmpty() && genIt != m_loadedGenerators.end() )
continue;
Generator * g = loadGeneratorLibrary( propName, offers.at(i)->library() );