Declare StandardButton & ButtonRole types for cross-thread use.
authorSamuel Nevala <samuel.nevala@intopalo.com>
Wed, 26 Aug 2015 12:30:36 +0000 (15:30 +0300)
committerSamuel Nevala <samuel.nevala@intopalo.com>
Mon, 31 Aug 2015 11:57:48 +0000 (11:57 +0000)
On windows phone native dialog interaction is handled from
XMAL thread. Declare and register dialog helpers StandardButton
and ButtonRole for cross-thread usage.

Change-Id: Ic1842a5af8a1122fdffb766b4f723d272bdbcac2
Task-Id: QTBUG-47941
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
src/gui/kernel/qplatformdialoghelper.cpp
src/gui/kernel/qplatformdialoghelper.h

index 20dc716d8964ecbd7daed47eb9c8321afc614edc..f69efe09354eec07bf8434778c899d221b0ff401 100644 (file)
@@ -119,6 +119,8 @@ static const int buttonRoleLayouts[2][5][14] =
 
 QPlatformDialogHelper::QPlatformDialogHelper()
 {
+    qRegisterMetaType<StandardButton>();
+    qRegisterMetaType<ButtonRole>();
 }
 
 QPlatformDialogHelper::~QPlatformDialogHelper()
index ec88770862a964c270e331290dcda34221be5054..936dbdfa89911a5e994f40910dd04506dd6811c6 100644 (file)
@@ -160,6 +160,11 @@ Q_SIGNALS:
     void reject();
 };
 
+QT_END_NAMESPACE
+Q_DECLARE_METATYPE(QPlatformDialogHelper::StandardButton)
+Q_DECLARE_METATYPE(QPlatformDialogHelper::ButtonRole)
+QT_BEGIN_NAMESPACE
+
 class Q_GUI_EXPORT QColorDialogOptions
 {
 public: