diff --git a/okular/core/document.cpp b/okular/core/document.cpp index 4b48547..02603c9 100644 --- okular/core/document.cpp +++ okular/core/document.cpp @@ -756,10 +756,12 @@ bool DocumentPrivate::openRelativeFile( const QString & fileName ) Generator * DocumentPrivate::loadGeneratorLibrary( const KService::Ptr &service ) { - KPluginFactory *factory = KPluginLoader( service->library() ).factory(); + KPluginLoader loader( service->library() ); + KPluginFactory *factory = loader.factory(); if ( !factory ) { kWarning(OkularDebug).nospace() << "Invalid plugin factory for " << service->library() << "!"; + kWarning(OkularDebug).nospace() << "Error: " << loader.errorString(); return 0; } Generator * generator = factory->create< Okular::Generator >( service->pluginKeyword(), 0 );