aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcustomparser_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-09-14 21:23:32 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-09-21 19:59:27 +0000
commitb7738beda651c2927e1a9d58c592148b1dc99576 (patch)
tree55d62516410088f22885ff551d57fff5ae50a5bc /src/qml/qml/qqmlcustomparser_p.h
parentba7edffda3f360955825c3ef886ec232c0b2022b (diff)
Make QML composite types inherit enums
Problem: in Qt Quick Controls 2, enums declared in the abstract C++ base types were not accessible with the concrete QML type name, but had to be referenced using the base type name: Slider { snapMode: AbstractSlider.SnapOnRelease } Solution: this change resolves the C++ base type and creates the missing link between the composite type and its base type's meta- object. This allows referencing enums using the concrete/composite QML type name: Slider { snapMode: Slider.SnapOnRelease } Change-Id: Icefdec91b012b12728367fd54b4d16796233ee12 Task-number: QTBUG-43582 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlcustomparser_p.h')
-rw-r--r--src/qml/qml/qqmlcustomparser_p.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlcustomparser_p.h b/src/qml/qml/qqmlcustomparser_p.h
index dd461ba299..8bdc73fab1 100644
--- a/src/qml/qml/qqmlcustomparser_p.h
+++ b/src/qml/qml/qqmlcustomparser_p.h
@@ -56,6 +56,7 @@ QT_BEGIN_NAMESPACE
class QQmlCompiledData;
class QQmlPropertyValidator;
+class QQmlEnginePrivate;
class Q_QML_PRIVATE_EXPORT QQmlCustomParser
{
@@ -67,8 +68,8 @@ public:
};
Q_DECLARE_FLAGS(Flags, Flag)
- QQmlCustomParser() : validator(0), m_flags(NoFlag) {}
- QQmlCustomParser(Flags f) : validator(0), m_flags(f) {}
+ QQmlCustomParser() : engine(0), validator(0), m_flags(NoFlag) {}
+ QQmlCustomParser(Flags f) : engine(0), validator(0), m_flags(f) {}
virtual ~QQmlCustomParser() {}
void clearErrors();
@@ -92,6 +93,7 @@ protected:
private:
QList<QQmlError> exceptions;
+ QQmlEnginePrivate *engine;
const QQmlPropertyValidator *validator;
Flags m_flags;
QBiPointer<const QQmlImports, QQmlTypeNameCache> imports;