diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-04 07:34:34 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-08-04 07:34:34 (GMT) |
commit | 45c46cc786c3f63269ea80246082bc5d7d38e893 (patch) | |
tree | 9ff7b9b9f082487499e1454a41509618063613e7 | |
parent | 826e1f392908b497fa254513b348614376b892a2 (diff) | |
parent | 93e65f89fa103aa8fb243ddd174657f7fa351644 (diff) | |
download | Qt-45c46cc786c3f63269ea80246082bc5d7d38e893.zip Qt-45c46cc786c3f63269ea80246082bc5d7d38e893.tar.gz Qt-45c46cc786c3f63269ea80246082bc5d7d38e893.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
112 files changed, 358 insertions, 68 deletions
diff --git a/examples/declarative/smooth/GradientRect.qml b/examples/declarative/smooth/GradientRect.qml new file mode 100644 index 0000000..267a487 --- /dev/null +++ b/examples/declarative/smooth/GradientRect.qml @@ -0,0 +1,25 @@ +import Qt 4.6 + +Item { + id: MyRect + property string color + property string border : "" + property int rotation + property int radius + property int borderWidth + property bool smooth: false + + width: 80; height: 80 + Item { + anchors.centerIn: parent; rotation: MyRect.rotation; + Rect { + anchors.centerIn: parent; width: 80; height: 80 + border.color: MyRect.border; border.width: MyRect.border != "" ? 2 : 0 + radius: MyRect.radius; smooth: MyRect.smooth + gradient: Gradient { + GradientStop { position: 0.0; color: MyRect.color } + GradientStop { position: 1.0; color: "white" } + } + } + } +} diff --git a/examples/declarative/smooth/MyRect.qml b/examples/declarative/smooth/MyRect.qml new file mode 100644 index 0000000..7791e27 --- /dev/null +++ b/examples/declarative/smooth/MyRect.qml @@ -0,0 +1,21 @@ +import Qt 4.6 + +Item { + id: MyRect + property string color + property string border : "" + property int rotation + property int radius + property int borderWidth + property bool smooth: false + + width: 80; height: 80 + Item { + anchors.centerIn: parent; rotation: MyRect.rotation; + Rect { + anchors.centerIn: parent; width: 80; height: 80 + color: MyRect.color; border.color: MyRect.border; border.width: MyRect.border != "" ? 2 : 0 + radius: MyRect.radius; smooth: MyRect.smooth + } + } +} diff --git a/examples/declarative/smooth/rect-painting.qml b/examples/declarative/smooth/rect-painting.qml new file mode 100644 index 0000000..2f01e4b --- /dev/null +++ b/examples/declarative/smooth/rect-painting.qml @@ -0,0 +1,64 @@ +import Qt 4.6 + +Rect { + width: 900; height: 500 + color: "white" + + Rect { + anchors.top: parent.verticalCenter + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + color: "#eeeeee" + } + + GridLayout { + anchors.centerIn: parent + columns: 8; rows:4; spacing: 30 + + MyRect { color: "lightsteelblue" } + MyRect { color: "lightsteelblue"; border: "gray" } + MyRect { color: "lightsteelblue"; radius: 10 } + MyRect { color: "lightsteelblue"; radius: 10; border: "gray" } + GradientRect { color: "lightsteelblue" } + GradientRect { color: "lightsteelblue"; border: "gray" } + GradientRect { color: "lightsteelblue"; radius: 10 } + GradientRect { color: "lightsteelblue"; radius: 10; border: "gray" } + + MyRect { color: "thistle"; rotation: 10 } + MyRect { color: "thistle"; border: "gray"; rotation: 10 } + MyRect { color: "thistle"; radius: 10; rotation: 10 } + MyRect { color: "thistle"; radius: 10; border: "gray"; rotation: 10 } + GradientRect { color: "thistle"; rotation: 10 } + GradientRect { color: "thistle"; border: "gray"; rotation: 10 } + GradientRect { color: "thistle"; radius: 10; rotation: 10 } + GradientRect { color: "thistle"; radius: 10; border: "gray"; rotation: 10 } + + MyRect { color: "lightsteelblue"; smooth: true } + MyRect { color: "lightsteelblue"; border: "gray"; smooth: true } + MyRect { color: "lightsteelblue"; radius: 10; smooth: true } + MyRect { color: "lightsteelblue"; radius: 10; border: "gray"; smooth: true } + GradientRect { color: "lightsteelblue"; smooth: true } + GradientRect { color: "lightsteelblue"; border: "gray"; smooth: true } + GradientRect { color: "lightsteelblue"; radius: 10; smooth: true } + GradientRect { color: "lightsteelblue"; radius: 10; border: "gray"; smooth: true } + + MyRect { color: "thistle"; rotation: 10; smooth: true } + MyRect { color: "thistle"; border: "gray"; rotation: 10; smooth: true } + MyRect { color: "thistle"; radius: 10; rotation: 10; smooth: true } + MyRect { color: "thistle"; radius: 10; border: "gray"; rotation: 10; smooth: true } + GradientRect { color: "thistle"; rotation: 10; smooth: true } + GradientRect { color: "thistle"; border: "gray"; rotation: 10; smooth: true } + GradientRect { color: "thistle"; radius: 10; rotation: 10; smooth: true } + GradientRect { color: "thistle"; radius: 10; border: "gray"; rotation: 10; smooth: true } + } + + Text { + text: "smooth: false"; font.bold: true + anchors.horizontalCenter: parent.horizontalCenter; anchors.top: parent.top + } + Text { + text: "smooth: true"; font.bold: true + anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom + } +} diff --git a/src/declarative/fx/qfxrect.cpp b/src/declarative/fx/qfxrect.cpp index 0722d26..29321b8 100644 --- a/src/declarative/fx/qfxrect.cpp +++ b/src/declarative/fx/qfxrect.cpp @@ -475,10 +475,17 @@ void QFxRect::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) { Q_D(QFxRect); if (d->radius > 0 || (d->pen && d->pen->isValid()) - || (d->gradient && d->gradient->gradient()) ) + || (d->gradient && d->gradient->gradient()) ) { drawRect(*p); - else + } + else { + bool oldAA = p->testRenderHint(QPainter::Antialiasing); + if (d->smooth) + p->setRenderHints(QPainter::Antialiasing, true); p->fillRect(QRect(0, 0, width(), height()), d->getColor()); + if (d->smooth) + p->setRenderHint(QPainter::Antialiasing, oldAA); + } } void QFxRect::drawRect(QPainter &p) @@ -488,7 +495,8 @@ void QFxRect::drawRect(QPainter &p) // XXX This path is still slower than the image path // Image path won't work for gradients though bool oldAA = p.testRenderHint(QPainter::Antialiasing); - p.setRenderHint(QPainter::Antialiasing); + if (d->smooth) + p.setRenderHint(QPainter::Antialiasing); if (d->pen && d->pen->isValid()) { QPen pn(QColor(d->pen->color()), d->pen->width()); p.setPen(pn); @@ -500,8 +508,14 @@ void QFxRect::drawRect(QPainter &p) p.drawRoundedRect(0, 0, width(), height(), d->radius, d->radius); else p.drawRect(0, 0, width(), height()); - p.setRenderHint(QPainter::Antialiasing, oldAA); + if (d->smooth) + p.setRenderHint(QPainter::Antialiasing, oldAA); } else { + bool oldAA = p.testRenderHint(QPainter::Antialiasing); + bool oldSmooth = p.testRenderHint(QPainter::SmoothPixmapTransform); + if (d->smooth) + p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth); + int offset = 0; const int pw = d->pen && d->pen->isValid() ? (d->pen->width()+1)/2*2 : 0; @@ -569,6 +583,11 @@ void QFxRect::drawRect(QPainter &p) // Lower Right p.drawPixmap(QPoint(width()-xOffset+pw/2, height() - yOffset+pw/2), d->rectImage, QRect(d->rectImage.width()-xOffset, d->rectImage.height() - yOffset, xOffset, yOffset)); + + if (d->smooth) { + p.setRenderHint(QPainter::Antialiasing, oldAA); + p.setRenderHint(QPainter::SmoothPixmapTransform, oldSmooth); + } } } diff --git a/src/declarative/qml/qml.h b/src/declarative/qml/qml.h index e7fbff3..bced8f2 100644 --- a/src/declarative/qml/qml.h +++ b/src/declarative/qml/qml.h @@ -74,19 +74,19 @@ QT_MODULE(Declarative) QT_BEGIN_NAMESPACE #define QML_DEFINE_INTERFACE(INTERFACE) \ - template<> QmlPrivate::InstanceType QmlPrivate::Define<INTERFACE *>::instance(qmlRegisterInterface<INTERFACE>(#INTERFACE)); + template<> QmlPrivate::InstanceType QmlPrivate::Define<INTERFACE *,0,0,0>::instance(qmlRegisterInterface<INTERFACE>(#INTERFACE)); #define QML_DEFINE_EXTENDED_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, NAME, TYPE, EXTENSION) \ - template<> QmlPrivate::InstanceType QmlPrivate::Define<TYPE *>::instance(qmlRegisterExtendedType<TYPE,EXTENSION>(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, #NAME, #TYPE)); + template<> QmlPrivate::InstanceType QmlPrivate::Define<TYPE *,(VERSION_MAJ), (VERSION_MIN_FROM), (VERSION_MIN_TO)>::instance(qmlRegisterExtendedType<TYPE,EXTENSION>(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, #NAME, #TYPE)); #define QML_DEFINE_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, NAME, TYPE) \ - template<> QmlPrivate::InstanceType QmlPrivate::Define<TYPE *>::instance(qmlRegisterType<TYPE>(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, #NAME, #TYPE)); + template<> QmlPrivate::InstanceType QmlPrivate::Define<TYPE *,(VERSION_MAJ), (VERSION_MIN_FROM), (VERSION_MIN_TO)>::instance(qmlRegisterType<TYPE>(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MIN_TO, #NAME, #TYPE)); #define QML_DEFINE_EXTENDED_NOCREATE_TYPE(TYPE, EXTENSION) \ - template<> QmlPrivate::InstanceType QmlPrivate::Define<TYPE *>::instance(qmlRegisterExtendedType<TYPE,EXTENSION>(#TYPE)); + template<> QmlPrivate::InstanceType QmlPrivate::Define<TYPE *,0,0,0>::instance(qmlRegisterExtendedType<TYPE,EXTENSION>(#TYPE)); #define QML_DEFINE_NOCREATE_TYPE(TYPE) \ - template<> QmlPrivate::InstanceType QmlPrivate::Define<TYPE *>::instance(qmlRegisterType<TYPE>(#TYPE)); + template<> QmlPrivate::InstanceType QmlPrivate::Define<TYPE *,0,0,0>::instance(qmlRegisterType<TYPE>(#TYPE)); class QmlContext; class QmlEngine; diff --git a/src/declarative/qml/qmlcustomparser_p.h b/src/declarative/qml/qmlcustomparser_p.h index 3d55d3e..74bd15c 100644 --- a/src/declarative/qml/qmlcustomparser_p.h +++ b/src/declarative/qml/qmlcustomparser_p.h @@ -113,7 +113,7 @@ public: virtual void setCustomData(QObject *, const QByteArray &); }; #define QML_DEFINE_CUSTOM_TYPE(URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MAJ_TO, NAME, TYPE, CUSTOMTYPE) \ - template<> QmlPrivate::InstanceType QmlPrivate::Define<TYPE *>::instance(qmlRegisterCustomType<TYPE>(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MAJ_TO, #NAME, #TYPE, new CUSTOMTYPE)); + template<> QmlPrivate::InstanceType QmlPrivate::Define<TYPE *,(VERSION_MAJ), (VERSION_MIN_FROM), (VERSION_MAJ_TO)>::instance(qmlRegisterCustomType<TYPE>(#URI, VERSION_MAJ, VERSION_MIN_FROM, VERSION_MAJ_TO, #NAME, #TYPE, new CUSTOMTYPE)); QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlmetatype.cpp b/src/declarative/qml/qmlmetatype.cpp index 5fe3eff..29fe026 100644 --- a/src/declarative/qml/qmlmetatype.cpp +++ b/src/declarative/qml/qmlmetatype.cpp @@ -448,16 +448,20 @@ int QmlMetaType::registerType(const QmlPrivate::MetaTypeIds &id, QmlPrivate::Fun int pStatus, int object, QmlPrivate::CreateFunc extFunc, const QMetaObject *extmo, QmlCustomParser *parser) { Q_UNUSED(object); - QByteArray name = cname; - + QByteArray name; if (uri) { + // Convert to path + name = uri; + name.replace('.','/'); if (version) { - name = QByteArray(uri) + '/' + version + '/' + name; - } else { - name = QByteArray(uri) + '/' + name; + name += '/'; + name += version; } + name += '/'; + name += cname; } else { // No URI? No version! + name = cname; Q_ASSERT(!version); } diff --git a/src/declarative/qml/qmlprivate.h b/src/declarative/qml/qmlprivate.h index 3d5fa61..e821759 100644 --- a/src/declarative/qml/qmlprivate.h +++ b/src/declarative/qml/qmlprivate.h @@ -240,7 +240,7 @@ namespace QmlPrivate InstanceType(int); }; - template<typename T> + template<typename T, int VMAJ, int VMIN1, int VMIN2> struct Define { static InstanceType instance; }; diff --git a/tests/auto/declarative/qmlparser/MyComponent.qml b/tests/auto/declarative/qmlparser/MyComponent.qml index 5caa547..1a23277 100644 --- a/tests/auto/declarative/qmlparser/MyComponent.qml +++ b/tests/auto/declarative/qmlparser/MyComponent.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Test 1.0 MyQmlObject { property real x; diff --git a/tests/auto/declarative/qmlparser/MyContainerComponent.qml b/tests/auto/declarative/qmlparser/MyContainerComponent.qml index cf17dcc..61f54c5 100644 --- a/tests/auto/declarative/qmlparser/MyContainerComponent.qml +++ b/tests/auto/declarative/qmlparser/MyContainerComponent.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Test 1.0 MyContainer { property int x diff --git a/tests/auto/declarative/qmlparser/assignBasicTypes.txt b/tests/auto/declarative/qmlparser/assignBasicTypes.txt index 71e400d..cef9f8d 100644 --- a/tests/auto/declarative/qmlparser/assignBasicTypes.txt +++ b/tests/auto/declarative/qmlparser/assignBasicTypes.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { flagProperty: "FlagVal1 | FlagVal3" enumProperty: "EnumVal2" diff --git a/tests/auto/declarative/qmlparser/assignLiteralSignalProperty.txt b/tests/auto/declarative/qmlparser/assignLiteralSignalProperty.txt index f3a7ac7..399fcea 100644 --- a/tests/auto/declarative/qmlparser/assignLiteralSignalProperty.txt +++ b/tests/auto/declarative/qmlparser/assignLiteralSignalProperty.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { onLiteralSignal: 10 } diff --git a/tests/auto/declarative/qmlparser/assignObjectToSignal.txt b/tests/auto/declarative/qmlparser/assignObjectToSignal.txt index 0d6bc4e..789cc66 100644 --- a/tests/auto/declarative/qmlparser/assignObjectToSignal.txt +++ b/tests/auto/declarative/qmlparser/assignObjectToSignal.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { onBasicSignal: MyQmlObject {} } diff --git a/tests/auto/declarative/qmlparser/assignObjectToVariant.txt b/tests/auto/declarative/qmlparser/assignObjectToVariant.txt index 180221d..28c68c4 100644 --- a/tests/auto/declarative/qmlparser/assignObjectToVariant.txt +++ b/tests/auto/declarative/qmlparser/assignObjectToVariant.txt @@ -1,3 +1,5 @@ +import Test 1.0 +import Qt 4.6 Object { property var a; a: MyQmlObject {} diff --git a/tests/auto/declarative/qmlparser/assignQmlComponent.txt b/tests/auto/declarative/qmlparser/assignQmlComponent.txt index 6b6d77f..20bdc55 100644 --- a/tests/auto/declarative/qmlparser/assignQmlComponent.txt +++ b/tests/auto/declarative/qmlparser/assignQmlComponent.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyContainer { MyComponent { x: 10; y: 11; } } diff --git a/tests/auto/declarative/qmlparser/assignSignal.txt b/tests/auto/declarative/qmlparser/assignSignal.txt index 6c0fd54..153b403 100644 --- a/tests/auto/declarative/qmlparser/assignSignal.txt +++ b/tests/auto/declarative/qmlparser/assignSignal.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { onBasicSignal: basicSlot() } diff --git a/tests/auto/declarative/qmlparser/assignTypeExtremes.txt b/tests/auto/declarative/qmlparser/assignTypeExtremes.txt index dbd281a..60ede52 100644 --- a/tests/auto/declarative/qmlparser/assignTypeExtremes.txt +++ b/tests/auto/declarative/qmlparser/assignTypeExtremes.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { uintProperty: 4000000000 intProperty: -2000000000 diff --git a/tests/auto/declarative/qmlparser/attachedProperties.txt b/tests/auto/declarative/qmlparser/attachedProperties.txt index bfe5733..8343754 100644 --- a/tests/auto/declarative/qmlparser/attachedProperties.txt +++ b/tests/auto/declarative/qmlparser/attachedProperties.txt @@ -1,3 +1,5 @@ +import Test 1.0 +import Qt 4.6 Object { MyQmlObject.value: 10 } diff --git a/tests/auto/declarative/qmlparser/autoComponentCreation.txt b/tests/auto/declarative/qmlparser/autoComponentCreation.txt index e0dbbae..5d00144 100644 --- a/tests/auto/declarative/qmlparser/autoComponentCreation.txt +++ b/tests/auto/declarative/qmlparser/autoComponentCreation.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { componentProperty : MyTypeObject { realProperty: 9 } } diff --git a/tests/auto/declarative/qmlparser/customParserTypes.txt b/tests/auto/declarative/qmlparser/customParserTypes.txt index 52848fa..cf2f272 100644 --- a/tests/auto/declarative/qmlparser/customParserTypes.txt +++ b/tests/auto/declarative/qmlparser/customParserTypes.txt @@ -1,3 +1,4 @@ +import Qt 4.6 ListModel { ListElement { a: 10 } ListElement { a: 12 } diff --git a/tests/auto/declarative/qmlparser/customVariantTypes.txt b/tests/auto/declarative/qmlparser/customVariantTypes.txt index dc5031e..0263ed2 100644 --- a/tests/auto/declarative/qmlparser/customVariantTypes.txt +++ b/tests/auto/declarative/qmlparser/customVariantTypes.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { customType: "10" } diff --git a/tests/auto/declarative/qmlparser/duplicateIDs.errors.txt b/tests/auto/declarative/qmlparser/duplicateIDs.errors.txt index 99f4c7c..66241cf 100644 --- a/tests/auto/declarative/qmlparser/duplicateIDs.errors.txt +++ b/tests/auto/declarative/qmlparser/duplicateIDs.errors.txt @@ -1 +1 @@ -3:19:id is not unique +4:19:id is not unique diff --git a/tests/auto/declarative/qmlparser/duplicateIDs.txt b/tests/auto/declarative/qmlparser/duplicateIDs.txt index e76ee21..9605b5b 100644 --- a/tests/auto/declarative/qmlparser/duplicateIDs.txt +++ b/tests/auto/declarative/qmlparser/duplicateIDs.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyContainer { MyQmlObject { id: MyID } MyQmlObject { id: MyID } diff --git a/tests/auto/declarative/qmlparser/dynamicObject.1.txt b/tests/auto/declarative/qmlparser/dynamicObject.1.txt index ac892c3..4be0c8d 100644 --- a/tests/auto/declarative/qmlparser/dynamicObject.1.txt +++ b/tests/auto/declarative/qmlparser/dynamicObject.1.txt @@ -1,3 +1,5 @@ +import Test 1.0 +import Qt 4.6 SetProperties { propa: a + 10 propb: Math.min(a, 10) diff --git a/tests/auto/declarative/qmlparser/dynamicProperties.txt b/tests/auto/declarative/qmlparser/dynamicProperties.txt index 14c85a7..f93e446 100644 --- a/tests/auto/declarative/qmlparser/dynamicProperties.txt +++ b/tests/auto/declarative/qmlparser/dynamicProperties.txt @@ -1,3 +1,5 @@ +import Test 1.0 +import Qt 4.6 Object { default property int intProperty : 10 property bool boolProperty: false diff --git a/tests/auto/declarative/qmlparser/dynamicSignalsAndSlots.txt b/tests/auto/declarative/qmlparser/dynamicSignalsAndSlots.txt index 7cf65ee..b0ca970 100644 --- a/tests/auto/declarative/qmlparser/dynamicSignalsAndSlots.txt +++ b/tests/auto/declarative/qmlparser/dynamicSignalsAndSlots.txt @@ -1,3 +1,4 @@ +import Qt 4.6 Object { signal signal1 function slot1() {} diff --git a/tests/auto/declarative/qmlparser/empty.errors.txt b/tests/auto/declarative/qmlparser/empty.errors.txt index e0ed268..d416e76 100644 --- a/tests/auto/declarative/qmlparser/empty.errors.txt +++ b/tests/auto/declarative/qmlparser/empty.errors.txt @@ -1 +1,2 @@ -0:0:Expected token `identifier' +0:0:Expected token `numeric literal' +0:0:Expected a qualified name id diff --git a/tests/auto/declarative/qmlparser/failingComponent.errors.txt b/tests/auto/declarative/qmlparser/failingComponent.errors.txt index a18f2e7..388fa76 100644 --- a/tests/auto/declarative/qmlparser/failingComponent.errors.txt +++ b/tests/auto/declarative/qmlparser/failingComponent.errors.txt @@ -1,2 +1,2 @@ -1:-1:Unable to create type FailingComponent -2:5:Cannot assign to non-existant property "a" +4:5:Cannot assign to non-existant property "a" diff --git a/tests/auto/declarative/qmlparser/failingComponent.txt b/tests/auto/declarative/qmlparser/failingComponent.txt index 8c43f84..bc21243 100644 --- a/tests/auto/declarative/qmlparser/failingComponent.txt +++ b/tests/auto/declarative/qmlparser/failingComponent.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyContainer { FailingComponent {} } diff --git a/tests/auto/declarative/qmlparser/fakeDotProperty.errors.txt b/tests/auto/declarative/qmlparser/fakeDotProperty.errors.txt index 989d0e6..e56ad3a 100644 --- a/tests/auto/declarative/qmlparser/fakeDotProperty.errors.txt +++ b/tests/auto/declarative/qmlparser/fakeDotProperty.errors.txt @@ -1 +1 @@ -2:5:Invalid property access +3:5:Invalid property access diff --git a/tests/auto/declarative/qmlparser/fakeDotProperty.txt b/tests/auto/declarative/qmlparser/fakeDotProperty.txt index 28eb9dc..d971eee 100644 --- a/tests/auto/declarative/qmlparser/fakeDotProperty.txt +++ b/tests/auto/declarative/qmlparser/fakeDotProperty.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { value.something: "hello" } diff --git a/tests/auto/declarative/qmlparser/finalOverride.errors.txt b/tests/auto/declarative/qmlparser/finalOverride.errors.txt index fc7070c..49e06cb 100644 --- a/tests/auto/declarative/qmlparser/finalOverride.errors.txt +++ b/tests/auto/declarative/qmlparser/finalOverride.errors.txt @@ -1 +1 @@ -2:5:Cannot override FINAL property +3:5:Cannot override FINAL property diff --git a/tests/auto/declarative/qmlparser/finalOverride.txt b/tests/auto/declarative/qmlparser/finalOverride.txt index 54ea6fb..a84393a 100644 --- a/tests/auto/declarative/qmlparser/finalOverride.txt +++ b/tests/auto/declarative/qmlparser/finalOverride.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { property int value: 10 } diff --git a/tests/auto/declarative/qmlparser/idProperty.txt b/tests/auto/declarative/qmlparser/idProperty.txt index c3c2e50..a413c0b 100644 --- a/tests/auto/declarative/qmlparser/idProperty.txt +++ b/tests/auto/declarative/qmlparser/idProperty.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyContainer { property var object : MyObjectId diff --git a/tests/auto/declarative/qmlparser/inlineQmlComponents.txt b/tests/auto/declarative/qmlparser/inlineQmlComponents.txt index e713a88..79ceda6 100644 --- a/tests/auto/declarative/qmlparser/inlineQmlComponents.txt +++ b/tests/auto/declarative/qmlparser/inlineQmlComponents.txt @@ -1,3 +1,5 @@ +import Test 1.0 +import Qt 4.6 MyContainer { Component { id: MyComponent diff --git a/tests/auto/declarative/qmlparser/interfaceProperty.txt b/tests/auto/declarative/qmlparser/interfaceProperty.txt index cbad7f1..c9a20fb 100644 --- a/tests/auto/declarative/qmlparser/interfaceProperty.txt +++ b/tests/auto/declarative/qmlparser/interfaceProperty.txt @@ -1,3 +1,5 @@ -MyQmlObject { +import Test 1.0 +import Qt 4.6 +Object { interface: MyQmlObject {} } diff --git a/tests/auto/declarative/qmlparser/interfaceQList.txt b/tests/auto/declarative/qmlparser/interfaceQList.txt index 6c6ab4b..c87dfae 100644 --- a/tests/auto/declarative/qmlparser/interfaceQList.txt +++ b/tests/auto/declarative/qmlparser/interfaceQList.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyContainer { qlistInterfaces: [ MyQmlObject {}, diff --git a/tests/auto/declarative/qmlparser/interfaceQmlList.txt b/tests/auto/declarative/qmlparser/interfaceQmlList.txt index f41c105..8392bea 100644 --- a/tests/auto/declarative/qmlparser/interfaceQmlList.txt +++ b/tests/auto/declarative/qmlparser/interfaceQmlList.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyContainer { qmllistInterfaces: [ MyQmlObject {}, diff --git a/tests/auto/declarative/qmlparser/invalidID.2.errors.txt b/tests/auto/declarative/qmlparser/invalidID.2.errors.txt index 9c54aab..56e3eeb 100644 --- a/tests/auto/declarative/qmlparser/invalidID.2.errors.txt +++ b/tests/auto/declarative/qmlparser/invalidID.2.errors.txt @@ -1,2 +1,2 @@ -2:5:"" is not a valid object id +3:5:"" is not a valid object id diff --git a/tests/auto/declarative/qmlparser/invalidID.2.txt b/tests/auto/declarative/qmlparser/invalidID.2.txt index a7af29e..4fb3b29 100644 --- a/tests/auto/declarative/qmlparser/invalidID.2.txt +++ b/tests/auto/declarative/qmlparser/invalidID.2.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { id: "" } diff --git a/tests/auto/declarative/qmlparser/invalidID.3.errors.txt b/tests/auto/declarative/qmlparser/invalidID.3.errors.txt index 36cd489..bb811cf 100644 --- a/tests/auto/declarative/qmlparser/invalidID.3.errors.txt +++ b/tests/auto/declarative/qmlparser/invalidID.3.errors.txt @@ -1 +1 @@ -2:5:Invalid use of id property +3:5:Invalid use of id property diff --git a/tests/auto/declarative/qmlparser/invalidID.3.txt b/tests/auto/declarative/qmlparser/invalidID.3.txt index c686914..6684172 100644 --- a/tests/auto/declarative/qmlparser/invalidID.3.txt +++ b/tests/auto/declarative/qmlparser/invalidID.3.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { id.other: 10 } diff --git a/tests/auto/declarative/qmlparser/invalidID.4.errors.txt b/tests/auto/declarative/qmlparser/invalidID.4.errors.txt index bb811cf..cfe8756 100644 --- a/tests/auto/declarative/qmlparser/invalidID.4.errors.txt +++ b/tests/auto/declarative/qmlparser/invalidID.4.errors.txt @@ -1 +1 @@ -3:5:Invalid use of id property +4:5:Invalid use of id property diff --git a/tests/auto/declarative/qmlparser/invalidID.4.txt b/tests/auto/declarative/qmlparser/invalidID.4.txt index 734ccc4..1f15fce 100644 --- a/tests/auto/declarative/qmlparser/invalidID.4.txt +++ b/tests/auto/declarative/qmlparser/invalidID.4.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { id: Hello id: World diff --git a/tests/auto/declarative/qmlparser/invalidID.errors.txt b/tests/auto/declarative/qmlparser/invalidID.errors.txt index 7cefb7e..1ca678c 100644 --- a/tests/auto/declarative/qmlparser/invalidID.errors.txt +++ b/tests/auto/declarative/qmlparser/invalidID.errors.txt @@ -1 +1 @@ -2:5:"1" is not a valid object id +3:5:"1" is not a valid object id diff --git a/tests/auto/declarative/qmlparser/invalidID.txt b/tests/auto/declarative/qmlparser/invalidID.txt index f91e8c4..04db3eb 100644 --- a/tests/auto/declarative/qmlparser/invalidID.txt +++ b/tests/auto/declarative/qmlparser/invalidID.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { id: 1 } diff --git a/tests/auto/declarative/qmlparser/listAssignment.1.errors.txt b/tests/auto/declarative/qmlparser/listAssignment.1.errors.txt index 8bcd71e..d68d487 100644 --- a/tests/auto/declarative/qmlparser/listAssignment.1.errors.txt +++ b/tests/auto/declarative/qmlparser/listAssignment.1.errors.txt @@ -1 +1 @@ -2:24:Cannot assign primitives to lists +3:24:Cannot assign primitives to lists diff --git a/tests/auto/declarative/qmlparser/listAssignment.1.txt b/tests/auto/declarative/qmlparser/listAssignment.1.txt index e2376f2..4240425 100644 --- a/tests/auto/declarative/qmlparser/listAssignment.1.txt +++ b/tests/auto/declarative/qmlparser/listAssignment.1.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyContainer { qmllistInterfaces: 1 } diff --git a/tests/auto/declarative/qmlparser/listAssignment.2.errors.txt b/tests/auto/declarative/qmlparser/listAssignment.2.errors.txt index 312ba8a..8b40aa3 100644 --- a/tests/auto/declarative/qmlparser/listAssignment.2.errors.txt +++ b/tests/auto/declarative/qmlparser/listAssignment.2.errors.txt @@ -1,2 +1,2 @@ -2:15:Cannot assign primitives to lists +3:15:Cannot assign primitives to lists diff --git a/tests/auto/declarative/qmlparser/listAssignment.2.txt b/tests/auto/declarative/qmlparser/listAssignment.2.txt index 375e4b4..e3baadb 100644 --- a/tests/auto/declarative/qmlparser/listAssignment.2.txt +++ b/tests/auto/declarative/qmlparser/listAssignment.2.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyContainer { children: 2 } diff --git a/tests/auto/declarative/qmlparser/listAssignment.3.errors.txt b/tests/auto/declarative/qmlparser/listAssignment.3.errors.txt index c52debf..8c7b7e9 100644 --- a/tests/auto/declarative/qmlparser/listAssignment.3.errors.txt +++ b/tests/auto/declarative/qmlparser/listAssignment.3.errors.txt @@ -1 +1 @@ -3:15:Can only assign one binding to lists +4:15:Can only assign one binding to lists diff --git a/tests/auto/declarative/qmlparser/listAssignment.3.txt b/tests/auto/declarative/qmlparser/listAssignment.3.txt index b776bee..00c4c6b 100644 --- a/tests/auto/declarative/qmlparser/listAssignment.3.txt +++ b/tests/auto/declarative/qmlparser/listAssignment.3.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyContainer { children: childBinding.expression children: childBinding2.expression diff --git a/tests/auto/declarative/qmlparser/missingObject.errors.txt b/tests/auto/declarative/qmlparser/missingObject.errors.txt index 8438b9e..b31b562 100644 --- a/tests/auto/declarative/qmlparser/missingObject.errors.txt +++ b/tests/auto/declarative/qmlparser/missingObject.errors.txt @@ -1 +1 @@ -1:10:Syntax error +1:10:Expected token `{' diff --git a/tests/auto/declarative/qmlparser/missingSignal.errors.txt b/tests/auto/declarative/qmlparser/missingSignal.errors.txt index bcee331..e243ae5 100644 --- a/tests/auto/declarative/qmlparser/missingSignal.errors.txt +++ b/tests/auto/declarative/qmlparser/missingSignal.errors.txt @@ -1 +1 @@ -2:5:Cannot assign to non-existant property "onClicked" +4:5:Cannot assign to non-existant property "onClicked" diff --git a/tests/auto/declarative/qmlparser/missingSignal.txt b/tests/auto/declarative/qmlparser/missingSignal.txt index 07d1bfa..fd489ca 100644 --- a/tests/auto/declarative/qmlparser/missingSignal.txt +++ b/tests/auto/declarative/qmlparser/missingSignal.txt @@ -1,3 +1,5 @@ +import Test 1.0 +import Qt 4.6 Object { onClicked: print("Hello world!") } diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.1.errors.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.1.errors.txt index 6f85946..cfc6fc8 100644 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.1.errors.txt +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.1.errors.txt @@ -1 +1 @@ -1:15:Cannot assign to non-existant property "something" +2:15:Cannot assign to non-existant property "something" diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.1.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.1.txt index 5023b38..df7406c 100644 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.1.txt +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.1.txt @@ -1 +1,2 @@ +import Test 1.0 MyQmlObject { something: 24 } diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.2.errors.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.2.errors.txt index 8d6dfb4..8b13585 100644 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.2.errors.txt +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.2.errors.txt @@ -1 +1 @@ -2:5:Cannot assign to non-existant property "something" +3:5:Cannot assign to non-existant property "something" diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.2.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.2.txt index 3b6cfa6..06ccd37 100644 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.2.txt +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.2.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { something: 24 } diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.3.errors.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.3.errors.txt index 8d6dfb4..8b13585 100644 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.3.errors.txt +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.3.errors.txt @@ -1 +1 @@ -2:5:Cannot assign to non-existant property "something" +3:5:Cannot assign to non-existant property "something" diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.3.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.3.txt index 61f3625..5b08608 100644 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.3.txt +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.3.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { something: 1 + 1 } diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.4.errors.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.4.errors.txt index 8d6dfb4..8b13585 100644 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.4.errors.txt +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.4.errors.txt @@ -1 +1 @@ -2:5:Cannot assign to non-existant property "something" +3:5:Cannot assign to non-existant property "something" diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.4.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.4.txt index 5ee1d3a..6579191 100644 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.4.txt +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.4.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { something: ; } diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.5.errors.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.5.errors.txt index 4234fca4..c07f2b9 100644 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.5.errors.txt +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.5.errors.txt @@ -1 +1 @@ -2:5:Unexpected token `numeric literal' +3:5:Expected a qualified name id diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.5.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.5.txt index 1dc6985..37af057 100644 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.5.txt +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.5.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { 24 } diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.6.errors.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.6.errors.txt index fac833e..c02d7bd 100644 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.6.errors.txt +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.6.errors.txt @@ -1 +1 @@ -2:5:Cannot assign to non-existant default property +3:5:Cannot assign to non-existant default property diff --git a/tests/auto/declarative/qmlparser/nonexistantProperty.6.txt b/tests/auto/declarative/qmlparser/nonexistantProperty.6.txt index 4940833..5cd55d0 100644 --- a/tests/auto/declarative/qmlparser/nonexistantProperty.6.txt +++ b/tests/auto/declarative/qmlparser/nonexistantProperty.6.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { MyQmlObject {} } diff --git a/tests/auto/declarative/qmlparser/nullDotProperty.errors.txt b/tests/auto/declarative/qmlparser/nullDotProperty.errors.txt index 8482634..07a4094 100644 --- a/tests/auto/declarative/qmlparser/nullDotProperty.errors.txt +++ b/tests/auto/declarative/qmlparser/nullDotProperty.errors.txt @@ -1 +1 @@ -2:-1:Cannot set properties on obj as it is null +3:-1:Cannot set properties on obj as it is null diff --git a/tests/auto/declarative/qmlparser/nullDotProperty.txt b/tests/auto/declarative/qmlparser/nullDotProperty.txt index 5c60c5b..4e36779 100644 --- a/tests/auto/declarative/qmlparser/nullDotProperty.txt +++ b/tests/auto/declarative/qmlparser/nullDotProperty.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyDotPropertyObject { obj.value: 1 } diff --git a/tests/auto/declarative/qmlparser/propertyValueSource.txt b/tests/auto/declarative/qmlparser/propertyValueSource.txt index 780f527..ad71fcf 100644 --- a/tests/auto/declarative/qmlparser/propertyValueSource.txt +++ b/tests/auto/declarative/qmlparser/propertyValueSource.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { intProperty : MyPropertyValueSource {} } diff --git a/tests/auto/declarative/qmlparser/readOnly.1.errors.txt b/tests/auto/declarative/qmlparser/readOnly.1.errors.txt index 8608370..97219af 100644 --- a/tests/auto/declarative/qmlparser/readOnly.1.errors.txt +++ b/tests/auto/declarative/qmlparser/readOnly.1.errors.txt @@ -1 +1 @@ -2:21:Invalid property assignment: read-only property +3:21:Invalid property assignment: read-only property diff --git a/tests/auto/declarative/qmlparser/readOnly.1.txt b/tests/auto/declarative/qmlparser/readOnly.1.txt index c47fdf3..60757bd 100644 --- a/tests/auto/declarative/qmlparser/readOnly.1.txt +++ b/tests/auto/declarative/qmlparser/readOnly.1.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { readOnlyString: "Hello World" } diff --git a/tests/auto/declarative/qmlparser/readOnly.2.errors.txt b/tests/auto/declarative/qmlparser/readOnly.2.errors.txt index 633d56f..471505c 100644 --- a/tests/auto/declarative/qmlparser/readOnly.2.errors.txt +++ b/tests/auto/declarative/qmlparser/readOnly.2.errors.txt @@ -1 +1 @@ -2:5:Invalid property assignment: read-only property +3:5:Invalid property assignment: read-only property diff --git a/tests/auto/declarative/qmlparser/readOnly.2.txt b/tests/auto/declarative/qmlparser/readOnly.2.txt index 2b6f733..8f1633c 100644 --- a/tests/auto/declarative/qmlparser/readOnly.2.txt +++ b/tests/auto/declarative/qmlparser/readOnly.2.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { readOnlyString: "Hello" + "World" } diff --git a/tests/auto/declarative/qmlparser/rootAsQmlComponent.txt b/tests/auto/declarative/qmlparser/rootAsQmlComponent.txt index 8cb57ff..8d72cd3 100644 --- a/tests/auto/declarative/qmlparser/rootAsQmlComponent.txt +++ b/tests/auto/declarative/qmlparser/rootAsQmlComponent.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyContainerComponent { x: 11 MyQmlObject {} diff --git a/tests/auto/declarative/qmlparser/simpleBindings.txt b/tests/auto/declarative/qmlparser/simpleBindings.txt index 78f2503..74867b3 100644 --- a/tests/auto/declarative/qmlparser/simpleBindings.txt +++ b/tests/auto/declarative/qmlparser/simpleBindings.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { id: Me property int v1: 10 diff --git a/tests/auto/declarative/qmlparser/simpleContainer.txt b/tests/auto/declarative/qmlparser/simpleContainer.txt index 8b30ed9..c3a795f 100644 --- a/tests/auto/declarative/qmlparser/simpleContainer.txt +++ b/tests/auto/declarative/qmlparser/simpleContainer.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyContainer { MyQmlObject {} MyQmlObject {} diff --git a/tests/auto/declarative/qmlparser/simpleObject.txt b/tests/auto/declarative/qmlparser/simpleObject.txt index 05ed87a..30c7823 100644 --- a/tests/auto/declarative/qmlparser/simpleObject.txt +++ b/tests/auto/declarative/qmlparser/simpleObject.txt @@ -1 +1,2 @@ +import Test 1.0 MyQmlObject {} diff --git a/tests/auto/declarative/qmlparser/testtypes.cpp b/tests/auto/declarative/qmlparser/testtypes.cpp index 69df5c3..19776a9 100644 --- a/tests/auto/declarative/qmlparser/testtypes.cpp +++ b/tests/auto/declarative/qmlparser/testtypes.cpp @@ -1,9 +1,9 @@ #include "testtypes.h" QML_DEFINE_INTERFACE(MyInterface); -QML_DEFINE_TYPE(MyQmlObject,MyQmlObject); -QML_DEFINE_TYPE(MyTypeObject,MyTypeObject); -QML_DEFINE_TYPE(MyContainer,MyContainer); -QML_DEFINE_TYPE(MyPropertyValueSource,MyPropertyValueSource); -QML_DEFINE_TYPE(MyDotPropertyObject,MyDotPropertyObject); +QML_DEFINE_TYPE(Test,1,0,0,MyQmlObject,MyQmlObject); +QML_DEFINE_TYPE(Test,1,0,0,MyTypeObject,MyTypeObject); +QML_DEFINE_TYPE(Test,1,0,0,MyContainer,MyContainer); +QML_DEFINE_TYPE(Test,1,0,0,MyPropertyValueSource,MyPropertyValueSource); +QML_DEFINE_TYPE(Test,1,0,0,MyDotPropertyObject,MyDotPropertyObject); diff --git a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp index eaa8267..92c23d4 100644 --- a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp +++ b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp @@ -46,6 +46,9 @@ private slots: void customVariantTypes(); void valueTypes(); + void imports_data(); + void imports(); + // regression tests for crashes void crash1(); @@ -55,6 +58,8 @@ private: #define VERIFY_ERRORS(errorfile) \ if (!errorfile) { \ + if (qgetenv("DEBUG") != "" && !component.errors().isEmpty()) \ + qWarning() << "Unexpected Errors:" << component.errors(); \ QVERIFY(!component.isError()); \ QVERIFY(component.errors().isEmpty()); \ } else { \ @@ -94,12 +99,12 @@ void tst_qmlparser::errors_data() QTest::addColumn<QString>("errorFile"); QTest::addColumn<bool>("create"); - QTest::newRow("nonExistantProperty.1") << "nonexistantProperty.1.txt" << "nonexistantProperty.1.errors.txt" << false; - QTest::newRow("nonExistantProperty.2") << "nonexistantProperty.2.txt" << "nonexistantProperty.2.errors.txt" << false; - QTest::newRow("nonExistantProperty.3") << "nonexistantProperty.3.txt" << "nonexistantProperty.3.errors.txt" << false; - QTest::newRow("nonExistantProperty.4") << "nonexistantProperty.4.txt" << "nonexistantProperty.4.errors.txt" << false; - QTest::newRow("nonExistantProperty.5") << "nonexistantProperty.5.txt" << "nonexistantProperty.5.errors.txt" << false; - QTest::newRow("nonExistantProperty.6") << "nonexistantProperty.6.txt" << "nonexistantProperty.6.errors.txt" << false; + QTest::newRow("nonexistantProperty.1") << "nonexistantProperty.1.txt" << "nonexistantProperty.1.errors.txt" << false; + QTest::newRow("nonexistantProperty.2") << "nonexistantProperty.2.txt" << "nonexistantProperty.2.errors.txt" << false; + QTest::newRow("nonexistantProperty.3") << "nonexistantProperty.3.txt" << "nonexistantProperty.3.errors.txt" << false; + QTest::newRow("nonexistantProperty.4") << "nonexistantProperty.4.txt" << "nonexistantProperty.4.errors.txt" << false; + QTest::newRow("nonexistantProperty.5") << "nonexistantProperty.5.txt" << "nonexistantProperty.5.errors.txt" << false; + QTest::newRow("nonexistantProperty.6") << "nonexistantProperty.6.txt" << "nonexistantProperty.6.errors.txt" << false; QTest::newRow("wrongType (string for int)") << "wrongType.1.txt" << "wrongType.1.errors.txt" << false; QTest::newRow("wrongType (int for bool)") << "wrongType.2.txt" << "wrongType.2.errors.txt" << false; @@ -168,6 +173,7 @@ void tst_qmlparser::simpleObject() void tst_qmlparser::simpleContainer() { QmlComponent component(&engine, TEST_FILE("simpleContainer.txt")); + VERIFY_ERRORS(0); MyContainer *container= qobject_cast<MyContainer*>(component.create()); QVERIFY(container != 0); QCOMPARE(container->children()->count(),2); @@ -176,6 +182,7 @@ void tst_qmlparser::simpleContainer() void tst_qmlparser::interfaceProperty() { QmlComponent component(&engine, TEST_FILE("interfaceProperty.txt")); + VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create()); QVERIFY(object != 0); QVERIFY(object->interface()); @@ -185,6 +192,7 @@ void tst_qmlparser::interfaceProperty() void tst_qmlparser::interfaceQmlList() { QmlComponent component(&engine, TEST_FILE("interfaceQmlList.txt")); + VERIFY_ERRORS(0); MyContainer *container= qobject_cast<MyContainer*>(component.create()); QVERIFY(container != 0); QVERIFY(container->qmllistAccessor().count() == 2); @@ -195,6 +203,7 @@ void tst_qmlparser::interfaceQmlList() void tst_qmlparser::interfaceQList() { QmlComponent component(&engine, TEST_FILE("interfaceQList.txt")); + VERIFY_ERRORS(0); MyContainer *container= qobject_cast<MyContainer*>(component.create()); QVERIFY(container != 0); QVERIFY(container->qlistInterfaces()->count() == 2); @@ -205,6 +214,7 @@ void tst_qmlparser::interfaceQList() void tst_qmlparser::assignObjectToSignal() { QmlComponent component(&engine, TEST_FILE("assignObjectToSignal.txt")); + VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create()); QVERIFY(object != 0); QTest::ignoreMessage(QtWarningMsg, "MyQmlObject::basicSlot"); @@ -214,6 +224,7 @@ void tst_qmlparser::assignObjectToSignal() void tst_qmlparser::assignObjectToVariant() { QmlComponent component(&engine, TEST_FILE("assignObjectToVariant.txt")); + VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); QVariant v = object->property("a"); @@ -223,6 +234,7 @@ void tst_qmlparser::assignObjectToVariant() void tst_qmlparser::assignLiteralSignalProperty() { QmlComponent component(&engine, TEST_FILE("assignLiteralSignalProperty.txt")); + VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create()); QVERIFY(object != 0); QCOMPARE(object->onLiteralSignal(), 10); @@ -232,6 +244,7 @@ void tst_qmlparser::assignLiteralSignalProperty() void tst_qmlparser::assignQmlComponent() { QmlComponent component(&engine, TEST_FILE("assignQmlComponent.txt")); + VERIFY_ERRORS(0); MyContainer *object = qobject_cast<MyContainer *>(component.create()); QVERIFY(object != 0); QVERIFY(object->children()->count() == 1); @@ -244,6 +257,7 @@ void tst_qmlparser::assignQmlComponent() void tst_qmlparser::assignBasicTypes() { QmlComponent component(&engine, TEST_FILE("assignBasicTypes.txt")); + VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); QCOMPARE(object->flagProperty(), MyTypeObject::FlagVal1 | MyTypeObject::FlagVal3); @@ -275,6 +289,7 @@ void tst_qmlparser::assignBasicTypes() void tst_qmlparser::assignTypeExtremes() { QmlComponent component(&engine, TEST_FILE("assignTypeExtremes.txt")); + VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); QCOMPARE(object->uintProperty(), 0xEE6B2800); @@ -285,6 +300,7 @@ void tst_qmlparser::assignTypeExtremes() void tst_qmlparser::customParserTypes() { QmlComponent component(&engine, TEST_FILE("customParserTypes.txt")); + VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); QVERIFY(object->property("count") == QVariant(2)); @@ -294,6 +310,7 @@ void tst_qmlparser::customParserTypes() void tst_qmlparser::rootAsQmlComponent() { QmlComponent component(&engine, TEST_FILE("rootAsQmlComponent.txt")); + VERIFY_ERRORS(0); MyContainer *object = qobject_cast<MyContainer *>(component.create()); QVERIFY(object != 0); QCOMPARE(object->property("x"), QVariant(11)); @@ -304,6 +321,7 @@ void tst_qmlparser::rootAsQmlComponent() void tst_qmlparser::inlineQmlComponents() { QmlComponent component(&engine, TEST_FILE("inlineQmlComponents.txt")); + VERIFY_ERRORS(0); MyContainer *object = qobject_cast<MyContainer *>(component.create()); QVERIFY(object != 0); QCOMPARE(object->children()->count(), 1); @@ -318,6 +336,7 @@ void tst_qmlparser::inlineQmlComponents() void tst_qmlparser::idProperty() { QmlComponent component(&engine, TEST_FILE("idProperty.txt")); + VERIFY_ERRORS(0); MyContainer *object = qobject_cast<MyContainer *>(component.create()); QVERIFY(object != 0); QCOMPARE(object->children()->count(), 1); @@ -332,6 +351,7 @@ void tst_qmlparser::idProperty() void tst_qmlparser::assignSignal() { QmlComponent component(&engine, TEST_FILE("assignSignal.txt")); + VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast<MyQmlObject *>(component.create()); QVERIFY(object != 0); QTest::ignoreMessage(QtWarningMsg, "MyQmlObject::basicSlot"); @@ -342,6 +362,7 @@ void tst_qmlparser::assignSignal() void tst_qmlparser::dynamicProperties() { QmlComponent component(&engine, TEST_FILE("dynamicProperties.txt")); + VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("intProperty"), QVariant(10)); @@ -359,6 +380,7 @@ void tst_qmlparser::dynamicProperties() void tst_qmlparser::dynamicSignalsAndSlots() { QmlComponent component(&engine, TEST_FILE("dynamicSignalsAndSlots.txt")); + VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); QVERIFY(object->metaObject()->indexOfMethod("signal1()") != -1); @@ -370,6 +392,7 @@ void tst_qmlparser::dynamicSignalsAndSlots() void tst_qmlparser::simpleBindings() { QmlComponent component(&engine, TEST_FILE("simpleBindings.txt")); + VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("value1"), QVariant(10)); @@ -382,6 +405,7 @@ void tst_qmlparser::simpleBindings() void tst_qmlparser::autoComponentCreation() { QmlComponent component(&engine, TEST_FILE("autoComponentCreation.txt")); + VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); QVERIFY(object->componentProperty() != 0); @@ -393,6 +417,7 @@ void tst_qmlparser::autoComponentCreation() void tst_qmlparser::propertyValueSource() { QmlComponent component(&engine, TEST_FILE("propertyValueSource.txt")); + VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); QList<QmlPropertyValueSource *> valueSources = @@ -408,6 +433,7 @@ void tst_qmlparser::propertyValueSource() void tst_qmlparser::attachedProperties() { QmlComponent component(&engine, TEST_FILE("attachedProperties.txt")); + VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); QObject *attached = qmlAttachedPropertiesObject<MyQmlObject>(object); @@ -419,6 +445,7 @@ void tst_qmlparser::attachedProperties() void tst_qmlparser::dynamicObjects() { QmlComponent component(&engine, TEST_FILE("dynamicObject.1.txt")); + VERIFY_ERRORS(0); QObject *object = component.create(); QVERIFY(object != 0); } @@ -427,6 +454,7 @@ void tst_qmlparser::dynamicObjects() void tst_qmlparser::customVariantTypes() { QmlComponent component(&engine, TEST_FILE("customVariantTypes.txt")); + VERIFY_ERRORS(0); MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create()); QVERIFY(object != 0); QCOMPARE(object->customType().a, 10); @@ -435,6 +463,7 @@ void tst_qmlparser::customVariantTypes() void tst_qmlparser::valueTypes() { QmlComponent component(&engine, TEST_FILE("valueTypes.txt")); + VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create()); QVERIFY(object != 0); @@ -457,6 +486,64 @@ void tst_qmlparser::valueTypes() QCOMPARE(p2.read(), QVariant(13)); } +class TestType : public QObject { + Q_OBJECT +public: + TestType(QObject *p=0) : QObject(p) {} +}; + +class TestType2 : public QObject { + Q_OBJECT +public: + TestType2(QObject *p=0) : QObject(p) {} +}; + +QML_DECLARE_TYPE(TestType) +QML_DECLARE_TYPE(TestType2) + +QML_DEFINE_TYPE(com.nokia.Test, 1, 0, 3, Test, TestType) +QML_DEFINE_TYPE(com.nokia.Test, 1, 5, 7, Test, TestType) +QML_DEFINE_TYPE(com.nokia.Test, 1, 8, 9, Test, TestType2) +QML_DEFINE_TYPE(com.nokia.Test, 1, 12, 13, Test, TestType2) +QML_DEFINE_TYPE(com.nokia.Test, 1, 9, 11, OldTest, TestType) + +void tst_qmlparser::imports_data() +{ + QTest::addColumn<QString>("qml"); + QTest::addColumn<QString>("type"); + + QTest::newRow("missing import") << "Test {}" << ""; + QTest::newRow("not in version 0.0") << "import com.nokia.Test 0.0\nTest {}" << ""; + QTest::newRow("in version 1.0") << "import com.nokia.Test 1.0\nTest {}" << "TestType"; + QTest::newRow("in version 1.1") << "import com.nokia.Test 1.1\nTest {}" << "TestType"; + QTest::newRow("in version 1.3") << "import com.nokia.Test 1.3\nTest {}" << "TestType"; + QTest::newRow("not in version 1.4") << "import com.nokia.Test 1.4\nTest {}" << ""; + QTest::newRow("in version 1.5") << "import com.nokia.Test 1.5\nTest {}" << "TestType"; + QTest::newRow("changed in version 1.8") << "import com.nokia.Test 1.8\nTest {}" << "TestType2"; + QTest::newRow("not in version 1.10") << "import com.nokia.Test 1.10\nTest {}" << ""; + QTest::newRow("back in version 1.12") << "import com.nokia.Test 1.12\nTest {}" << "TestType2"; + QTest::newRow("old in version 1.9") << "import com.nokia.Test 1.9\nOldTest {}" << "TestType"; + QTest::newRow("old in version 1.11") << "import com.nokia.Test 1.11\nOldTest {}" << "TestType"; + QTest::newRow("no old in version 1.12") << "import com.nokia.Test 1.12\nOldTest {}" << ""; +} + +// Tests the registration of custom variant string converters +void tst_qmlparser::imports() +{ + QFETCH(QString, qml); + QFETCH(QString, type); + + QmlComponent component(&engine, qml.toUtf8(), TEST_FILE("empty.txt")); + + if (type.isEmpty()) { + QVERIFY(component.isError()); + } else { + QObject *object = component.create(); + QVERIFY(object != 0); + QCOMPARE(QString(object->metaObject()->className()), type); + } +} + void tst_qmlparser::crash1() { QmlComponent component(&engine, "Component {}"); diff --git a/tests/auto/declarative/qmlparser/unregisteredObject.txt b/tests/auto/declarative/qmlparser/unregisteredObject.txt index ff46457..9498e31 100644 --- a/tests/auto/declarative/qmlparser/unregisteredObject.txt +++ b/tests/auto/declarative/qmlparser/unregisteredObject.txt @@ -1 +1,2 @@ +import Test 1.0 UnregisteredObject {} diff --git a/tests/auto/declarative/qmlparser/unsupportedProperty.errors.txt b/tests/auto/declarative/qmlparser/unsupportedProperty.errors.txt index 7ccfc75..3a90a7d 100644 --- a/tests/auto/declarative/qmlparser/unsupportedProperty.errors.txt +++ b/tests/auto/declarative/qmlparser/unsupportedProperty.errors.txt @@ -1 +1 @@ -2:13:Invalid property assignment: unknown type QVariant::QMatrix +3:13:Invalid property assignment: unknown type QVariant::QMatrix diff --git a/tests/auto/declarative/qmlparser/unsupportedProperty.txt b/tests/auto/declarative/qmlparser/unsupportedProperty.txt index bbbd31d..9f19680 100644 --- a/tests/auto/declarative/qmlparser/unsupportedProperty.txt +++ b/tests/auto/declarative/qmlparser/unsupportedProperty.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { matrix: "1,0,0,0,1,0,0,0,1" } diff --git a/tests/auto/declarative/qmlparser/valueTypes.txt b/tests/auto/declarative/qmlparser/valueTypes.txt index 0d670af..bf325a7 100644 --- a/tests/auto/declarative/qmlparser/valueTypes.txt +++ b/tests/auto/declarative/qmlparser/valueTypes.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { rectProperty.x: 10 rectProperty.y: 11 diff --git a/tests/auto/declarative/qmlparser/wrongType.1.errors.txt b/tests/auto/declarative/qmlparser/wrongType.1.errors.txt index 194da94..ba7a076 100644 --- a/tests/auto/declarative/qmlparser/wrongType.1.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.1.errors.txt @@ -1 +1 @@ -2:12:Invalid property assignment: int expected +3:12:Invalid property assignment: int expected diff --git a/tests/auto/declarative/qmlparser/wrongType.1.txt b/tests/auto/declarative/qmlparser/wrongType.1.txt index 281a227..289d37f 100644 --- a/tests/auto/declarative/qmlparser/wrongType.1.txt +++ b/tests/auto/declarative/qmlparser/wrongType.1.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { value: "hello" } diff --git a/tests/auto/declarative/qmlparser/wrongType.10.errors.txt b/tests/auto/declarative/qmlparser/wrongType.10.errors.txt index f391e2a..ae75b52 100644 --- a/tests/auto/declarative/qmlparser/wrongType.10.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.10.errors.txt @@ -1 +1 @@ -2:23:Invalid property assignment: datetime expected +3:23:Invalid property assignment: datetime expected diff --git a/tests/auto/declarative/qmlparser/wrongType.10.txt b/tests/auto/declarative/qmlparser/wrongType.10.txt index 07a90e0..2cf0e50 100644 --- a/tests/auto/declarative/qmlparser/wrongType.10.txt +++ b/tests/auto/declarative/qmlparser/wrongType.10.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { dateTimeProperty: 12 } diff --git a/tests/auto/declarative/qmlparser/wrongType.11.errors.txt b/tests/auto/declarative/qmlparser/wrongType.11.errors.txt index 9f5ebc9..23a4cda 100644 --- a/tests/auto/declarative/qmlparser/wrongType.11.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.11.errors.txt @@ -1 +1 @@ -2:20:Invalid property assignment: point expected +3:20:Invalid property assignment: point expected diff --git a/tests/auto/declarative/qmlparser/wrongType.11.txt b/tests/auto/declarative/qmlparser/wrongType.11.txt index 90a3797..ae77ba1 100644 --- a/tests/auto/declarative/qmlparser/wrongType.11.txt +++ b/tests/auto/declarative/qmlparser/wrongType.11.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { pointProperty: "apples" } diff --git a/tests/auto/declarative/qmlparser/wrongType.12.errors.txt b/tests/auto/declarative/qmlparser/wrongType.12.errors.txt index 4bbb2bf..3092100 100644 --- a/tests/auto/declarative/qmlparser/wrongType.12.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.12.errors.txt @@ -1 +1 @@ -2:19:Invalid property assignment: size expected +3:19:Invalid property assignment: size expected diff --git a/tests/auto/declarative/qmlparser/wrongType.12.txt b/tests/auto/declarative/qmlparser/wrongType.12.txt index c3fa4a0..b7a366f 100644 --- a/tests/auto/declarative/qmlparser/wrongType.12.txt +++ b/tests/auto/declarative/qmlparser/wrongType.12.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { sizeProperty: "red" } diff --git a/tests/auto/declarative/qmlparser/wrongType.13.errors.txt b/tests/auto/declarative/qmlparser/wrongType.13.errors.txt index 194da94..ba7a076 100644 --- a/tests/auto/declarative/qmlparser/wrongType.13.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.13.errors.txt @@ -1 +1 @@ -2:12:Invalid property assignment: int expected +3:12:Invalid property assignment: int expected diff --git a/tests/auto/declarative/qmlparser/wrongType.13.txt b/tests/auto/declarative/qmlparser/wrongType.13.txt index 075ec03..477aff1 100644 --- a/tests/auto/declarative/qmlparser/wrongType.13.txt +++ b/tests/auto/declarative/qmlparser/wrongType.13.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { value: "12" } diff --git a/tests/auto/declarative/qmlparser/wrongType.14.errors.txt b/tests/auto/declarative/qmlparser/wrongType.14.errors.txt index f90b8c6..d621fdd 100644 --- a/tests/auto/declarative/qmlparser/wrongType.14.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.14.errors.txt @@ -1 +1 @@ -2:21:Invalid property assignment: string expected +3:21:Invalid property assignment: string expected diff --git a/tests/auto/declarative/qmlparser/wrongType.14.txt b/tests/auto/declarative/qmlparser/wrongType.14.txt index 3d39c87..672d693 100644 --- a/tests/auto/declarative/qmlparser/wrongType.14.txt +++ b/tests/auto/declarative/qmlparser/wrongType.14.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { stringProperty: 10 } diff --git a/tests/auto/declarative/qmlparser/wrongType.2.errors.txt b/tests/auto/declarative/qmlparser/wrongType.2.errors.txt index 4353165..9ff9f25 100644 --- a/tests/auto/declarative/qmlparser/wrongType.2.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.2.errors.txt @@ -1 +1 @@ -2:14:Invalid property assignment: boolean expected +3:14:Invalid property assignment: boolean expected diff --git a/tests/auto/declarative/qmlparser/wrongType.2.txt b/tests/auto/declarative/qmlparser/wrongType.2.txt index cdedf8c..34b74f7 100644 --- a/tests/auto/declarative/qmlparser/wrongType.2.txt +++ b/tests/auto/declarative/qmlparser/wrongType.2.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { enabled: 5 } diff --git a/tests/auto/declarative/qmlparser/wrongType.3.errors.txt b/tests/auto/declarative/qmlparser/wrongType.3.errors.txt index 87b4eed..6d971c6 100644 --- a/tests/auto/declarative/qmlparser/wrongType.3.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.3.errors.txt @@ -1 +1 @@ -2:11:Invalid property assignment: rect expected +3:11:Invalid property assignment: rect expected diff --git a/tests/auto/declarative/qmlparser/wrongType.3.txt b/tests/auto/declarative/qmlparser/wrongType.3.txt index 839e0c7..384181a 100644 --- a/tests/auto/declarative/qmlparser/wrongType.3.txt +++ b/tests/auto/declarative/qmlparser/wrongType.3.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyQmlObject { rect: "5,5x10" } diff --git a/tests/auto/declarative/qmlparser/wrongType.4.errors.txt b/tests/auto/declarative/qmlparser/wrongType.4.errors.txt index 57a0744..ef34d0e 100644 --- a/tests/auto/declarative/qmlparser/wrongType.4.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.4.errors.txt @@ -1 +1 @@ -2:19:Invalid property assignment: unknown enumeration +3:19:Invalid property assignment: unknown enumeration diff --git a/tests/auto/declarative/qmlparser/wrongType.4.txt b/tests/auto/declarative/qmlparser/wrongType.4.txt index 6fa4a9c..0787bf5 100644 --- a/tests/auto/declarative/qmlparser/wrongType.4.txt +++ b/tests/auto/declarative/qmlparser/wrongType.4.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { enumProperty: "InvalidEnumName" } diff --git a/tests/auto/declarative/qmlparser/wrongType.5.errors.txt b/tests/auto/declarative/qmlparser/wrongType.5.errors.txt index 0023d1d..cab10bd 100644 --- a/tests/auto/declarative/qmlparser/wrongType.5.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.5.errors.txt @@ -1 +1 @@ -2:19:Invalid property assignment: unsigned int expected +3:19:Invalid property assignment: unsigned int expected diff --git a/tests/auto/declarative/qmlparser/wrongType.5.txt b/tests/auto/declarative/qmlparser/wrongType.5.txt index 95b0904..c50ae9a 100644 --- a/tests/auto/declarative/qmlparser/wrongType.5.txt +++ b/tests/auto/declarative/qmlparser/wrongType.5.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { uintProperty: -13 } diff --git a/tests/auto/declarative/qmlparser/wrongType.6.errors.txt b/tests/auto/declarative/qmlparser/wrongType.6.errors.txt index 06349e7..d0a0b00 100644 --- a/tests/auto/declarative/qmlparser/wrongType.6.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.6.errors.txt @@ -1 +1 @@ -2:19:Invalid property assignment: double expected +3:19:Invalid property assignment: double expected diff --git a/tests/auto/declarative/qmlparser/wrongType.6.txt b/tests/auto/declarative/qmlparser/wrongType.6.txt index 78351f4..da10b78 100644 --- a/tests/auto/declarative/qmlparser/wrongType.6.txt +++ b/tests/auto/declarative/qmlparser/wrongType.6.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { realProperty: "Hello" } diff --git a/tests/auto/declarative/qmlparser/wrongType.7.errors.txt b/tests/auto/declarative/qmlparser/wrongType.7.errors.txt index e053f3b..614346b 100644 --- a/tests/auto/declarative/qmlparser/wrongType.7.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.7.errors.txt @@ -1 +1 @@ -2:20:Invalid property assignment: color expected +3:20:Invalid property assignment: color expected diff --git a/tests/auto/declarative/qmlparser/wrongType.7.txt b/tests/auto/declarative/qmlparser/wrongType.7.txt index 8279ffa..ddc3835 100644 --- a/tests/auto/declarative/qmlparser/wrongType.7.txt +++ b/tests/auto/declarative/qmlparser/wrongType.7.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { colorProperty: 12 } diff --git a/tests/auto/declarative/qmlparser/wrongType.8.errors.txt b/tests/auto/declarative/qmlparser/wrongType.8.errors.txt index b11f92b..1773c00 100644 --- a/tests/auto/declarative/qmlparser/wrongType.8.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.8.errors.txt @@ -1 +1 @@ -2:19:Invalid property assignment: date expected +3:19:Invalid property assignment: date expected diff --git a/tests/auto/declarative/qmlparser/wrongType.8.txt b/tests/auto/declarative/qmlparser/wrongType.8.txt index e1cfe9a..a5f6756 100644 --- a/tests/auto/declarative/qmlparser/wrongType.8.txt +++ b/tests/auto/declarative/qmlparser/wrongType.8.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { dateProperty: 12 } diff --git a/tests/auto/declarative/qmlparser/wrongType.9.errors.txt b/tests/auto/declarative/qmlparser/wrongType.9.errors.txt index 419a5ce..8630975 100644 --- a/tests/auto/declarative/qmlparser/wrongType.9.errors.txt +++ b/tests/auto/declarative/qmlparser/wrongType.9.errors.txt @@ -1 +1 @@ -2:19:Invalid property assignment: time expected +3:19:Invalid property assignment: time expected diff --git a/tests/auto/declarative/qmlparser/wrongType.9.txt b/tests/auto/declarative/qmlparser/wrongType.9.txt index 84dfa66..a3db732 100644 --- a/tests/auto/declarative/qmlparser/wrongType.9.txt +++ b/tests/auto/declarative/qmlparser/wrongType.9.txt @@ -1,3 +1,4 @@ +import Test 1.0 MyTypeObject { timeProperty: 12 } |