summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2015-07-31 10:15:09 (GMT)
committerDavid Faure <faure@kde.org>2015-07-31 10:15:09 (GMT)
commit94b95d8fdaa085ff58c8611ede5c947ee3c2374a (patch)
treea8193821da1c4f3837e12f2b2b5faa132bb59bd2
parentf98eb936d51142408999173290797601573be407 (diff)
Print out better error message if a plugin can't be loaded.
(turns out that poppler installs into lib/ rather than lib64/)
-rw-r--r--core/document.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/document.cpp b/core/document.cpp
index a066174..9ee8872 100644
--- a/core/document.cpp
+++ b/core/document.cpp
@@ -817,10 +817,11 @@ 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 )
{
- qCWarning(OkularCoreDebug).nospace() << "Invalid plugin factory for " << service->library() << "!";
+ qCWarning(OkularCoreDebug).nospace() << "Invalid plugin factory for " << service->library() << ":" << loader.errorString();
return 0;
}