summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2016-10-06 16:12:47 +0200
committerMichal Klocek <michal.klocek@qt.io>2016-10-28 07:28:49 +0000
commit824f35baf639ae6db8e2e732b0ab8d3fbbf73994 (patch)
tree1f6cb4c29c7f92183c9e069f2754a798850d0a0f
parentac3d8780a0293793dbc3cd47b96aab4613dec5d9 (diff)
Fix Q_ASSERT when m_messageBubbleItem is not created
When custom dialogs are created for FormValidationRequest, it is possible to accept Show request but reject Move request, in that case default MessageBubbleItem is not created and request should be ignored. Change-Id: I5f168802a66d88baa68d76396a073b5ff6517542 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
-rw-r--r--src/webengine/ui_delegates_manager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp
index 6896b850d..a37484023 100644
--- a/src/webengine/ui_delegates_manager.cpp
+++ b/src/webengine/ui_delegates_manager.cpp
@@ -523,7 +523,8 @@ void UIDelegatesManager::hideMessageBubble()
void UIDelegatesManager::moveMessageBubble(const QRect &anchor)
{
- Q_ASSERT(!m_messageBubbleItem.isNull());
+ if (m_messageBubbleItem.isNull())
+ return;
QQmlProperty(m_messageBubbleItem.data(), QStringLiteral("x")).write(anchor.x());
QQmlProperty(m_messageBubbleItem.data(), QStringLiteral("y")).write(anchor.y() + anchor.size().height());