summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-06-20 15:16:55 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-07-20 00:41:29 +0000
commit9467bdc9093d9b02e249c6cce508b9df3ff8b2f4 (patch)
treeb821f85a01903c683c0aee03998940fa4325da72 /src/corelib/plugin
parent62cbb434579a56871f0917bc306d592055381c00 (diff)
Update QLibrary's debug output when loading failed
We were printing 'loaded library "xxx"' even when ret == false, which was misleading. So instead print the error string. Change-Id: Ib57b52598e2f452985e9fffd1459ea860ed2dfcf Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r--src/corelib/plugin/qlibrary.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index f7e57461e3..2b6c983cb8 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -536,8 +536,13 @@ bool QLibraryPrivate::load()
return false;
bool ret = load_sys();
- if (qt_debug_component())
- qDebug() << "loaded library" << fileName;
+ if (qt_debug_component()) {
+ if (ret) {
+ qDebug() << "loaded library" << fileName;
+ } else {
+ qDebug() << qUtf8Printable(errorString);
+ }
+ }
if (ret) {
//when loading a library we add a reference to it so that the QLibraryPrivate won't get deleted
//this allows to unload the library at a later time