Skip to content
Permalink
Browse files

Use the new QLibrary::errorString() to try to show why a lib could no…

…t load (for what its worth...)

Also use lazy binding in library load

git-svn-id: http://svn.osgeo.org/qgis/trunk@6180 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Dec 4, 2006
1 parent 87a3dac commit 33a5efac05f38a16475cfb0eb96df49c6ba3d57e
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/gui/qgisapp.cpp
@@ -1385,6 +1385,7 @@ void QgisApp::restoreSessionPlugins(QString thePluginDirString)
#endif

QLibrary *myLib = new QLibrary(myFullPath);
myLib->setLoadHints(QLibrary::ExportExternalSymbolsHint | QLibrary::ResolveAllSymbolsHint);
bool loaded = myLib->load();
if (loaded)
{
@@ -1422,6 +1423,7 @@ void QgisApp::restoreSessionPlugins(QString thePluginDirString)
else
{
std::cerr << "Failed to load " << myLib->library().toLocal8Bit().data() << std::endl;
std::cerr << "Reason: " << myLib->errorString().toLocal8Bit().data() << std::endl;
}
delete myLib;
}
@@ -3710,8 +3712,8 @@ void QgisApp::loadPlugin(QString name, QString description, QString theFullPathN

switch (pType())
{
case QgisPlugin::RENDERER:
case QgisPlugin::UI:
case QgisPlugin::RENDERER:
case QgisPlugin::UI:
{
// UI only -- doesn't use mapcanvas
create_ui *cf = (create_ui *) myLib->resolve("classFactory");

0 comments on commit 33a5efa

Please sign in to comment.
You can’t perform that action at this time.