diff --git a/examples/quick/dialogs/systemdialogs/MessageDialogs.qml b/examples/quick/dialogs/systemdialogs/MessageDialogs.qml
index e6fdf57e0de5b971a1eff8f102b968a71fb6921c..9c7022804631ab2255dff35815ac49eb22bee0bc 100644
--- a/examples/quick/dialogs/systemdialogs/MessageDialogs.qml
+++ b/examples/quick/dialogs/systemdialogs/MessageDialogs.qml
@@ -61,12 +61,12 @@ Rectangle {
         detailedText: customizeDetailedText.checked ? detailedTextField.text : ""
         onButtonClicked: console.log("clicked button " + clickedButton)
         onAccepted: lastChosen.text = "Accepted " +
-            (clickedButton == Message.Ok ? "(OK)" : (clickedButton == Message.Retry ? "(Retry)" : "(Ignore)"))
+            (clickedButton == StandardButton.Ok ? "(OK)" : (clickedButton == StandardButton.Retry ? "(Retry)" : "(Ignore)"))
         onRejected: lastChosen.text = "Rejected " +
-            (clickedButton == Message.Close ? "(Close)" : (clickedButton == Message.Abort ? "(Abort)" : "(Cancel)"))
+            (clickedButton == StandardButton.Close ? "(Close)" : (clickedButton == StandardButton.Abort ? "(Abort)" : "(Cancel)"))
         onHelp: lastChosen.text = "Yelped for help!"
-        onYes: lastChosen.text = (clickedButton == Message.Yes ? "Yeessss!!" : "Yes, now and always")
-        onNo: lastChosen.text = (clickedButton == Message.No ? "Oh No." : "No, no, a thousand times no!")
+        onYes: lastChosen.text = (clickedButton == StandardButton.Yes ? "Yeessss!!" : "Yes, now and always")
+        onNo: lastChosen.text = (clickedButton == StandardButton.No ? "Oh No." : "No, no, a thousand times no!")
         onApply: lastChosen.text = "Apply"
         onReset: lastChosen.text = "Reset"
     }
@@ -105,7 +105,7 @@ Rectangle {
             function updateIcon(icon, checked) {
                 if (updating) return
                 updating = true
-                messageDialog.icon = (checked ? icon : Message.NoIcon)
+                messageDialog.icon = (checked ? icon : StandardIcon.NoIcon)
                 for (var i = 0; i < children.length; ++i)
                     if (children[i].icon !== icon)
                         children[i].checked = false
@@ -115,7 +115,7 @@ Rectangle {
             CheckBox {
                 id: iconInformation
                 text: "Information"
-                property int icon: Message.Information
+                property int icon: StandardIcon.Information
                 onCheckedChanged: parent.updateIcon(icon, checked)
             }
 
@@ -123,7 +123,7 @@ Rectangle {
                 id: iconWarning
                 text: "Warning"
                 checked: true
-                property int icon: Message.Warning
+                property int icon: StandardIcon.Warning
                 onCheckedChanged: parent.updateIcon(icon, checked)
                 Component.onCompleted: parent.updateIcon(icon, true)
             }
@@ -131,14 +131,14 @@ Rectangle {
             CheckBox {
                 id: iconCritical
                 text: "Critical"
-                property int icon: Message.Critical
+                property int icon: StandardIcon.Critical
                 onCheckedChanged: parent.updateIcon(icon, checked)
             }
 
             CheckBox {
                 id: iconQuestion
                 text: "Question"
-                property int icon: Message.Question
+                property int icon: StandardIcon.Question
                 onCheckedChanged: parent.updateIcon(icon, checked)
             }
         }
@@ -182,75 +182,75 @@ Rectangle {
                     if (children[i].checked)
                         buttons |= children[i].button
                 if (!buttons)
-                    buttons = Message.Ok
+                    buttons = StandardButton.Ok
                 messageDialog.standardButtons = buttons
                 updating = false
             }
 
             CheckBox {
                 text: "Help"
-                property int button: Message.Help
+                property int button: StandardButton.Help
                 onCheckedChanged: parent.updateButtons(button, checked)
             }
 
             CheckBox {
                 text: "Abort"
-                property int button: Message.Abort
+                property int button: StandardButton.Abort
                 onCheckedChanged: parent.updateButtons(button, checked)
             }
 
             CheckBox {
                 text: "Close"
-                property int button: Message.Close
+                property int button: StandardButton.Close
                 onCheckedChanged: parent.updateButtons(button, checked)
             }
 
             CheckBox {
                 text: "Cancel"
-                property int button: Message.Cancel
+                property int button: StandardButton.Cancel
                 onCheckedChanged: parent.updateButtons(button, checked)
             }
 
             CheckBox {
                 text: "NoToAll"
-                property int button: Message.NoToAll
+                property int button: StandardButton.NoToAll
                 onCheckedChanged: parent.updateButtons(button, checked)
             }
 
             CheckBox {
                 text: "No"
-                property int button: Message.No
+                property int button: StandardButton.No
                 onCheckedChanged: parent.updateButtons(button, checked)
             }
 
             CheckBox {
                 text: "YesToAll"
-                property int button: Message.YesToAll
+                property int button: StandardButton.YesToAll
                 onCheckedChanged: parent.updateButtons(button, checked)
             }
 
             CheckBox {
                 text: "Yes"
-                property int button: Message.Yes
+                property int button: StandardButton.Yes
                 onCheckedChanged: parent.updateButtons(button, checked)
             }
 
             CheckBox {
                 text: "Ignore"
-                property int button: Message.Ignore
+                property int button: StandardButton.Ignore
                 onCheckedChanged: parent.updateButtons(button, checked)
             }
 
             CheckBox {
                 text: "Retry"
-                property int button: Message.Retry
+                property int button: StandardButton.Retry
                 onCheckedChanged: parent.updateButtons(button, checked)
             }
 
             CheckBox {
                 text: "OK"
                 checked: true
-                property int button: Message.Ok
+                property int button: StandardButton.Ok
                 onCheckedChanged: parent.updateButtons(button, checked)
             }
         }
diff --git a/src/imports/dialogs/dialogs.pro b/src/imports/dialogs/dialogs.pro
index e6ca7a214783bda2566a3b0cbf43f2a7791e1d79..1abad55883003aaaa42c7217bfb4bfd2b31e92f8 100644
--- a/src/imports/dialogs/dialogs.pro
+++ b/src/imports/dialogs/dialogs.pro
@@ -25,7 +25,7 @@ HEADERS += \
     qquickabstractmessagedialog_p.h \
     qquickplatformmessagedialog_p.h \
     qquickmessagedialog_p.h \
-    qquickmessageattached_p.h \
+    qquickdialogassets_p.h \
     qquickabstractfiledialog_p.h \
     qquickplatformfiledialog_p.h \
     qquickfiledialog_p.h \
diff --git a/src/imports/dialogs/plugin.cpp b/src/imports/dialogs/plugin.cpp
index 1c852abae957f14161e1e75bc4af4b6dc43c6858..c85d270c6ed0b150eb01ad181f90a368882304df 100644
--- a/src/imports/dialogs/plugin.cpp
+++ b/src/imports/dialogs/plugin.cpp
@@ -43,7 +43,7 @@
 #include <QtQml/qqmlextensionplugin.h>
 #include "qquickmessagedialog_p.h"
 #include "qquickabstractmessagedialog_p.h"
-#include "qquickmessageattached_p.h"
+#include "qquickdialogassets_p.h"
 #include "qquickplatformmessagedialog_p.h"
 #include "qquickfiledialog_p.h"
 #include "qquickabstractfiledialog_p.h"
@@ -122,7 +122,10 @@ public:
         // Otherwise fall back to a pure-QML implementation.
 
         // MessageDialog
-        qmlRegisterUncreatableType<QQuickMessageAttached>(uri, 1, 1, "Message", QQuickMessageAttached::tr("Message can only be used via the attached property."));
+        qmlRegisterUncreatableType<QQuickStandardButton>(uri, 1, 1, "StandardButton",
+            QLatin1String("Do not create objects of type StandardButton"));
+        qmlRegisterUncreatableType<QQuickStandardIcon>(uri, 1, 1, "StandardIcon",
+            QLatin1String("Do not create objects of type StandardIcon"));
 #ifndef PURE_QML_ONLY
         if (QGuiApplicationPrivate::platformTheme()->usePlatformNativeDialog(QPlatformTheme::MessageDialog))
             qmlRegisterType<QQuickPlatformMessageDialog>(uri, 1, 0, "MessageDialog");
diff --git a/src/imports/dialogs/qquickmessageattached_p.h b/src/imports/dialogs/qquickdialogassets_p.h
similarity index 82%
rename from src/imports/dialogs/qquickmessageattached_p.h
rename to src/imports/dialogs/qquickdialogassets_p.h
index c1cb94ae362d323c14601a586287e6c96751f3a1..406b68a66d4b5f93c91c598e7cd1e8fce4024ee3 100644
--- a/src/imports/dialogs/qquickmessageattached_p.h
+++ b/src/imports/dialogs/qquickdialogassets_p.h
@@ -39,8 +39,8 @@
 **
 ****************************************************************************/
 
-#ifndef QQUICKMESSAGEATTACHED_H
-#define QQUICKMESSAGEATTACHED_H
+#ifndef QQUICKDIALOGASSETS_P_H
+#define QQUICKDIALOGASSETS_P_H
 
 #include <private/qtquickglobal_p.h>
 #include <QtGui/qpa/qplatformdialoghelper.h>
@@ -48,22 +48,18 @@
 
 QT_BEGIN_NAMESPACE
 
-class Q_DECL_EXPORT QQuickMessageAttached : public QObject
+class QQuickStandardButton
 {
-    Q_OBJECT
-    Q_ENUMS(QQuickAbstractMessageDialog::Icon)
+    Q_GADGET
     Q_ENUMS(QQuickAbstractMessageDialog::StandardButton)
+};
 
-public:
-    static QQuickMessageAttached *qmlAttachedProperties(QObject *obj) {
-        return new QQuickMessageAttached(obj); }
-
-    QQuickMessageAttached(QObject *parent = 0) : QObject(parent) { }
+class QQuickStandardIcon
+{
+    Q_GADGET
+    Q_ENUMS(QQuickAbstractMessageDialog::Icon)
 };
 
 QT_END_NAMESPACE
 
-QML_DECLARE_TYPE(QQuickMessageAttached)
-QML_DECLARE_TYPEINFO(QQuickMessageAttached, QML_HAS_ATTACHED_PROPERTIES)
-
-#endif // QQUICKMESSAGEATTACHED_H
+#endif // QQUICKDIALOGASSETS_P_H