diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2016-06-20 15:16:55 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2016-07-20 00:41:29 +0000 |
commit | 9467bdc9093d9b02e249c6cce508b9df3ff8b2f4 (patch) | |
tree | b821f85a01903c683c0aee03998940fa4325da72 /src | |
parent | 62cbb434579a56871f0917bc306d592055381c00 (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')
-rw-r--r-- | src/corelib/plugin/qlibrary.cpp | 9 |
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 |