summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-05 03:49:05 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-05 03:49:05 (GMT)
commitdeca6c1c9885554e4e51ebd6dafdd78a424904e4 (patch)
tree01d9fae8e989abbd16e6dcdad030dc47ce0b0787
parent135a035362939b1c80d504e641f7dcb20f33a17b (diff)
parent541d800f6b6597712cb705d30e1f4060a1536843 (diff)
downloadQt-deca6c1c9885554e4e51ebd6dafdd78a424904e4.zip
Qt-deca6c1c9885554e4e51ebd6dafdd78a424904e4.tar.gz
Qt-deca6c1c9885554e4e51ebd6dafdd78a424904e4.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsimagebase_p.h2
-rw-r--r--tests/auto/declarative/declarative.pro1
-rw-r--r--tests/auto/declarative/qmlfontloader/tst_qmlfontloader.cpp6
-rw-r--r--tests/auto/declarative/qmlgraphicsborderimage/data/invalid.sci7
-rw-r--r--tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp91
-rw-r--r--tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp5
-rw-r--r--tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp12
-rw-r--r--tests/auto/declarative/valuetypes/data/font_read.qml18
-rw-r--r--tests/auto/declarative/valuetypes/data/font_write.2.qml6
-rw-r--r--tests/auto/declarative/valuetypes/data/font_write.3.qml7
-rw-r--r--tests/auto/declarative/valuetypes/data/font_write.qml16
-rw-r--r--tests/auto/declarative/valuetypes/data/point_read.qml7
-rw-r--r--tests/auto/declarative/valuetypes/data/point_write.qml6
-rw-r--r--tests/auto/declarative/valuetypes/data/pointf_read.qml8
-rw-r--r--tests/auto/declarative/valuetypes/data/pointf_write.qml6
-rw-r--r--tests/auto/declarative/valuetypes/data/rect_read.qml10
-rw-r--r--tests/auto/declarative/valuetypes/data/rect_write.qml9
-rw-r--r--tests/auto/declarative/valuetypes/data/rectf_read.qml10
-rw-r--r--tests/auto/declarative/valuetypes/data/rectf_write.qml9
-rw-r--r--tests/auto/declarative/valuetypes/data/size_read.qml8
-rw-r--r--tests/auto/declarative/valuetypes/data/size_write.qml7
-rw-r--r--tests/auto/declarative/valuetypes/data/sizef_read.qml9
-rw-r--r--tests/auto/declarative/valuetypes/data/sizef_write.qml6
-rw-r--r--tests/auto/declarative/valuetypes/data/vector3d_read.qml9
-rw-r--r--tests/auto/declarative/valuetypes/data/vector3d_write.qml8
-rw-r--r--tests/auto/declarative/valuetypes/testtypes.cpp43
-rw-r--r--tests/auto/declarative/valuetypes/testtypes.h128
-rw-r--r--tests/auto/declarative/valuetypes/tst_valuetypes.cpp330
-rw-r--r--tests/auto/declarative/valuetypes/valuetypes.pro10
29 files changed, 758 insertions, 36 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsimagebase_p.h b/src/declarative/graphicsitems/qmlgraphicsimagebase_p.h
index c8f8e85..0968d99 100644
--- a/src/declarative/graphicsitems/qmlgraphicsimagebase_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsimagebase_p.h
@@ -49,7 +49,7 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
class QmlGraphicsImageBasePrivate;
-class QmlGraphicsImageBase : public QmlGraphicsItem
+class Q_DECLARATIVE_EXPORT QmlGraphicsImageBase : public QmlGraphicsItem
{
Q_OBJECT
Q_ENUMS(Status)
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 1be38a8..b9f59d6 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -35,6 +35,7 @@ SUBDIRS += \
repeater \ # Cover
sql \ # Cover
states \ # Cover
+ valuetypes \ # Cover
visual # Cover
# Tests which should run in Pulse
diff --git a/tests/auto/declarative/qmlfontloader/tst_qmlfontloader.cpp b/tests/auto/declarative/qmlfontloader/tst_qmlfontloader.cpp
index efc86cd..23f7025 100644
--- a/tests/auto/declarative/qmlfontloader/tst_qmlfontloader.cpp
+++ b/tests/auto/declarative/qmlfontloader/tst_qmlfontloader.cpp
@@ -77,6 +77,7 @@ void tst_qmlfontloader::noFont()
QVERIFY(fontObject != 0);
QCOMPARE(fontObject->name(), QString(""));
+ QCOMPARE(fontObject->source(), QUrl(""));
QTRY_VERIFY(fontObject->status() == QmlFontLoader::Null);
delete fontObject;
@@ -89,6 +90,7 @@ void tst_qmlfontloader::namedFont()
QmlFontLoader *fontObject = qobject_cast<QmlFontLoader*>(component.create());
QVERIFY(fontObject != 0);
+ QCOMPARE(fontObject->source(), QUrl(""));
QCOMPARE(fontObject->name(), QString("Helvetica"));
QTRY_VERIFY(fontObject->status() == QmlFontLoader::Ready);
}
@@ -100,6 +102,7 @@ void tst_qmlfontloader::localFont()
QmlFontLoader *fontObject = qobject_cast<QmlFontLoader*>(component.create());
QVERIFY(fontObject != 0);
+ QVERIFY(fontObject->source() != QUrl(""));
QTRY_COMPARE(fontObject->name(), QString("Fontin"));
QTRY_VERIFY(fontObject->status() == QmlFontLoader::Ready);
}
@@ -111,6 +114,7 @@ void tst_qmlfontloader::failLocalFont()
QmlFontLoader *fontObject = qobject_cast<QmlFontLoader*>(component.create());
QVERIFY(fontObject != 0);
+ QVERIFY(fontObject->source() != QUrl(""));
QTRY_COMPARE(fontObject->name(), QString(""));
QTRY_VERIFY(fontObject->status() == QmlFontLoader::Error);
}
@@ -122,6 +126,7 @@ void tst_qmlfontloader::webFont()
QmlFontLoader *fontObject = qobject_cast<QmlFontLoader*>(component.create());
QVERIFY(fontObject != 0);
+ QVERIFY(fontObject->source() != QUrl(""));
QTRY_COMPARE(fontObject->name(), QString("Starburst"));
QTRY_VERIFY(fontObject->status() == QmlFontLoader::Ready);
}
@@ -133,6 +138,7 @@ void tst_qmlfontloader::failWebFont()
QmlFontLoader *fontObject = qobject_cast<QmlFontLoader*>(component.create());
QVERIFY(fontObject != 0);
+ QVERIFY(fontObject->source() != QUrl(""));
QTRY_COMPARE(fontObject->name(), QString(""));
QTRY_VERIFY(fontObject->status() == QmlFontLoader::Error);
}
diff --git a/tests/auto/declarative/qmlgraphicsborderimage/data/invalid.sci b/tests/auto/declarative/qmlgraphicsborderimage/data/invalid.sci
new file mode 100644
index 0000000..98c72c9
--- /dev/null
+++ b/tests/auto/declarative/qmlgraphicsborderimage/data/invalid.sci
@@ -0,0 +1,7 @@
+border.left:10
+border.top:20
+border.down:30
+border.up:40
+horizontalTileRule:Roun
+verticalTileRule:Repea
+source:colors.png
diff --git a/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp b/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp
index 4174ccf..aa732c5 100644
--- a/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp
+++ b/tests/auto/declarative/qmlgraphicsborderimage/tst_qmlgraphicsborderimage.cpp
@@ -54,11 +54,13 @@ public:
tst_qmlgraphicsborderimage();
private slots:
+ void noSource();
void simple();
void resized();
void smooth();
void tileModes();
void sciFile();
+ void invalidSciFile();
private:
QmlEngine engine;
@@ -68,16 +70,32 @@ tst_qmlgraphicsborderimage::tst_qmlgraphicsborderimage()
{
}
+void tst_qmlgraphicsborderimage::noSource()
+{
+ QString componentStr = "import Qt 4.6\nBorderImage { source: \"\" }";
+ QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://"));
+ QmlGraphicsBorderImage *obj = qobject_cast<QmlGraphicsBorderImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->source(), QUrl());
+ QCOMPARE(obj->width(), 0.);
+ QCOMPARE(obj->height(), 0.);
+ QCOMPARE(obj->horizontalTileMode(), QmlGraphicsBorderImage::Stretch);
+ QCOMPARE(obj->verticalTileMode(), QmlGraphicsBorderImage::Stretch);
+
+ delete obj;
+}
+
void tst_qmlgraphicsborderimage::simple()
{
QString componentStr = "import Qt 4.6\nBorderImage { source: \"" SRCDIR "/data/colors.png\" }";
QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://"));
QmlGraphicsBorderImage *obj = qobject_cast<QmlGraphicsBorderImage*>(component.create());
QVERIFY(obj != 0);
- QVERIFY(obj->width() == 120);
- QVERIFY(obj->height() == 120);
- QVERIFY(obj->horizontalTileMode() == QmlGraphicsBorderImage::Stretch);
- QVERIFY(obj->verticalTileMode() == QmlGraphicsBorderImage::Stretch);
+ QCOMPARE(obj->source(), QUrl("file://" SRCDIR "/data/colors.png"));
+ QCOMPARE(obj->width(), 120.);
+ QCOMPARE(obj->height(), 120.);
+ QCOMPARE(obj->horizontalTileMode(), QmlGraphicsBorderImage::Stretch);
+ QCOMPARE(obj->verticalTileMode(), QmlGraphicsBorderImage::Stretch);
delete obj;
}
@@ -88,10 +106,10 @@ void tst_qmlgraphicsborderimage::resized()
QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://"));
QmlGraphicsBorderImage *obj = qobject_cast<QmlGraphicsBorderImage*>(component.create());
QVERIFY(obj != 0);
- QVERIFY(obj->width() == 300);
- QVERIFY(obj->height() == 300);
- QVERIFY(obj->horizontalTileMode() == QmlGraphicsBorderImage::Stretch);
- QVERIFY(obj->verticalTileMode() == QmlGraphicsBorderImage::Stretch);
+ QCOMPARE(obj->width(), 300.);
+ QCOMPARE(obj->height(), 300.);
+ QCOMPARE(obj->horizontalTileMode(), QmlGraphicsBorderImage::Stretch);
+ QCOMPARE(obj->verticalTileMode(), QmlGraphicsBorderImage::Stretch);
delete obj;
}
@@ -102,11 +120,11 @@ void tst_qmlgraphicsborderimage::smooth()
QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://"));
QmlGraphicsBorderImage *obj = qobject_cast<QmlGraphicsBorderImage*>(component.create());
QVERIFY(obj != 0);
- QVERIFY(obj->width() == 300);
- QVERIFY(obj->height() == 300);
- QVERIFY(obj->smooth() == true);
- QVERIFY(obj->horizontalTileMode() == QmlGraphicsBorderImage::Stretch);
- QVERIFY(obj->verticalTileMode() == QmlGraphicsBorderImage::Stretch);
+ QCOMPARE(obj->width(), 300.);
+ QCOMPARE(obj->height(), 300.);
+ QCOMPARE(obj->smooth(), true);
+ QCOMPARE(obj->horizontalTileMode(), QmlGraphicsBorderImage::Stretch);
+ QCOMPARE(obj->verticalTileMode(), QmlGraphicsBorderImage::Stretch);
delete obj;
}
@@ -118,10 +136,10 @@ void tst_qmlgraphicsborderimage::tileModes()
QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://"));
QmlGraphicsBorderImage *obj = qobject_cast<QmlGraphicsBorderImage*>(component.create());
QVERIFY(obj != 0);
- QVERIFY(obj->width() == 100);
- QVERIFY(obj->height() == 300);
- QVERIFY(obj->horizontalTileMode() == QmlGraphicsBorderImage::Repeat);
- QVERIFY(obj->verticalTileMode() == QmlGraphicsBorderImage::Repeat);
+ QCOMPARE(obj->width(), 100.);
+ QCOMPARE(obj->height(), 300.);
+ QCOMPARE(obj->horizontalTileMode(), QmlGraphicsBorderImage::Repeat);
+ QCOMPARE(obj->verticalTileMode(), QmlGraphicsBorderImage::Repeat);
delete obj;
}
@@ -130,10 +148,10 @@ void tst_qmlgraphicsborderimage::tileModes()
QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://"));
QmlGraphicsBorderImage *obj = qobject_cast<QmlGraphicsBorderImage*>(component.create());
QVERIFY(obj != 0);
- QVERIFY(obj->width() == 300);
- QVERIFY(obj->height() == 150);
- QVERIFY(obj->horizontalTileMode() == QmlGraphicsBorderImage::Round);
- QVERIFY(obj->verticalTileMode() == QmlGraphicsBorderImage::Round);
+ QCOMPARE(obj->width(), 300.);
+ QCOMPARE(obj->height(), 150.);
+ QCOMPARE(obj->horizontalTileMode(), QmlGraphicsBorderImage::Round);
+ QCOMPARE(obj->verticalTileMode(), QmlGraphicsBorderImage::Round);
delete obj;
}
@@ -145,14 +163,29 @@ void tst_qmlgraphicsborderimage::sciFile()
QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://"));
QmlGraphicsBorderImage *obj = qobject_cast<QmlGraphicsBorderImage*>(component.create());
QVERIFY(obj != 0);
- QVERIFY(obj->width() == 300);
- QVERIFY(obj->height() == 300);
- QVERIFY(obj->border()->left() == 10);
- QVERIFY(obj->border()->top() == 20);
- QVERIFY(obj->border()->right() == 30);
- QVERIFY(obj->border()->bottom() == 40);
- QVERIFY(obj->horizontalTileMode() == QmlGraphicsBorderImage::Round);
- QVERIFY(obj->verticalTileMode() == QmlGraphicsBorderImage::Repeat);
+ QCOMPARE(obj->width(), 300.);
+ QCOMPARE(obj->height(), 300.);
+ QCOMPARE(obj->border()->left(), 10);
+ QCOMPARE(obj->border()->top(), 20);
+ QCOMPARE(obj->border()->right(), 30);
+ QCOMPARE(obj->border()->bottom(), 40);
+ QCOMPARE(obj->horizontalTileMode(), QmlGraphicsBorderImage::Round);
+ QCOMPARE(obj->verticalTileMode(), QmlGraphicsBorderImage::Repeat);
+
+ delete obj;
+}
+
+void tst_qmlgraphicsborderimage::invalidSciFile()
+{
+ QString componentStr = "import Qt 4.6\nBorderImage { source: \"" SRCDIR "/data/invalid.sci\"; width: 300; height: 300 }";
+ QmlComponent component(&engine, componentStr.toLatin1(), QUrl("file://"));
+ QmlGraphicsBorderImage *obj = qobject_cast<QmlGraphicsBorderImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->width(), 300.);
+ QCOMPARE(obj->height(), 300.);
+ QCOMPARE(obj->status(), QmlGraphicsImageBase::Error);
+ QCOMPARE(obj->horizontalTileMode(), QmlGraphicsBorderImage::Stretch);
+ QCOMPARE(obj->verticalTileMode(), QmlGraphicsBorderImage::Stretch);
delete obj;
}
diff --git a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
index fc47d41..ba5c835 100644
--- a/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
+++ b/tests/auto/declarative/qmlgraphicstext/tst_qmlgraphicstext.cpp
@@ -273,7 +273,7 @@ void tst_qmlgraphicstext::wrap()
void tst_qmlgraphicstext::elide()
{
- for (Qt::TextElideMode m = Qt::ElideLeft; m<=Qt::ElideNone; m=Qt::TextElideMode(int(m)+1)) {
+ for (QmlGraphicsText::TextElideMode m = QmlGraphicsText::ElideLeft; m<=QmlGraphicsText::ElideNone; m=QmlGraphicsText::TextElideMode(int(m)+1)) {
const char* elidename[]={"ElideLeft", "ElideRight", "ElideMiddle", "ElideNone"};
QString elide = "elide: Text." + QString(elidename[int(m)]) + ";";
@@ -283,6 +283,7 @@ void tst_qmlgraphicstext::elide()
QmlComponent textComponent(&engine, ("import Qt 4.6\nText { text: \"\"; "+elide+" width: 100 }").toLatin1(), QUrl("file://"));
QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
+ QCOMPARE(textObject->elideMode(), m);
QCOMPARE(textObject->width(), 100.);
}
@@ -292,6 +293,7 @@ void tst_qmlgraphicstext::elide()
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
+ QCOMPARE(textObject->elideMode(), m);
QCOMPARE(textObject->width(), 100.);
}
@@ -302,6 +304,7 @@ void tst_qmlgraphicstext::elide()
QmlComponent textComponent(&engine, componentStr.toLatin1(), QUrl("file://"));
QmlGraphicsText *textObject = qobject_cast<QmlGraphicsText*>(textComponent.create());
+ QCOMPARE(textObject->elideMode(), m);
QCOMPARE(textObject->width(), 100.);
}
}
diff --git a/tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp b/tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp
index 9be77e8..ece6030 100644
--- a/tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp
+++ b/tests/auto/declarative/qmlpropertymap/tst_qmlpropertymap.cpp
@@ -95,13 +95,15 @@ void tst_QmlPropertyMap::operatorValue()
QmlPropertyMap map;
map.insert(QLatin1String("key1"),100);
map.insert(QLatin1String("key2"),200);
- QVERIFY(map.keys().count() == 2);
+ QVERIFY(map.count() == 2);
QVERIFY(map.contains(QLatin1String("key1")));
- QCOMPARE(map.value(QLatin1String("key1")), QVariant(100));
- QCOMPARE(map.value(QLatin1String("key2")), QVariant(200));
- QCOMPARE(map[QLatin1String("key1")], map.value(QLatin1String("key1")));
- QCOMPARE(map[QLatin1String("key2")], map.value(QLatin1String("key2")));
+ const QmlPropertyMap &constMap = map;
+
+ QCOMPARE(constMap.value(QLatin1String("key1")), QVariant(100));
+ QCOMPARE(constMap.value(QLatin1String("key2")), QVariant(200));
+ QCOMPARE(constMap[QLatin1String("key1")], constMap.value(QLatin1String("key1")));
+ QCOMPARE(constMap[QLatin1String("key2")], constMap.value(QLatin1String("key2")));
}
void tst_QmlPropertyMap::clear()
diff --git a/tests/auto/declarative/valuetypes/data/font_read.qml b/tests/auto/declarative/valuetypes/data/font_read.qml
new file mode 100644
index 0000000..e1d1ce0
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/font_read.qml
@@ -0,0 +1,18 @@
+import Test 1.0
+
+MyTypeObject {
+ property string f_family: font.family
+ property bool f_bold: font.bold
+ property int f_weight: font.weight
+ property bool f_italic: font.italic
+ property bool f_underline: font.underline
+ property bool f_overline: font.overline
+ property bool f_strikeout: font.strikeout
+ property real f_pointSize: font.pointSize
+ property int f_pixelSize: font.pixelSize
+ property int f_capitalization: font.capitalization
+ property real f_letterSpacing: font.letterSpacing
+ property real f_wordSpacing: font.wordSpacing;
+ property var copy: font
+}
+
diff --git a/tests/auto/declarative/valuetypes/data/font_write.2.qml b/tests/auto/declarative/valuetypes/data/font_write.2.qml
new file mode 100644
index 0000000..b559389
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/font_write.2.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ font.pixelSize: 10
+}
+
diff --git a/tests/auto/declarative/valuetypes/data/font_write.3.qml b/tests/auto/declarative/valuetypes/data/font_write.3.qml
new file mode 100644
index 0000000..913ac50
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/font_write.3.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ font.pixelSize: 10
+ font.pointSize: 19
+}
+
diff --git a/tests/auto/declarative/valuetypes/data/font_write.qml b/tests/auto/declarative/valuetypes/data/font_write.qml
new file mode 100644
index 0000000..ff4d0a1
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/font_write.qml
@@ -0,0 +1,16 @@
+import Test 1.0
+
+MyTypeObject {
+ font.family: if(1) "Helvetica"
+ font.bold: if(1) false
+ font.weight: "Normal"
+ font.italic: if(1) false
+ font.underline: if(1) false
+ font.overline: if(1) false
+ font.strikeout: if(1) false
+ font.pointSize: if(1) 15
+ font.capitalization: "AllLowercase"
+ font.letterSpacing: if(1) 9.7
+ font.wordSpacing: if(1) 11.2
+}
+
diff --git a/tests/auto/declarative/valuetypes/data/point_read.qml b/tests/auto/declarative/valuetypes/data/point_read.qml
new file mode 100644
index 0000000..3e67de6
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/point_read.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ property int p_x: point.x
+ property int p_y: point.y
+ property var copy: point
+}
diff --git a/tests/auto/declarative/valuetypes/data/point_write.qml b/tests/auto/declarative/valuetypes/data/point_write.qml
new file mode 100644
index 0000000..063525a
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/point_write.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ point.x: if (true) 11
+ point.y: if (true) 12
+}
diff --git a/tests/auto/declarative/valuetypes/data/pointf_read.qml b/tests/auto/declarative/valuetypes/data/pointf_read.qml
new file mode 100644
index 0000000..d845a5b
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/pointf_read.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+
+MyTypeObject {
+ property real p_x: pointf.x
+ property real p_y: pointf.y
+ property var copy: pointf
+}
+
diff --git a/tests/auto/declarative/valuetypes/data/pointf_write.qml b/tests/auto/declarative/valuetypes/data/pointf_write.qml
new file mode 100644
index 0000000..9ee3fc1
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/pointf_write.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ pointf.x: if (true) 6.8
+ pointf.y: if (true) 9.3
+}
diff --git a/tests/auto/declarative/valuetypes/data/rect_read.qml b/tests/auto/declarative/valuetypes/data/rect_read.qml
new file mode 100644
index 0000000..5364431
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/rect_read.qml
@@ -0,0 +1,10 @@
+import Test 1.0
+
+MyTypeObject {
+ property int r_x: rect.x
+ property int r_y: rect.y
+ property int r_width: rect.width
+ property int r_height: rect.height
+ property var copy: rect
+}
+
diff --git a/tests/auto/declarative/valuetypes/data/rect_write.qml b/tests/auto/declarative/valuetypes/data/rect_write.qml
new file mode 100644
index 0000000..8add453
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/rect_write.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+
+MyTypeObject {
+ rect.x: if (true) 1234
+ rect.y: if (true) 7
+ rect.width: if (true) 56
+ rect.height: if (true) 63
+}
+
diff --git a/tests/auto/declarative/valuetypes/data/rectf_read.qml b/tests/auto/declarative/valuetypes/data/rectf_read.qml
new file mode 100644
index 0000000..aeb9f41
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/rectf_read.qml
@@ -0,0 +1,10 @@
+import Test 1.0
+
+MyTypeObject {
+ property real r_x: rectf.x
+ property real r_y: rectf.y
+ property real r_width: rectf.width
+ property real r_height: rectf.height
+ property var copy: rectf
+}
+
diff --git a/tests/auto/declarative/valuetypes/data/rectf_write.qml b/tests/auto/declarative/valuetypes/data/rectf_write.qml
new file mode 100644
index 0000000..1e6ff4f
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/rectf_write.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+
+MyTypeObject {
+ rectf.x: if (true) 70.1
+ rectf.y: if (true) -113.2
+ rectf.width: if (true) 80924.8
+ rectf.height: if (true) 99.2
+}
+
diff --git a/tests/auto/declarative/valuetypes/data/size_read.qml b/tests/auto/declarative/valuetypes/data/size_read.qml
new file mode 100644
index 0000000..86dba03
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/size_read.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+
+MyTypeObject {
+ property int s_width: size.width
+ property int s_height: size.height
+ property var copy: size
+}
+
diff --git a/tests/auto/declarative/valuetypes/data/size_write.qml b/tests/auto/declarative/valuetypes/data/size_write.qml
new file mode 100644
index 0000000..2f9d10e
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/size_write.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ size.width: if (true) 13
+ size.height: if (true) 88
+}
+
diff --git a/tests/auto/declarative/valuetypes/data/sizef_read.qml b/tests/auto/declarative/valuetypes/data/sizef_read.qml
new file mode 100644
index 0000000..c6f34e4
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/sizef_read.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+
+MyTypeObject {
+ property real s_width: sizef.width
+ property real s_height: sizef.height
+ property var copy: sizef
+}
+
+
diff --git a/tests/auto/declarative/valuetypes/data/sizef_write.qml b/tests/auto/declarative/valuetypes/data/sizef_write.qml
new file mode 100644
index 0000000..f16f0bd
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/sizef_write.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyTypeObject {
+ sizef.width: if (true) 44.3
+ sizef.height: if (true) 92.8
+}
diff --git a/tests/auto/declarative/valuetypes/data/vector3d_read.qml b/tests/auto/declarative/valuetypes/data/vector3d_read.qml
new file mode 100644
index 0000000..abdf9f0
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/vector3d_read.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+
+MyTypeObject {
+ property real v_x: vector.x
+ property real v_y: vector.y
+ property real v_z: vector.z
+ property var copy: vector
+}
+
diff --git a/tests/auto/declarative/valuetypes/data/vector3d_write.qml b/tests/auto/declarative/valuetypes/data/vector3d_write.qml
new file mode 100644
index 0000000..9c1bf76
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/data/vector3d_write.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+
+MyTypeObject {
+ vector.x: if (true) -0.3
+ vector.y: if (true) -12.9
+ vector.z: if (true) 907.4
+}
+
diff --git a/tests/auto/declarative/valuetypes/testtypes.cpp b/tests/auto/declarative/valuetypes/testtypes.cpp
new file mode 100644
index 0000000..d57afaf
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/testtypes.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "testtypes.h"
+
+QML_DEFINE_TYPE(Test, 1, 0, 0, MyTypeObject, MyTypeObject);
diff --git a/tests/auto/declarative/valuetypes/testtypes.h b/tests/auto/declarative/valuetypes/testtypes.h
new file mode 100644
index 0000000..cc98d7c
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/testtypes.h
@@ -0,0 +1,128 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef TESTTYPES_H
+#define TESTTYPES_H
+
+#include <QObject>
+#include <QPoint>
+#include <QPointF>
+#include <QSize>
+#include <QSizeF>
+#include <QRect>
+#include <QRectF>
+#include <QVector3D>
+#include <QFont>
+#include <qml.h>
+
+class MyTypeObject : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QPoint point READ point WRITE setPoint NOTIFY changed);
+ Q_PROPERTY(QPointF pointf READ pointf WRITE setPointf NOTIFY changed);
+ Q_PROPERTY(QSize size READ size WRITE setSize NOTIFY changed);
+ Q_PROPERTY(QSizeF sizef READ sizef WRITE setSizef NOTIFY changed);
+ Q_PROPERTY(QRect rect READ rect WRITE setRect NOTIFY changed);
+ Q_PROPERTY(QRectF rectf READ rectf WRITE setRectf NOTIFY changed);
+ Q_PROPERTY(QVector3D vector READ vector WRITE setVector NOTIFY changed);
+ Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY changed);
+
+public:
+ MyTypeObject() :
+ m_point(10, 4),
+ m_pointf(11.3, -10.9),
+ m_size(1912, 1913),
+ m_sizef(0.1, 100923.2),
+ m_rect(2, 3, 109, 102),
+ m_rectf(103.8, 99.2, 88.1, 77.6),
+ m_vector(23.88, 3.1, 4.3)
+ {
+ m_font.setFamily("Arial");
+ m_font.setBold(true);
+ m_font.setWeight(QFont::DemiBold);
+ m_font.setItalic(true);
+ m_font.setUnderline(true);
+ m_font.setOverline(true);
+ m_font.setStrikeOut(true);
+ m_font.setPointSize(29);
+ m_font.setCapitalization(QFont::AllUppercase);
+ m_font.setLetterSpacing(QFont::AbsoluteSpacing, 10.2);
+ m_font.setWordSpacing(19.7);
+ }
+
+ QPoint m_point;
+ QPoint point() const { return m_point; }
+ void setPoint(const QPoint &v) { m_point = v; }
+
+ QPointF m_pointf;
+ QPointF pointf() const { return m_pointf; }
+ void setPointf(const QPointF &v) { m_pointf = v; }
+
+ QSize m_size;
+ QSize size() const { return m_size; }
+ void setSize(const QSize &v) { m_size = v; }
+
+ QSizeF m_sizef;
+ QSizeF sizef() const { return m_sizef; }
+ void setSizef(const QSizeF &v) { m_sizef = v; }
+
+ QRect m_rect;
+ QRect rect() const { return m_rect; }
+ void setRect(const QRect &v) { m_rect = v; }
+
+ QRectF m_rectf;
+ QRectF rectf() const { return m_rectf; }
+ void setRectf(const QRectF &v) { m_rectf = v; }
+
+ QVector3D m_vector;
+ QVector3D vector() const { return m_vector; }
+ void setVector(const QVector3D &v) { m_vector = v; }
+
+ QFont m_font;
+ QFont font() const { return m_font; }
+ void setFont(const QFont &v) { m_font = v; }
+
+signals:
+ void changed();
+};
+QML_DECLARE_TYPE(MyTypeObject);
+
+#endif // TESTTYPES_H
diff --git a/tests/auto/declarative/valuetypes/tst_valuetypes.cpp b/tests/auto/declarative/valuetypes/tst_valuetypes.cpp
new file mode 100644
index 0000000..a338e47
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/tst_valuetypes.cpp
@@ -0,0 +1,330 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QmlEngine>
+#include <QmlComponent>
+#include <QDebug>
+#include "testtypes.h"
+
+class tst_valuetypes : public QObject
+{
+ Q_OBJECT
+public:
+ tst_valuetypes() {}
+
+private slots:
+ void point();
+ void pointf();
+ void size();
+ void sizef();
+ void rect();
+ void rectf();
+ void vector3d();
+ void font();
+
+ // ###
+ // Test binding assignment
+ // Test static assignment
+ // Test JS assignment
+ // Test "font.x: blah; font: blah2;" conflict
+ // Test constant binding removal
+ // Test value sources
+ // Test behaviours
+private:
+ QmlEngine engine;
+};
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
+}
+
+void tst_valuetypes::point()
+{
+ {
+ QmlComponent component(&engine, TEST_FILE("point_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("p_x").toInt(), 10);
+ QCOMPARE(object->property("p_y").toInt(), 4);
+ QCOMPARE(object->property("copy"), QVariant(QPoint(10, 4)));
+
+ delete object;
+ }
+
+ {
+ QmlComponent component(&engine, TEST_FILE("point_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->point(), QPoint(11, 12));
+
+ delete object;
+ }
+}
+
+void tst_valuetypes::pointf()
+{
+ {
+ QmlComponent component(&engine, TEST_FILE("pointf_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("p_x").toDouble(), 11.3);
+ QCOMPARE(object->property("p_y").toDouble(), -10.9);
+ QCOMPARE(object->property("copy"), QVariant(QPointF(11.3, -10.9)));
+
+ delete object;
+ }
+
+ {
+ QmlComponent component(&engine, TEST_FILE("pointf_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->pointf(), QPointF(6.8, 9.3));
+
+ delete object;
+ }
+}
+
+void tst_valuetypes::size()
+{
+ {
+ QmlComponent component(&engine, TEST_FILE("size_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("s_width").toInt(), 1912);
+ QCOMPARE(object->property("s_height").toInt(), 1913);
+ QCOMPARE(object->property("copy"), QVariant(QSize(1912, 1913)));
+
+ delete object;
+ }
+
+ {
+ QmlComponent component(&engine, TEST_FILE("size_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->size(), QSize(13, 88));
+
+ delete object;
+ }
+}
+
+void tst_valuetypes::sizef()
+{
+ {
+ QmlComponent component(&engine, TEST_FILE("sizef_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("s_width").toDouble(), 0.1);
+ QCOMPARE(object->property("s_height").toDouble(), 100923.2);
+ QCOMPARE(object->property("copy"), QVariant(QSizeF(0.1, 100923.2)));
+
+ delete object;
+ }
+
+ {
+ QmlComponent component(&engine, TEST_FILE("sizef_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->sizef(), QSizeF(44.3, 92.8));
+
+ delete object;
+ }
+}
+
+void tst_valuetypes::rect()
+{
+ {
+ QmlComponent component(&engine, TEST_FILE("rect_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("r_x").toInt(), 2);
+ QCOMPARE(object->property("r_y").toInt(), 3);
+ QCOMPARE(object->property("r_width").toInt(), 109);
+ QCOMPARE(object->property("r_height").toInt(), 102);
+ QCOMPARE(object->property("copy"), QVariant(QRect(2, 3, 109, 102)));
+
+ delete object;
+ }
+
+ {
+ QmlComponent component(&engine, TEST_FILE("rect_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->rect(), QRect(1234, 7, 56, 63));
+
+ delete object;
+ }
+}
+
+void tst_valuetypes::rectf()
+{
+ {
+ QmlComponent component(&engine, TEST_FILE("rectf_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("r_x").toDouble(), 103.8);
+ QCOMPARE(object->property("r_y").toDouble(), 99.2);
+ QCOMPARE(object->property("r_width").toDouble(), 88.1);
+ QCOMPARE(object->property("r_height").toDouble(), 77.6);
+ QCOMPARE(object->property("copy"), QVariant(QRectF(103.8, 99.2, 88.1, 77.6)));
+
+ delete object;
+ }
+
+ {
+ QmlComponent component(&engine, TEST_FILE("rectf_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->rectf(), QRectF(70.1, -113.2, 80924.8, 99.2));
+
+ delete object;
+ }
+}
+
+void tst_valuetypes::vector3d()
+{
+ {
+ QmlComponent component(&engine, TEST_FILE("vector3d_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE((float)object->property("v_x").toDouble(), (float)23.88);
+ QCOMPARE((float)object->property("v_y").toDouble(), (float)3.1);
+ QCOMPARE((float)object->property("v_z").toDouble(), (float)4.3);
+ QCOMPARE(object->property("copy"), QVariant(QVector3D(23.88, 3.1, 4.3)));
+
+ delete object;
+ }
+
+ {
+ QmlComponent component(&engine, TEST_FILE("vector3d_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->vector(), QVector3D(-0.3, -12.9, 907.4));
+
+ delete object;
+ }
+}
+
+void tst_valuetypes::font()
+{
+ {
+ QmlComponent component(&engine, TEST_FILE("font_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("f_family").toString(), object->font().family());
+ QCOMPARE(object->property("f_bold").toBool(), object->font().bold());
+ QCOMPARE(object->property("f_weight").toInt(), object->font().weight());
+ QCOMPARE(object->property("f_italic").toBool(), object->font().italic());
+ QCOMPARE(object->property("f_underline").toBool(), object->font().underline());
+ QCOMPARE(object->property("f_overline").toBool(), object->font().overline());
+ QCOMPARE(object->property("f_strikeout").toBool(), object->font().strikeOut());
+ QCOMPARE(object->property("f_pointSize").toDouble(), object->font().pointSizeF());
+ QCOMPARE(object->property("f_pixelSize").toInt(), object->font().pixelSize());
+ QCOMPARE(object->property("f_capitalization").toInt(), (int)object->font().capitalization());
+ QCOMPARE(object->property("f_letterSpacing").toDouble(), object->font().letterSpacing());
+ QCOMPARE(object->property("f_wordSpacing").toDouble(), object->font().wordSpacing());
+
+ QCOMPARE(object->property("copy"), QVariant(object->font()));
+
+ delete object;
+ }
+
+ {
+ QmlComponent component(&engine, TEST_FILE("font_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QFont font;
+ font.setFamily("Helvetica");
+ font.setBold(false);
+ font.setWeight(QFont::Normal);
+ font.setItalic(false);
+ font.setUnderline(false);
+ font.setStrikeOut(false);
+ font.setPointSize(15);
+ font.setCapitalization(QFont::AllLowercase);
+ font.setLetterSpacing(QFont::AbsoluteSpacing, 9.7);
+ font.setWordSpacing(11.2);
+
+ QCOMPARE(object->font(), font);
+
+ delete object;
+ }
+
+ // Test pixelSize
+ {
+ QmlComponent component(&engine, TEST_FILE("font_write.2.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->font().pixelSize(), 10);
+ }
+
+ // Test pixelSize and pointSize
+ {
+ QmlComponent component(&engine, TEST_FILE("font_write.3.qml"));
+ QTest::ignoreMessage(QtWarningMsg, "Both point size and pixel size set. Using pixel size. ");
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->font().pixelSize(), 10);
+ }
+}
+
+QTEST_MAIN(tst_valuetypes)
+
+#include "tst_valuetypes.moc"
diff --git a/tests/auto/declarative/valuetypes/valuetypes.pro b/tests/auto/declarative/valuetypes/valuetypes.pro
new file mode 100644
index 0000000..ae7c731
--- /dev/null
+++ b/tests/auto/declarative/valuetypes/valuetypes.pro
@@ -0,0 +1,10 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+HEADERS += testtypes.h
+
+SOURCES += tst_valuetypes.cpp \
+ testtypes.cpp
+
+DEFINES += SRCDIR=\\\"$$PWD\\\"