[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/graphics/okular
From: Pino Toscano <toscano.pino () tiscali ! it>
Date: 2006-06-27 9:15:36
Message-ID: 1151399736.326099.6175.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 555381 by pino:
slightly improve
M +13 -8 part.cpp
--- trunk/playground/graphics/okular/part.cpp #555380:555381
@@ -28,7 +28,6 @@
#include <qlabel.h>
#include <kvbox.h>
#include <qtoolbox.h>
-#include <qpushbutton.h>
#include <kaction.h>
#include <kactioncollection.h>
#include <kdirwatch.h>
@@ -385,26 +384,32 @@
int count=offers.count();
if (count > 0)
{
+ KLibLoader *loader = KLibLoader::self();
+ if (!loader)
+ {
+ kWarning() << "Could not start library loader: '" << \
loader->lastErrorMessage() << "'." << endl; + return;
+ }
for (int i=0;i<count;i++)
{
propName=offers[i]->property("Name").toString();
// dont load already loaded generators
if (! m_loadedGenerators.take( propName ) )
{
- KLibLoader *loader = KLibLoader::self();
- if (!loader)
- {
- kWarning() << "Could not start library loader: '" << \
loader->lastErrorMessage() << "'." << endl;
- return;
- }
KLibrary *lib = loader->globalLibrary( QFile::encodeName( \
offers[i]->library() ) ); if (!lib)
{
kWarning() << "Could not load '" << offers[i]->library() << "' \
library." << endl;
- return;
+ continue;
}
Generator* (*create_plugin)(KPDFDocument* doc) = ( Generator* \
(*)(KPDFDocument* doc) ) lib->symbol( "create_plugin" ); + if ( \
!create_plugin ) + {
+ kWarning() << "Library '" << offers.at(i)->library() << "' has no \
symbol 'create_plugin'." << endl; + continue;
+ }
+
// the generator should do anything with the document if we are only \
configuring
m_loadedGenerators.insert(propName,create_plugin(m_document));
m_generatorsWithSettings << propName;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic