From e17ae3b8b716b00c7cb6156347101f2e789dbd58 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 4 Nov 2013 14:56:34 +0100 Subject: Replace Message attached property with gadget types This is a more efficient way to expose the StandardButton and StandardIcon enums. Change-Id: I9d0becf54be2a883d55c9eaeaf10b83b23e59f3c Reviewed-by: Gabriel de Dietrich Reviewed-by: Alan Alpert --- src/imports/dialogs/plugin.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/imports/dialogs/plugin.cpp') diff --git a/src/imports/dialogs/plugin.cpp b/src/imports/dialogs/plugin.cpp index 1c852abae9..c85d270c6e 100644 --- a/src/imports/dialogs/plugin.cpp +++ b/src/imports/dialogs/plugin.cpp @@ -43,7 +43,7 @@ #include #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(uri, 1, 1, "Message", QQuickMessageAttached::tr("Message can only be used via the attached property.")); + qmlRegisterUncreatableType(uri, 1, 1, "StandardButton", + QLatin1String("Do not create objects of type StandardButton")); + qmlRegisterUncreatableType(uri, 1, 1, "StandardIcon", + QLatin1String("Do not create objects of type StandardIcon")); #ifndef PURE_QML_ONLY if (QGuiApplicationPrivate::platformTheme()->usePlatformNativeDialog(QPlatformTheme::MessageDialog)) qmlRegisterType(uri, 1, 0, "MessageDialog"); -- cgit v1.2.3