summaryrefslogtreecommitdiff
path: root/src/dialogs/qquickabstractdialog.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-16 07:02:56 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-02-16 07:02:56 +0100
commit1d61e0052b6a94546f264c3a37a19db09003d7c8 (patch)
tree9311e07960d5b08e9948b615f992c36e7bce1cf9 /src/dialogs/qquickabstractdialog.cpp
parent571a44a4dde8f047773f4e91a4a6941cb4cdf212 (diff)
parent67041bbc667a10ae14a15ed8755b2b1bbf91b686 (diff)
downloadqtquickcontrols-1d61e0052b6a94546f264c3a37a19db09003d7c8.tar.gz
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: .qmake.conf src/dialogs/qquickabstractfiledialog.cpp src/dialogs/qquickfiledialog.cpp Change-Id: I60aab7c7e819f82f82fc30f473b36a7a57d9a91a
Diffstat (limited to 'src/dialogs/qquickabstractdialog.cpp')
-rw-r--r--src/dialogs/qquickabstractdialog.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dialogs/qquickabstractdialog.cpp b/src/dialogs/qquickabstractdialog.cpp
index 53bdef8c..afc27b77 100644
--- a/src/dialogs/qquickabstractdialog.cpp
+++ b/src/dialogs/qquickabstractdialog.cpp
@@ -192,7 +192,7 @@ void QQuickAbstractDialog::setVisible(bool v)
}
}
if (m_windowDecoration) {
- m_windowDecoration->setProperty("dismissOnOuterClick", (m_modality == Qt::NonModal));
+ setDecorationDismissBehavior();
m_windowDecoration->setVisible(v);
} else if (m_dialogWindow) {
if (v) {
@@ -223,6 +223,7 @@ void QQuickAbstractDialog::decorationLoaded()
QVariant contentVariant;
contentVariant.setValue<QQuickItem*>(m_contentItem);
m_windowDecoration->setProperty("content", contentVariant);
+ setDecorationDismissBehavior();
connect(m_windowDecoration, SIGNAL(dismissed()), this, SLOT(reject()));
ok = true;
qCDebug(lcWindow) << "using synthetic window decoration" << m_windowDecoration << "from" << m_decorationComponent->url();
@@ -312,6 +313,11 @@ QQuickWindow *QQuickAbstractDialog::parentWindow()
return m_parentWindow;
}
+void QQuickAbstractDialog::setDecorationDismissBehavior()
+{
+ m_windowDecoration->setProperty("dismissOnOuterClick", (m_modality == Qt::NonModal));
+}
+
void QQuickAbstractDialog::setContentItem(QQuickItem *obj)
{
m_contentItem = obj;