Commit f3d17dd6 authored by Robin Burchell's avatar Robin Burchell Committed by Robin Burchell
Browse files

UIDelegatesManager: Always print errors if component loading fails.


This setting is useful when developing a new UI set, and one may not initially
know about the suppression of errors, which is a painful problem to run into.

Furthermore, make sure to delete the failed component so that subsequent
attempted use of it doesn't succeed if UI_DELEGATES_DEBUG isn't enabled.

Change-Id: I3d2abc19fb4a007d06795d2e8149ae78d7c9c020
Reviewed-by: default avatarPierre Rossi <pierre.rossi@theqtcompany.com>
Showing with 3 additions and 3 deletions
......@@ -173,10 +173,10 @@ bool UIDelegatesManager::ensureComponentLoaded(ComponentType type)
*component = (new QQmlComponent(engine, QUrl::fromLocalFile(fi.absoluteFilePath()), QQmlComponent::PreferSynchronous, m_view));
if ((*component)->status() != QQmlComponent::Ready) {
#ifdef UI_DELEGATES_DEBUG
Q_FOREACH (const QQmlError& err, (*component)->errors())
fprintf(stderr, " component error: %s\n", qPrintable(err.toString()));
#endif
qWarning("QtWebEngine: component error: %s\n", qPrintable(err.toString()));
delete *component;
*component = 0;
return false;
}
return true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment