Skip to content

Commit c20d03a

Browse files
author
timlinux
committedDec 4, 2006
Use the new QLibrary::errorString() to try to show why a lib could not 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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/gui/qgisapp.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,7 @@ void QgisApp::restoreSessionPlugins(QString thePluginDirString)
13851385
#endif
13861386

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

37113713
switch (pType())
37123714
{
3713-
case QgisPlugin::RENDERER:
3714-
case QgisPlugin::UI:
3715+
case QgisPlugin::RENDERER:
3716+
case QgisPlugin::UI:
37153717
{
37163718
// UI only -- doesn't use mapcanvas
37173719
create_ui *cf = (create_ui *) myLib->resolve("classFactory");

0 commit comments

Comments
 (0)
Please sign in to comment.