From 9467bdc9093d9b02e249c6cce508b9df3ff8b2f4 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 20 Jun 2016 15:16:55 -0700 Subject: Update QLibrary's debug output when loading failed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Oswald Buddenhagen --- src/corelib/plugin/qlibrary.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/corelib/plugin/qlibrary.cpp') 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 -- cgit v1.2.3