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>
This commit is contained in:
parent
62cbb43457
commit
9467bdc909
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user