diff options
author | Robin Burchell <robin.burchell@theqtcompany.com> | 2015-01-05 16:36:57 +0100 |
---|---|---|
committer | Robin Burchell <robin.burchell@viroteck.net> | 2015-01-06 11:38:47 +0100 |
commit | 16f3ed8044857c881d23a35b3ef8efc12ad72201 (patch) | |
tree | 16b7bee5f42ea6ad21886a353323ca5d2b9719ab /src | |
parent | f3d17dd6e77c297543868ad67f009cc01116ac39 (diff) |
UIDelegatesManager: Communicate load failure back to the dialog controller.
If the dialog controller has asked to show a dialog, then if we cannot show a
dialog, we should reject its request.
Not doing this results in the WebView becoming frozen for input if the load
fails, seemingly.
Change-Id: I7dddd5357c712f896499cdebb142e60b5e80b4f2
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/webengine/ui_delegates_manager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp index 637f3ea36..e2f3855f4 100644 --- a/src/webengine/ui_delegates_manager.cpp +++ b/src/webengine/ui_delegates_manager.cpp @@ -296,8 +296,12 @@ void UIDelegatesManager::showDialog(QSharedPointer<JavaScriptDialogController> d Q_UNREACHABLE(); } - if (!ensureComponentLoaded(dialogComponentType)) + if (!ensureComponentLoaded(dialogComponentType)) { + // Let the controller know it couldn't be loaded + qWarning("Failed to load dialog, rejecting."); + dialogController->reject(); return; + } QQmlComponent *dialogComponent = Q_NULLPTR; switch (dialogComponentType) { |