1 /****************************************************************************
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
6 ** This file is part of the test suite of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** GNU Lesser General Public License Usage
10 ** This file may be used under the terms of the GNU Lesser General Public
11 ** License version 2.1 as published by the Free Software Foundation and
12 ** appearing in the file LICENSE.LGPL included in the packaging of this
13 ** file. Please review the following information to ensure the GNU Lesser
14 ** General Public License version 2.1 requirements will be met:
15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17 ** In addition, as a special exception, Nokia gives you certain additional
18 ** rights. These rights are described in the Nokia Qt LGPL Exception
19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
21 ** GNU General Public License Usage
22 ** Alternatively, this file may be used under the terms of the GNU General
23 ** Public License version 3.0 as published by the Free Software Foundation
24 ** and appearing in the file LICENSE.GPL included in the packaging of this
25 ** file. Please review the following information to ensure the GNU General
26 ** Public License version 3.0 requirements will be met:
27 ** http://www.gnu.org/copyleft/gpl.html.
30 ** Alternatively, this file may be used in accordance with the terms and
31 ** conditions contained in a signed written agreement between you and Nokia.
40 ****************************************************************************/
44 #include <QtCore/qobject.h>
45 #include <QtCore/qrect.h>
46 #include <QtCore/qdatetime.h>
47 #include <QtGui/qmatrix.h>
48 #include <QtGui/qcolor.h>
49 #include <QtGui/qvector3d.h>
50 #include <QtGui/qvector4d.h>
51 #include <QtQml/qqml.h>
52 #include <QtQml/qqmlcomponent.h>
53 #include <QtQml/qqmlparserstatus.h>
54 #include <QtQml/qqmlpropertyvaluesource.h>
55 #include <QtQml/qqmlscriptstring.h>
56 #include <QtQml/qqmlproperty.h>
58 #include <private/qqmlcustomparser_p.h>
60 QVariant myCustomVariantTypeConverter(const QString &data);
65 MyInterface() : id(913) {}
70 #define MyInterface_iid "org.qt-project.Qt.Test.MyInterface"
71 Q_DECLARE_INTERFACE(MyInterface, MyInterface_iid);
73 QML_DECLARE_INTERFACE(MyInterface);
75 struct MyCustomVariantType
77 MyCustomVariantType() : a(0) {}
80 Q_DECLARE_METATYPE(MyCustomVariantType);
82 class MyAttachedObject : public QObject
85 Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged)
86 Q_PROPERTY(int value2 READ value2 WRITE setValue2)
88 MyAttachedObject(QObject *parent) : QObject(parent), m_value(0), m_value2(0) {}
90 int value() const { return m_value; }
91 void setValue(int v) { if (m_value != v) { m_value = v; emit valueChanged(); } }
93 int value2() const { return m_value2; }
94 void setValue2(int v) { m_value2 = v; }
104 class MyQmlObject : public QObject, public MyInterface
107 Q_PROPERTY(int value READ value WRITE setValue FINAL)
108 Q_PROPERTY(QString readOnlyString READ readOnlyString)
109 Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
110 Q_PROPERTY(QRect rect READ rect WRITE setRect)
111 Q_PROPERTY(QMatrix matrix READ matrix WRITE setMatrix) //assumed to be unsupported by QML
112 Q_PROPERTY(MyInterface *interfaceProperty READ interface WRITE setInterface)
113 Q_PROPERTY(int onLiteralSignal READ onLiteralSignal WRITE setOnLiteralSignal)
114 Q_PROPERTY(MyCustomVariantType customType READ customType WRITE setCustomType)
115 Q_PROPERTY(MyQmlObject *qmlobjectProperty READ qmlobject WRITE setQmlobject)
116 Q_PROPERTY(int propertyWithNotify READ propertyWithNotify WRITE setPropertyWithNotify NOTIFY oddlyNamedNotifySignal)
117 Q_PROPERTY(int nonScriptable READ nonScriptable WRITE setNonScriptable SCRIPTABLE false)
119 Q_INTERFACES(MyInterface)
121 MyQmlObject() : m_value(-1), m_interface(0), m_qmlobject(0) { qRegisterMetaType<MyCustomVariantType>("MyCustomVariantType"); }
123 int value() const { return m_value; }
124 void setValue(int v) { m_value = v; }
126 QString readOnlyString() const { return QLatin1String(""); }
128 bool enabled() const { return false; }
129 void setEnabled(bool) {}
131 QRect rect() const { return QRect(); }
132 void setRect(const QRect&) {}
134 QMatrix matrix() const { return QMatrix(); }
135 void setMatrix(const QMatrix&) {}
137 MyInterface *interface() const { return m_interface; }
138 void setInterface(MyInterface *iface) { m_interface = iface; }
140 static MyAttachedObject *qmlAttachedProperties(QObject *other) {
141 return new MyAttachedObject(other);
143 Q_CLASSINFO("DefaultMethod", "basicSlot()")
145 int onLiteralSignal() const { return m_value; }
146 void setOnLiteralSignal(int v) { m_value = v; }
148 MyQmlObject *qmlobject() const { return m_qmlobject; }
149 void setQmlobject(MyQmlObject *o) { m_qmlobject = o; }
151 MyCustomVariantType customType() const { return m_custom; }
152 void setCustomType(const MyCustomVariantType &v) { m_custom = v; }
154 int propertyWithNotify() const { return m_propertyWithNotify; }
155 void setPropertyWithNotify(int i) { m_propertyWithNotify = i; emit oddlyNamedNotifySignal(); }
157 int nonScriptable() const { return 0; }
158 void setNonScriptable(int) {}
160 void basicSlot() { qWarning("MyQmlObject::basicSlot"); }
161 void basicSlotWithArgs(int v) { qWarning("MyQmlObject::basicSlotWithArgs(%d)", v); }
165 void basicParameterizedSignal(int parameter);
166 void oddlyNamedNotifySignal();
169 friend class tst_qqmllanguage;
171 MyInterface *m_interface;
172 MyQmlObject *m_qmlobject;
173 MyCustomVariantType m_custom;
174 int m_propertyWithNotify;
176 QML_DECLARE_TYPE(MyQmlObject)
177 QML_DECLARE_TYPEINFO(MyQmlObject, QML_HAS_ATTACHED_PROPERTIES)
179 class MyGroupedObject : public QObject
182 Q_PROPERTY(QQmlScriptString script READ script WRITE setScript)
183 Q_PROPERTY(int value READ value WRITE setValue)
185 QQmlScriptString script() const { return m_script; }
186 void setScript(const QQmlScriptString &s) { m_script = s; }
188 int value() const { return m_value; }
189 void setValue(int v) { m_value = v; }
193 QQmlScriptString m_script;
197 class MyTypeObject : public QObject
203 Q_PROPERTY(QString id READ id WRITE setId)
204 Q_PROPERTY(QObject *objectProperty READ objectProperty WRITE setObjectProperty)
205 Q_PROPERTY(QQmlComponent *componentProperty READ componentProperty WRITE setComponentProperty)
206 Q_PROPERTY(MyFlags flagProperty READ flagProperty WRITE setFlagProperty)
207 Q_PROPERTY(MyEnum enumProperty READ enumProperty WRITE setEnumProperty)
208 Q_PROPERTY(MyEnum readOnlyEnumProperty READ readOnlyEnumProperty)
209 Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty)
210 Q_PROPERTY(uint uintProperty READ uintProperty WRITE setUintProperty)
211 Q_PROPERTY(int intProperty READ intProperty WRITE setIntProperty)
212 Q_PROPERTY(qreal realProperty READ realProperty WRITE setRealProperty)
213 Q_PROPERTY(double doubleProperty READ doubleProperty WRITE setDoubleProperty)
214 Q_PROPERTY(float floatProperty READ floatProperty WRITE setFloatProperty)
215 Q_PROPERTY(QColor colorProperty READ colorProperty WRITE setColorProperty)
216 Q_PROPERTY(QDate dateProperty READ dateProperty WRITE setDateProperty)
217 Q_PROPERTY(QTime timeProperty READ timeProperty WRITE setTimeProperty)
218 Q_PROPERTY(QDateTime dateTimeProperty READ dateTimeProperty WRITE setDateTimeProperty)
219 Q_PROPERTY(QPoint pointProperty READ pointProperty WRITE setPointProperty)
220 Q_PROPERTY(QPointF pointFProperty READ pointFProperty WRITE setPointFProperty)
221 Q_PROPERTY(QSize sizeProperty READ sizeProperty WRITE setSizeProperty)
222 Q_PROPERTY(QSizeF sizeFProperty READ sizeFProperty WRITE setSizeFProperty)
223 Q_PROPERTY(QRect rectProperty READ rectProperty WRITE setRectProperty NOTIFY rectPropertyChanged)
224 Q_PROPERTY(QRect rectProperty2 READ rectProperty2 WRITE setRectProperty2)
225 Q_PROPERTY(QRectF rectFProperty READ rectFProperty WRITE setRectFProperty)
226 Q_PROPERTY(bool boolProperty READ boolProperty WRITE setBoolProperty)
227 Q_PROPERTY(QVariant variantProperty READ variantProperty WRITE setVariantProperty)
228 Q_PROPERTY(QVector3D vectorProperty READ vectorProperty WRITE setVectorProperty)
229 Q_PROPERTY(QVector4D vector4Property READ vector4Property WRITE setVector4Property)
230 Q_PROPERTY(QUrl urlProperty READ urlProperty WRITE setUrlProperty)
232 Q_PROPERTY(QQmlScriptString scriptProperty READ scriptProperty WRITE setScriptProperty)
233 Q_PROPERTY(MyGroupedObject *grouped READ grouped CONSTANT)
234 Q_PROPERTY(MyGroupedObject *nullGrouped READ nullGrouped CONSTANT)
238 : objectPropertyValue(0), componentPropertyValue(0) {}
244 void setId(const QString &v) {
248 QObject *objectPropertyValue;
249 QObject *objectProperty() const {
250 return objectPropertyValue;
252 void setObjectProperty(QObject *v) {
253 objectPropertyValue = v;
256 QQmlComponent *componentPropertyValue;
257 QQmlComponent *componentProperty() const {
258 return componentPropertyValue;
260 void setComponentProperty(QQmlComponent *v) {
261 componentPropertyValue = v;
264 enum MyFlag { FlagVal1 = 0x01, FlagVal2 = 0x02, FlagVal3 = 0x04 };
265 Q_DECLARE_FLAGS(MyFlags, MyFlag)
266 MyFlags flagPropertyValue;
267 MyFlags flagProperty() const {
268 return flagPropertyValue;
270 void setFlagProperty(MyFlags v) {
271 flagPropertyValue = v;
274 enum MyEnum { EnumVal1, EnumVal2 };
275 MyEnum enumPropertyValue;
276 MyEnum enumProperty() const {
277 return enumPropertyValue;
279 void setEnumProperty(MyEnum v) {
280 enumPropertyValue = v;
283 MyEnum readOnlyEnumProperty() const {
287 QString stringPropertyValue;
288 QString stringProperty() const {
289 return stringPropertyValue;
291 void setStringProperty(const QString &v) {
292 stringPropertyValue = v;
295 uint uintPropertyValue;
296 uint uintProperty() const {
297 return uintPropertyValue;
299 void setUintProperty(const uint &v) {
300 uintPropertyValue = v;
303 int intPropertyValue;
304 int intProperty() const {
305 return intPropertyValue;
307 void setIntProperty(const int &v) {
308 intPropertyValue = v;
311 qreal realPropertyValue;
312 qreal realProperty() const {
313 return realPropertyValue;
315 void setRealProperty(const qreal &v) {
316 realPropertyValue = v;
319 double doublePropertyValue;
320 double doubleProperty() const {
321 return doublePropertyValue;
323 void setDoubleProperty(const double &v) {
324 doublePropertyValue = v;
327 float floatPropertyValue;
328 float floatProperty() const {
329 return floatPropertyValue;
331 void setFloatProperty(const float &v) {
332 floatPropertyValue = v;
335 QColor colorPropertyValue;
336 QColor colorProperty() const {
337 return colorPropertyValue;
339 void setColorProperty(const QColor &v) {
340 colorPropertyValue = v;
343 QDate datePropertyValue;
344 QDate dateProperty() const {
345 return datePropertyValue;
347 void setDateProperty(const QDate &v) {
348 datePropertyValue = v;
351 QTime timePropertyValue;
352 QTime timeProperty() const {
353 return timePropertyValue;
355 void setTimeProperty(const QTime &v) {
356 timePropertyValue = v;
359 QDateTime dateTimePropertyValue;
360 QDateTime dateTimeProperty() const {
361 return dateTimePropertyValue;
363 void setDateTimeProperty(const QDateTime &v) {
364 dateTimePropertyValue = v;
367 QPoint pointPropertyValue;
368 QPoint pointProperty() const {
369 return pointPropertyValue;
371 void setPointProperty(const QPoint &v) {
372 pointPropertyValue = v;
375 QPointF pointFPropertyValue;
376 QPointF pointFProperty() const {
377 return pointFPropertyValue;
379 void setPointFProperty(const QPointF &v) {
380 pointFPropertyValue = v;
383 QSize sizePropertyValue;
384 QSize sizeProperty() const {
385 return sizePropertyValue;
387 void setSizeProperty(const QSize &v) {
388 sizePropertyValue = v;
391 QSizeF sizeFPropertyValue;
392 QSizeF sizeFProperty() const {
393 return sizeFPropertyValue;
395 void setSizeFProperty(const QSizeF &v) {
396 sizeFPropertyValue = v;
399 QRect rectPropertyValue;
400 QRect rectProperty() const {
401 return rectPropertyValue;
403 void setRectProperty(const QRect &v) {
404 rectPropertyValue = v;
405 emit rectPropertyChanged();
408 QRect rectPropertyValue2;
409 QRect rectProperty2() const {
410 return rectPropertyValue2;
412 void setRectProperty2(const QRect &v) {
413 rectPropertyValue2 = v;
416 QRectF rectFPropertyValue;
417 QRectF rectFProperty() const {
418 return rectFPropertyValue;
420 void setRectFProperty(const QRectF &v) {
421 rectFPropertyValue = v;
424 bool boolPropertyValue;
425 bool boolProperty() const {
426 return boolPropertyValue;
428 void setBoolProperty(const bool &v) {
429 boolPropertyValue = v;
432 QVariant variantPropertyValue;
433 QVariant variantProperty() const {
434 return variantPropertyValue;
436 void setVariantProperty(const QVariant &v) {
437 variantPropertyValue = v;
440 QVector3D vectorPropertyValue;
441 QVector3D vectorProperty() const {
442 return vectorPropertyValue;
444 void setVectorProperty(const QVector3D &v) {
445 vectorPropertyValue = v;
448 QVector4D vector4PropertyValue;
449 QVector4D vector4Property() const {
450 return vector4PropertyValue;
452 void setVector4Property(const QVector4D &v) {
453 vector4PropertyValue = v;
456 QUrl urlPropertyValue;
457 QUrl urlProperty() const {
458 return urlPropertyValue;
460 void setUrlProperty(const QUrl &v) {
461 urlPropertyValue = v;
464 QQmlScriptString scriptPropertyValue;
465 QQmlScriptString scriptProperty() const {
466 return scriptPropertyValue;
468 void setScriptProperty(const QQmlScriptString &v) {
469 scriptPropertyValue = v;
472 MyGroupedObject groupedValue;
473 MyGroupedObject *grouped() { return &groupedValue; }
475 MyGroupedObject *nullGrouped() { return 0; }
477 void doAction() { emit action(); }
480 void rectPropertyChanged();
482 Q_DECLARE_OPERATORS_FOR_FLAGS(MyTypeObject::MyFlags)
485 class MyContainer : public QObject
488 Q_PROPERTY(QQmlListProperty<QObject> children READ children)
489 Q_PROPERTY(QQmlListProperty<MyContainer> containerChildren READ containerChildren)
490 Q_PROPERTY(QQmlListProperty<MyInterface> qlistInterfaces READ qlistInterfaces)
491 Q_CLASSINFO("DefaultProperty", "children")
495 QQmlListProperty<QObject> children() { return QQmlListProperty<QObject>(this, m_children); }
496 QQmlListProperty<MyContainer> containerChildren() { return QQmlListProperty<MyContainer>(this, m_containerChildren); }
497 QList<QObject *> *getChildren() { return &m_children; }
498 QQmlListProperty<MyInterface> qlistInterfaces() { return QQmlListProperty<MyInterface>(this, m_interfaces); }
499 QList<MyInterface *> *getQListInterfaces() { return &m_interfaces; }
501 QList<MyContainer*> m_containerChildren;
502 QList<QObject*> m_children;
503 QList<MyInterface *> m_interfaces;
507 class MyPropertyValueSource : public QObject, public QQmlPropertyValueSource
510 Q_INTERFACES(QQmlPropertyValueSource)
512 MyPropertyValueSource()
513 : QQmlPropertyValueSource() {}
516 virtual void setTarget(const QQmlProperty &p)
522 class UnavailableType : public QObject
529 class MyDotPropertyObject : public QObject
532 Q_PROPERTY(MyQmlObject *obj READ obj)
533 Q_PROPERTY(MyQmlObject *readWriteObj READ readWriteObj WRITE setReadWriteObj)
535 MyDotPropertyObject() : m_rwobj(0), m_ownRWObj(false) {}
536 ~MyDotPropertyObject()
542 MyQmlObject *obj() { return 0; }
544 MyQmlObject *readWriteObj()
547 m_rwobj = new MyQmlObject;
553 void setReadWriteObj(MyQmlObject *obj)
564 MyQmlObject *m_rwobj;
569 namespace MyNamespace {
570 class MyNamespacedType : public QObject
575 class MySecondNamespacedType : public QObject
578 Q_PROPERTY(QQmlListProperty<MyNamespace::MyNamespacedType> list READ list)
580 QQmlListProperty<MyNamespacedType> list() { return QQmlListProperty<MyNamespacedType>(this, m_list); }
583 QList<MyNamespacedType *> m_list;
587 class MyCustomParserType : public QObject
592 class MyCustomParserTypeParser : public QQmlCustomParser
595 QByteArray compile(const QList<QQmlCustomParserProperty> &) { return QByteArray(); }
596 void setCustomData(QObject *, const QByteArray &) {}
599 class MyParserStatus : public QObject, public QQmlParserStatus
601 Q_INTERFACES(QQmlParserStatus)
604 MyParserStatus() : m_cbc(0), m_ccc(0) {}
606 int classBeginCount() const { return m_cbc; }
607 int componentCompleteCount() const { return m_ccc; }
609 virtual void classBegin() { m_cbc++; }
610 virtual void componentComplete() { m_ccc++; }
616 class MyRevisionedBaseClassRegistered : public QObject
619 Q_PROPERTY(qreal propA READ propA WRITE setPropA NOTIFY propAChanged)
620 Q_PROPERTY(qreal propB READ propB WRITE setPropB NOTIFY propBChanged REVISION 1)
623 MyRevisionedBaseClassRegistered() : m_pa(1), m_pb(2) {}
625 qreal propA() const { return m_pa; }
626 void setPropA(qreal p) {
632 qreal propB() const { return m_pb; }
633 void setPropB(qreal p) {
640 Q_INVOKABLE void methodA() { }
641 Q_INVOKABLE Q_REVISION(1) void methodB() { }
648 Q_REVISION(1) void signalB();
655 class MyRevisionedIllegalOverload : public MyRevisionedBaseClassRegistered
658 Q_PROPERTY(qreal propA READ propA WRITE setPropA REVISION 1);
661 class MyRevisionedLegalOverload : public MyRevisionedBaseClassRegistered
664 Q_PROPERTY(qreal propB READ propB WRITE setPropB REVISION 1);
667 class MyRevisionedBaseClassUnregistered : public MyRevisionedBaseClassRegistered
670 Q_PROPERTY(qreal propC READ propC WRITE setPropC NOTIFY propCChanged)
671 Q_PROPERTY(qreal propD READ propD WRITE setPropD NOTIFY propDChanged REVISION 1)
674 MyRevisionedBaseClassUnregistered() : m_pc(1), m_pd(2) {}
676 qreal propC() const { return m_pc; }
677 void setPropC(qreal p) {
683 qreal propD() const { return m_pd; }
684 void setPropD(qreal p) {
691 Q_INVOKABLE void methodC() { }
692 Q_INVOKABLE Q_REVISION(1) void methodD() { }
699 Q_REVISION(1) void signalD();
706 class MyRevisionedClass : public MyRevisionedBaseClassUnregistered
709 Q_PROPERTY(qreal prop1 READ prop1 WRITE setProp1 NOTIFY prop1Changed)
710 Q_PROPERTY(qreal prop2 READ prop2 WRITE setProp2 NOTIFY prop2Changed REVISION 1)
713 MyRevisionedClass() : m_p1(1), m_p2(2) {}
715 qreal prop1() const { return m_p1; }
716 void setProp1(qreal p) {
722 qreal prop2() const { return m_p2; }
723 void setProp2(qreal p) {
730 Q_INVOKABLE void method1() { }
731 Q_INVOKABLE Q_REVISION(1) void method2() { }
738 Q_REVISION(1) void signal2();
745 class MyRevisionedSubclass : public MyRevisionedClass
748 Q_PROPERTY(qreal prop3 READ prop3 WRITE setProp3 NOTIFY prop3Changed)
749 Q_PROPERTY(qreal prop4 READ prop4 WRITE setProp4 NOTIFY prop4Changed REVISION 1)
752 MyRevisionedSubclass() : m_p3(3), m_p4(4) {}
754 qreal prop3() const { return m_p3; }
755 void setProp3(qreal p) {
761 qreal prop4() const { return m_p4; }
762 void setProp4(qreal p) {
769 Q_INVOKABLE void method3() { }
770 Q_INVOKABLE Q_REVISION(1) void method4() { }
777 Q_REVISION(1) void signal4();
784 class MySubclass : public MyRevisionedClass
787 Q_PROPERTY(qreal prop5 READ prop5 WRITE setProp5 NOTIFY prop5Changed)
790 MySubclass() : m_p5(5) {}
792 qreal prop5() const { return m_p5; }
793 void setProp5(qreal p) {
800 Q_INVOKABLE void method5() { }
809 class MyVersion2Class : public QObject
814 class MyEnum1Class : public QObject
820 MyEnum1Class() : value(A_Invalid) {}
830 Q_INVOKABLE void setValue(EnumA v) { value = v; }
832 EnumA getValue() { return value; }
838 class MyEnum2Class : public QObject
845 MyEnum2Class() : valueA(MyEnum1Class::A_Invalid), valueB(B_Invalid), valueC(Qt::PlainText),
846 valueD(Qt::ElideLeft), valueE(E_Invalid), valueE2(E_Invalid) {}
865 MyEnum1Class::EnumA getValueA() { return valueA; }
866 EnumB getValueB() { return valueB; }
867 Qt::TextFormat getValueC() { return valueC; }
868 Qt::TextElideMode getValueD() { return valueD; }
869 EnumE getValueE() { return valueE; }
870 EnumE getValueE2() { return valueE2; }
872 Q_INVOKABLE void setValueA(MyEnum1Class::EnumA v) { valueA = v; emit valueAChanged(v); }
873 Q_INVOKABLE void setValueB(EnumB v) { valueB = v; emit valueBChanged(v); }
874 Q_INVOKABLE void setValueC(Qt::TextFormat v) { valueC = v; emit valueCChanged(v); } //registered
875 Q_INVOKABLE void setValueD(Qt::TextElideMode v) { valueD = v; emit valueDChanged(v); } //unregistered
876 Q_INVOKABLE void setValueE(EnumE v) { valueE = v; emit valueEChanged(v); }
877 Q_INVOKABLE void setValueE2(MyEnum2Class::EnumE v) { valueE2 = v; emit valueE2Changed(v); }
880 void valueAChanged(MyEnum1Class::EnumA newValue);
881 void valueBChanged(MyEnum2Class::EnumB newValue);
882 void valueCChanged(Qt::TextFormat newValue);
883 void valueDChanged(Qt::TextElideMode newValue);
884 void valueEChanged(EnumE newValue);
885 void valueE2Changed(MyEnum2Class::EnumE newValue);
888 MyEnum1Class::EnumA valueA;
890 Qt::TextFormat valueC;
891 Qt::TextElideMode valueD;
896 class MyEnumDerivedClass : public MyEnum2Class
901 Q_DECLARE_METATYPE(MyEnum2Class::EnumB)
902 Q_DECLARE_METATYPE(MyEnum1Class::EnumA)
903 Q_DECLARE_METATYPE(Qt::TextFormat)
905 QML_DECLARE_TYPE(MyRevisionedBaseClassRegistered)
906 QML_DECLARE_TYPE(MyRevisionedBaseClassUnregistered)
907 QML_DECLARE_TYPE(MyRevisionedClass)
908 QML_DECLARE_TYPE(MyRevisionedSubclass)
909 QML_DECLARE_TYPE(MySubclass)
911 void registerTypes();
913 #endif // TESTTYPES_H