Skip to content

Commit

Permalink
Use the new QLibrary::errorString() to try to show why a lib could no…
Browse files Browse the repository at this point in the history
…t load (for what its worth...)

Also use lazy binding in library load

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6180 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Dec 4, 2006
1 parent ad325bc commit c20d03a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/qgisapp.cpp
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit c20d03a

Please sign in to comment.