diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-03-17 06:26:20 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-03-17 06:26:20 (GMT) |
commit | 1c4bb7a951ae50983a38acaf633eab272d3603b9 (patch) | |
tree | 09adb6ee05b253858447192bac9991554e3675e6 /tests/auto/declarative/qdeclarativelistmodel | |
parent | 0a52765f1c7fbd7d5286bcaab32cff35feb89a95 (diff) | |
download | Qt-1c4bb7a951ae50983a38acaf633eab272d3603b9.zip Qt-1c4bb7a951ae50983a38acaf633eab272d3603b9.tar.gz Qt-1c4bb7a951ae50983a38acaf633eab272d3603b9.tar.bz2 |
Allow enum constants as list element properties.
Task-number: QTBUG-5974
Diffstat (limited to 'tests/auto/declarative/qdeclarativelistmodel')
-rw-r--r-- | tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp index 78e5912..576fe21 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp +++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include <qtest.h> #include <QtDeclarative/private/qdeclarativeitem_p.h> +#include <QtDeclarative/private/qdeclarativetext_p.h> #include <QtDeclarative/private/qdeclarativelistmodel_p.h> #include <QtDeclarative/private/qdeclarativeexpression_p.h> #include <QDeclarativeComponent> @@ -459,7 +460,7 @@ void tst_QDeclarativeListModel::static_types_data() QTest::newRow("enum") << "ListElement { foo: Text.AlignHCenter }" - << QVariant("QTBUG-5974:ListElement: constant script support for property value"); + << QVariant(double(QDeclarativeText::AlignHCenter)); } void tst_QDeclarativeListModel::static_types() @@ -516,7 +517,7 @@ void tst_QDeclarativeListModel::error_data() QTest::newRow("bindings not allowed in ListElement") << "import Qt 4.6\nRectangle { id: rect; ListModel { ListElement { foo: rect.color } } }" - << "ListElement: cannot use script for property value"; // but note QTBUG-5974 + << "ListElement: cannot use script for property value"; QTest::newRow("random object list properties allowed in ListElement") << "import Qt 4.6\nListModel { ListElement { foo: [ ListElement { bar: 123 } ] } }" |