summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-14 04:58:37 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-14 04:58:37 (GMT)
commit117e65f1f13ff3c453ab7ed8a88d042cc7eeebee (patch)
treea7f85cbaceab459ff67e80cf1f1defda405f5dea /tests/auto/declarative
parent6d4769d09400dbefe3dc05b1b3a214dfecdd737a (diff)
parentf04560cb0879a91b52a15afe42a40ab6499f6997 (diff)
downloadQt-117e65f1f13ff3c453ab7ed8a88d042cc7eeebee.zip
Qt-117e65f1f13ff3c453ab7ed8a88d042cc7eeebee.tar.gz
Qt-117e65f1f13ff3c453ab7ed8a88d042cc7eeebee.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/parserstress/tst_parserstress.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp8
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp20
-rw-r--r--tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp18
-rw-r--r--tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp64
-rw-r--r--tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp8
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp14
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp16
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp14
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp22
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp14
-rw-r--r--tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp8
-rw-r--r--tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp106
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp60
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp32
-rw-r--r--tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp16
-rw-r--r--tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp2
-rw-r--r--tests/auto/declarative/sql/tst_sql.cpp2
30 files changed, 233 insertions, 233 deletions
diff --git a/tests/auto/declarative/parserstress/tst_parserstress.cpp b/tests/auto/declarative/parserstress/tst_parserstress.cpp
index ee246fa..41c0a1b 100644
--- a/tests/auto/declarative/parserstress/tst_parserstress.cpp
+++ b/tests/auto/declarative/parserstress/tst_parserstress.cpp
@@ -113,7 +113,7 @@ void tst_parserstress::ecmascript()
QString dataStr = QString::fromUtf8(data);
- QString qml = "import Qt 4.6\n";
+ QString qml = "import Qt 4.7\n";
qml+= "\n";
qml+= "QtObject {\n";
qml+= " property int test\n";
diff --git a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
index 05974aa..01b5bc5 100644
--- a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
+++ b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
@@ -297,7 +297,7 @@ void tst_qdeclarativeanchors::illegalSets()
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\n" + qml.toUtf8()), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\n" + qml.toUtf8()), QUrl::fromLocalFile(""));
if (!component.isReady())
qWarning() << "Test errors:" << component.errors();
QVERIFY(component.isReady());
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
index 501debd..0fb080c 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp
@@ -196,7 +196,7 @@ void tst_qdeclarativeanimatedimage::invalidSource()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6\n AnimatedImage { source: \"no-such-file.gif\" }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7\n AnimatedImage { source: \"no-such-file.gif\" }", QUrl::fromLocalFile(""));
QVERIFY(component.isReady());
QTest::ignoreMessage(QtWarningMsg, "Error Reading Animated Image File QUrl( \"file:no-such-file.gif\" ) ");
diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
index f018ce1..959cc19 100644
--- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
+++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
@@ -648,7 +648,7 @@ void tst_qdeclarativeanimations::easingProperties()
{
{
QDeclarativeEngine engine;
- QString componentStr = "import Qt 4.6\nNumberAnimation { easing.type: \"InOutQuad\" }";
+ QString componentStr = "import Qt 4.7\nNumberAnimation { easing.type: \"InOutQuad\" }";
QDeclarativeComponent animationComponent(&engine);
animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativePropertyAnimation *animObject = qobject_cast<QDeclarativePropertyAnimation*>(animationComponent.create());
@@ -659,7 +659,7 @@ void tst_qdeclarativeanimations::easingProperties()
{
QDeclarativeEngine engine;
- QString componentStr = "import Qt 4.6\nPropertyAnimation { easing.type: \"OutBounce\"; easing.amplitude: 5.0 }";
+ QString componentStr = "import Qt 4.7\nPropertyAnimation { easing.type: \"OutBounce\"; easing.amplitude: 5.0 }";
QDeclarativeComponent animationComponent(&engine);
animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativePropertyAnimation *animObject = qobject_cast<QDeclarativePropertyAnimation*>(animationComponent.create());
@@ -671,7 +671,7 @@ void tst_qdeclarativeanimations::easingProperties()
{
QDeclarativeEngine engine;
- QString componentStr = "import Qt 4.6\nPropertyAnimation { easing.type: \"OutElastic\"; easing.amplitude: 5.0; easing.period: 3.0}";
+ QString componentStr = "import Qt 4.7\nPropertyAnimation { easing.type: \"OutElastic\"; easing.amplitude: 5.0; easing.period: 3.0}";
QDeclarativeComponent animationComponent(&engine);
animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativePropertyAnimation *animObject = qobject_cast<QDeclarativePropertyAnimation*>(animationComponent.create());
@@ -684,7 +684,7 @@ void tst_qdeclarativeanimations::easingProperties()
{
QDeclarativeEngine engine;
- QString componentStr = "import Qt 4.6\nPropertyAnimation { easing.type: \"InOutBack\"; easing.overshoot: 2 }";
+ QString componentStr = "import Qt 4.7\nPropertyAnimation { easing.type: \"InOutBack\"; easing.overshoot: 2 }";
QDeclarativeComponent animationComponent(&engine);
animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativePropertyAnimation *animObject = qobject_cast<QDeclarativePropertyAnimation*>(animationComponent.create());
diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
index 90d2412..0f03527 100644
--- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
+++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
@@ -99,7 +99,7 @@ tst_qdeclarativeborderimage::tst_qdeclarativeborderimage()
void tst_qdeclarativeborderimage::noSource()
{
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"\" }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -143,7 +143,7 @@ void tst_qdeclarativeborderimage::imageSource()
if (!error.isEmpty())
QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + source + "\" }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + source + "\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -170,7 +170,7 @@ void tst_qdeclarativeborderimage::imageSource()
void tst_qdeclarativeborderimage::clearSource()
{
- QString componentStr = "import Qt 4.6\nBorderImage { source: srcImage }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: srcImage }";
QDeclarativeContext *ctxt = engine.rootContext();
ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/colors.png"));
QDeclarativeComponent component(&engine);
@@ -190,7 +190,7 @@ void tst_qdeclarativeborderimage::clearSource()
void tst_qdeclarativeborderimage::resized()
{
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() + "\"; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() + "\"; width: 300; height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -205,7 +205,7 @@ void tst_qdeclarativeborderimage::resized()
void tst_qdeclarativeborderimage::smooth()
{
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -222,7 +222,7 @@ void tst_qdeclarativeborderimage::smooth()
void tst_qdeclarativeborderimage::tileModes()
{
{
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 100; height: 300; horizontalTileMode: BorderImage.Repeat; verticalTileMode: BorderImage.Repeat }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 100; height: 300; horizontalTileMode: BorderImage.Repeat; verticalTileMode: BorderImage.Repeat }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -235,7 +235,7 @@ void tst_qdeclarativeborderimage::tileModes()
delete obj;
}
{
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 150; horizontalTileMode: BorderImage.Round; verticalTileMode: BorderImage.Round }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 150; horizontalTileMode: BorderImage.Round; verticalTileMode: BorderImage.Round }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -262,7 +262,7 @@ void tst_qdeclarativeborderimage::sciSource()
server->serveDirectory(SRCDIR "/data");
}
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + source + "\"; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + source + "\"; width: 300; height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -307,7 +307,7 @@ void tst_qdeclarativeborderimage::invalidSciFile()
QTest::ignoreMessage(QtWarningMsg, "Unknown tile rule specified. Using Stretch "); // for "Roun"
QTest::ignoreMessage(QtWarningMsg, "Unknown tile rule specified. Using Stretch "); // for "Repea"
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/invalid.sci").toString() +"\"; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/invalid.sci").toString() +"\"; width: 300; height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
@@ -325,7 +325,7 @@ void tst_qdeclarativeborderimage::pendingRemoteRequest()
{
QFETCH(QString, source);
- QString componentStr = "import Qt 4.6\nBorderImage { source: \"" + source + "\" }";
+ QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + source + "\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeBorderImage *obj = qobject_cast<QDeclarativeBorderImage*>(component.create());
diff --git a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
index ae62363..35cffdc 100644
--- a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
+++ b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
@@ -228,7 +228,7 @@ private:
#define TEST_CONTEXT_PROPERTY(ctxt, name, value) \
{ \
QDeclarativeComponent component(&engine); \
- component.setData("import Qt 4.6; QtObject { property variant test: " #name " }", QUrl()); \
+ component.setData("import Qt 4.7; QtObject { property variant test: " #name " }", QUrl()); \
\
QObject *obj = component.create(ctxt); \
\
@@ -278,7 +278,7 @@ void tst_qdeclarativecontext::setContextProperty()
// Changes in context properties
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property variant test: a }", QUrl());
+ component.setData("import Qt 4.7; QtObject { property variant test: a }", QUrl());
QObject *obj = component.create(&ctxt2);
@@ -290,7 +290,7 @@ void tst_qdeclarativecontext::setContextProperty()
}
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property variant test: b }", QUrl());
+ component.setData("import Qt 4.7; QtObject { property variant test: b }", QUrl());
QObject *obj = component.create(&ctxt2);
@@ -304,7 +304,7 @@ void tst_qdeclarativecontext::setContextProperty()
}
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property variant test: e.a }", QUrl());
+ component.setData("import Qt 4.7; QtObject { property variant test: e.a }", QUrl());
QObject *obj = component.create(&ctxt2);
@@ -318,7 +318,7 @@ void tst_qdeclarativecontext::setContextProperty()
// New context properties
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property variant test: a }", QUrl());
+ component.setData("import Qt 4.7; QtObject { property variant test: a }", QUrl());
QObject *obj = component.create(&ctxt2);
@@ -332,7 +332,7 @@ void tst_qdeclarativecontext::setContextProperty()
// Setting an object-variant context property
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { id: root; property int a: 10; property int test: ctxtProp.a; property variant obj: root; }", QUrl());
+ component.setData("import Qt 4.7; QtObject { id: root; property int a: 10; property int test: ctxtProp.a; property variant obj: root; }", QUrl());
QDeclarativeContext ctxt(engine.rootContext());
ctxt.setContextProperty("ctxtProp", QVariant());
@@ -380,7 +380,7 @@ void tst_qdeclarativecontext::setContextObject()
// Changes in context properties
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property variant test: a }", QUrl());
+ component.setData("import Qt 4.7; QtObject { property variant test: a }", QUrl());
QObject *obj = component.create(&ctxt);
@@ -412,7 +412,7 @@ void tst_qdeclarativecontext::destruction()
void tst_qdeclarativecontext::idAsContextProperty()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property variant a; a: QtObject { id: myObject } }", QUrl());
+ component.setData("import Qt 4.7; QtObject { property variant a; a: QtObject { id: myObject } }", QUrl());
QObject *obj = component.create();
QVERIFY(obj);
@@ -432,7 +432,7 @@ void tst_qdeclarativecontext::idAsContextProperty()
void tst_qdeclarativecontext::readOnlyContexts()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { id: me }", QUrl());
+ component.setData("import Qt 4.7; QtObject { id: me }", QUrl());
QObject *obj = component.create();
QVERIFY(obj);
diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
index d0eb90e..133dcb8 100644
--- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
+++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
@@ -822,7 +822,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
QList<QByteArray> qml;
- qml << "import Qt 4.6\n"
+ qml << "import Qt 4.7\n"
"Item {"
"width: 10; height: 20; scale: blueRect.scale;"
"Rectangle { id: blueRect; width: 500; height: 600; color: \"blue\"; }"
@@ -832,7 +832,7 @@ int main(int argc, char *argv[])
"}"
"}";
// add second component to test multiple root contexts
- qml << "import Qt 4.6\n"
+ qml << "import Qt 4.7\n"
"Item {}";
tst_QDeclarativeDebug_Factory factory;
return QDeclarativeDebugTest::runTests(&factory, qml);
diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
index d391941..1f0c47c 100644
--- a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
+++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
@@ -81,7 +81,7 @@ private:
void tst_qdeclarativedom::loadSimple()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {}";
QDeclarativeDomDocument document;
@@ -94,13 +94,13 @@ void tst_qdeclarativedom::loadSimple()
QVERIFY(!rootObject.isCustomType());
QVERIFY(rootObject.objectType() == "Qt/Item");
QVERIFY(rootObject.objectTypeMajorVersion() == 4);
- QVERIFY(rootObject.objectTypeMinorVersion() == 6);
+ QVERIFY(rootObject.objectTypeMinorVersion() == 7);
}
// Test regular properties
void tst_qdeclarativedom::loadProperties()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item { id : item; x : 300; visible : true }";
QDeclarativeDomDocument document;
@@ -134,7 +134,7 @@ void tst_qdeclarativedom::loadProperties()
void tst_qdeclarativedom::loadGroupedProperties()
{
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item { anchors.left: parent.left; anchors.right: parent.right }";
QDeclarativeDomDocument document;
@@ -177,7 +177,7 @@ void tst_qdeclarativedom::loadGroupedProperties()
}
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item { \n"
" anchors {\n"
" left: parent.left\n"
@@ -228,7 +228,7 @@ void tst_qdeclarativedom::loadGroupedProperties()
void tst_qdeclarativedom::loadChildObject()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item { Item {} }";
QDeclarativeDomDocument document;
@@ -273,7 +273,7 @@ void tst_qdeclarativedom::loadComposite()
void tst_qdeclarativedom::testValueSource()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Rectangle { SpringFollow on height { spring: 1.4; damping: .15; to: Math.min(Math.max(-130, value*2.2 - 130), 133); }}";
QDeclarativeEngine freshEngine;
@@ -291,7 +291,7 @@ void tst_qdeclarativedom::testValueSource()
QVERIFY(valueSourceObject.isValid());
QVERIFY(valueSourceObject.objectType() == "Qt/SpringFollow");
-
+
const QDeclarativeDomValue springValue = valueSourceObject.property("spring").value();
QVERIFY(!springValue.isInvalid());
QVERIFY(springValue.isLiteral());
@@ -305,7 +305,7 @@ void tst_qdeclarativedom::testValueSource()
void tst_qdeclarativedom::testValueInterceptor()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Rectangle { Behavior on height { NumberAnimation { duration: 100 } } }";
QDeclarativeEngine freshEngine;
@@ -332,7 +332,7 @@ void tst_qdeclarativedom::testValueInterceptor()
// Test QDeclarativeDomDocument::imports()
void tst_qdeclarativedom::loadImports()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"import importlib.sublib 1.1\n"
"import importlib.sublib 1.0 as NewFoo\n"
"import 'import'\n"
@@ -350,7 +350,7 @@ void tst_qdeclarativedom::loadImports()
QCOMPARE(import.type(), QDeclarativeDomImport::Library);
QCOMPARE(import.uri(), QLatin1String("Qt"));
QCOMPARE(import.qualifier(), QString());
- QCOMPARE(import.version(), QLatin1String("4.6"));
+ QCOMPARE(import.version(), QLatin1String("4.7"));
import = document.imports().at(1);
QCOMPARE(import.type(), QDeclarativeDomImport::Library);
@@ -380,7 +380,7 @@ void tst_qdeclarativedom::loadImports()
// Test loading a file with errors
void tst_qdeclarativedom::loadErrors()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" foo: 12\n"
"}";
@@ -400,7 +400,7 @@ void tst_qdeclarativedom::loadErrors()
// Test loading a file with syntax errors
void tst_qdeclarativedom::loadSyntaxErrors()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"asdf";
QDeclarativeDomDocument document;
@@ -415,10 +415,10 @@ void tst_qdeclarativedom::loadSyntaxErrors()
QCOMPARE(error.description(), QString("Syntax error"));
}
-// Test attempting to load a file with remote references
+// Test attempting to load a file with remote references
void tst_qdeclarativedom::loadRemoteErrors()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" Script {\n"
" source: \"http://localhost/exampleQmlScript.js\""
@@ -440,7 +440,7 @@ void tst_qdeclarativedom::loadRemoteErrors()
void tst_qdeclarativedom::loadDynamicProperty()
{
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" property int a\n"
" property bool b\n"
@@ -488,7 +488,7 @@ void tst_qdeclarativedom::loadDynamicProperty()
}
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" property int a: 12\n"
" property int b: a + 6\n"
@@ -502,7 +502,7 @@ void tst_qdeclarativedom::loadDynamicProperty()
QVERIFY(rootObject.isValid());
QCOMPARE(rootObject.dynamicProperties().count(), 3);
-
+
{
QDeclarativeDomDynamicProperty d = rootObject.dynamicProperties().at(0);
QVERIFY(d.isDefaultProperty() == false);
@@ -532,7 +532,7 @@ void tst_qdeclarativedom::loadComponent()
{
// Explicit component
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" Component {\n"
" id: myComponent\n"
@@ -563,7 +563,7 @@ void tst_qdeclarativedom::loadComponent()
QVERIFY(component.isValid());
QVERIFY(component.objectType() == "Qt/Component");
QVERIFY(component.objectTypeMajorVersion() == 4);
- QVERIFY(component.objectTypeMinorVersion() == 6);
+ QVERIFY(component.objectTypeMinorVersion() == 7);
QVERIFY(component.objectClassName() == "Component");
QVERIFY(component.objectId() == "myComponent");
QVERIFY(component.properties().isEmpty());
@@ -580,7 +580,7 @@ void tst_qdeclarativedom::loadComponent()
// Implicit component
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"ListView {\n"
" delegate: Item {}\n"
"}";
@@ -630,7 +630,7 @@ void tst_qdeclarativedom::object_dynamicProperty()
// Valid object, no dynamic properties
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {}";
QDeclarativeDomDocument document;
@@ -645,7 +645,7 @@ void tst_qdeclarativedom::object_dynamicProperty()
// Valid object, dynamic properties
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" property int a\n"
"}";
@@ -683,7 +683,7 @@ void tst_qdeclarativedom::object_property()
// Valid object - no default
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" x: 10\n"
" y: 12\n"
@@ -723,7 +723,7 @@ void tst_qdeclarativedom::object_property()
// Valid object - with default
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" x: 10\n"
" y: 12\n"
@@ -760,7 +760,7 @@ void tst_qdeclarativedom::object_property()
QVERIFY(y.value().toLiteral().literal() == "12");
QCOMPARE(y.position(), 35);
QCOMPARE(y.length(), 1);
-
+
QDeclarativeDomProperty data = rootObject.property("data");
QVERIFY(data.isValid());
QVERIFY(data.propertyName() == "data");
@@ -782,9 +782,9 @@ void tst_qdeclarativedom::object_url()
QCOMPARE(object.url(), QUrl());
}
- // Valid builtin object
+ // Valid builtin object
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {}";
QDeclarativeDomDocument document;
@@ -797,7 +797,7 @@ void tst_qdeclarativedom::object_url()
// Valid composite object
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"MyItem {}";
QUrl myUrl = QUrl::fromLocalFile(SRCDIR "/data/main.qml");
@@ -815,7 +815,7 @@ void tst_qdeclarativedom::object_url()
// Test copy constructors and operators
void tst_qdeclarativedom::copy()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"MyItem {\n"
" id: myItem\n"
" property int a: 10\n"
@@ -1029,7 +1029,7 @@ void tst_qdeclarativedom::copy()
QDeclarativeDomObject object = document.rootObject();
QDeclarativeDomProperty property = object.property("data");
QCOMPARE(property.value().toList().values().count(), 1);
- QDeclarativeDomComponent component =
+ QDeclarativeDomComponent component =
property.value().toList().values().at(0).toObject().toComponent();
QCOMPARE(component.componentRoot().objectClassName(), QByteArray("Item"));
@@ -1190,7 +1190,7 @@ void tst_qdeclarativedom::copy()
// Tests the position/length of various elements
void tst_qdeclarativedom::position()
{
- QByteArray qml = "import Qt 4.6\n"
+ QByteArray qml = "import Qt 4.7\n"
"Item {\n"
" id: myItem\n"
" property int a: 10\n"
diff --git a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
index 5dc5f19..5d8a52d 100644
--- a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
+++ b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp
@@ -192,7 +192,7 @@ void tst_qdeclarativeengine::clearComponentCache()
{
QFile file("temp.qml");
QVERIFY(file.open(QIODevice::WriteOnly));
- file.write("import Qt 4.6\nQtObject {\nproperty int test: 10\n}\n");
+ file.write("import Qt 4.7\nQtObject {\nproperty int test: 10\n}\n");
file.close();
}
@@ -209,7 +209,7 @@ void tst_qdeclarativeengine::clearComponentCache()
{
QFile file("temp.qml");
QVERIFY(file.open(QIODevice::WriteOnly));
- file.write("import Qt 4.6\nQtObject {\nproperty int test: 11\n}\n");
+ file.write("import Qt 4.7\nQtObject {\nproperty int test: 11\n}\n");
file.close();
}
diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
index cb87977..a345a60 100644
--- a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
+++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
@@ -147,7 +147,7 @@ void tst_qdeclarativeflickable::properties()
void tst_qdeclarativeflickable::overShoot()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; Flickable { overShoot: false; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Flickable { overShoot: false; }", QUrl::fromLocalFile(""));
QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
QSignalSpy spy(flickable, SIGNAL(overShootChanged()));
@@ -170,7 +170,7 @@ void tst_qdeclarativeflickable::overShoot()
void tst_qdeclarativeflickable::maximumFlickVelocity()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; Flickable { maximumFlickVelocity: 1.0; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Flickable { maximumFlickVelocity: 1.0; }", QUrl::fromLocalFile(""));
QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
QSignalSpy spy(flickable, SIGNAL(maximumFlickVelocityChanged()));
@@ -187,7 +187,7 @@ void tst_qdeclarativeflickable::maximumFlickVelocity()
void tst_qdeclarativeflickable::flickDeceleration()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; Flickable { flickDeceleration: 1.0; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Flickable { flickDeceleration: 1.0; }", QUrl::fromLocalFile(""));
QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
QSignalSpy spy(flickable, SIGNAL(flickDecelerationChanged()));
@@ -204,7 +204,7 @@ void tst_qdeclarativeflickable::flickDeceleration()
void tst_qdeclarativeflickable::pressDelay()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; Flickable { pressDelay: 100; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Flickable { pressDelay: 100; }", QUrl::fromLocalFile(""));
QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
QSignalSpy spy(flickable, SIGNAL(pressDelayChanged()));
diff --git a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
index 859da46..5cdc96c 100644
--- a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
+++ b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp
@@ -79,7 +79,7 @@ tst_qdeclarativefontloader::tst_qdeclarativefontloader() :
void tst_qdeclarativefontloader::noFont()
{
- QString componentStr = "import Qt 4.6\nFontLoader { }";
+ QString componentStr = "import Qt 4.7\nFontLoader { }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
@@ -94,7 +94,7 @@ void tst_qdeclarativefontloader::noFont()
void tst_qdeclarativefontloader::namedFont()
{
- QString componentStr = "import Qt 4.6\nFontLoader { name: \"Helvetica\" }";
+ QString componentStr = "import Qt 4.7\nFontLoader { name: \"Helvetica\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
@@ -107,7 +107,7 @@ void tst_qdeclarativefontloader::namedFont()
void tst_qdeclarativefontloader::localFont()
{
- QString componentStr = "import Qt 4.6\nFontLoader { source: \"" SRCDIR "/data/tarzeau_ocr_a.ttf\" }";
+ QString componentStr = "import Qt 4.7\nFontLoader { source: \"" SRCDIR "/data/tarzeau_ocr_a.ttf\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create());
@@ -120,7 +120,7 @@ void tst_qdeclarativefontloader::localFont()
void tst_qdeclarativefontloader::failLocalFont()
{
- QString componentStr = "import Qt 4.6\nFontLoader { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" }";
+ QString componentStr = "import Qt 4.7\nFontLoader { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" }";
QTest::ignoreMessage(QtWarningMsg, QString("Cannot load font: QUrl( \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" ) ").toUtf8().constData());
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
@@ -134,7 +134,7 @@ void tst_qdeclarativefontloader::failLocalFont()
void tst_qdeclarativefontloader::webFont()
{
- QString componentStr = "import Qt 4.6\nFontLoader { source: \"http://localhost:14448/tarzeau_ocr_a.ttf\" }";
+ QString componentStr = "import Qt 4.7\nFontLoader { source: \"http://localhost:14448/tarzeau_ocr_a.ttf\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
@@ -150,7 +150,7 @@ void tst_qdeclarativefontloader::redirWebFont()
{
server.addRedirect("olddir/oldname.ttf","../tarzeau_ocr_a.ttf");
- QString componentStr = "import Qt 4.6\nFontLoader { source: \"http://localhost:14448/olddir/oldname.ttf\" }";
+ QString componentStr = "import Qt 4.7\nFontLoader { source: \"http://localhost:14448/olddir/oldname.ttf\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
@@ -164,7 +164,7 @@ void tst_qdeclarativefontloader::redirWebFont()
void tst_qdeclarativefontloader::failWebFont()
{
- QString componentStr = "import Qt 4.6\nFontLoader { source: \"http://localhost:14448/nonexist.ttf\" }";
+ QString componentStr = "import Qt 4.7\nFontLoader { source: \"http://localhost:14448/nonexist.ttf\" }";
QTest::ignoreMessage(QtWarningMsg, "Cannot load font: QUrl( \"http://localhost:14448/nonexist.ttf\" ) ");
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
index 07fc3aa..89be151 100644
--- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
+++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
@@ -825,10 +825,10 @@ void tst_QDeclarativeGridView::componentChanges()
QTRY_VERIFY(gridView);
QDeclarativeComponent component(canvas->engine());
- component.setData("import Qt 4.6; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile(""));
QDeclarativeComponent delegateComponent(canvas->engine());
- delegateComponent.setData("import Qt 4.6; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
+ delegateComponent.setData("import Qt 4.7; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
QSignalSpy highlightSpy(gridView, SIGNAL(highlightChanged()));
QSignalSpy delegateSpy(gridView, SIGNAL(delegateChanged()));
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index ecbcfc3..52d7c16 100644
--- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -95,7 +95,7 @@ tst_qdeclarativeimage::tst_qdeclarativeimage()
void tst_qdeclarativeimage::noSource()
{
- QString componentStr = "import Qt 4.6\nImage { source: \"\" }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
@@ -149,7 +149,7 @@ void tst_qdeclarativeimage::imageSource()
if (!error.isEmpty())
QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
- QString componentStr = "import Qt 4.6\nImage { source: \"" + source + "\"; asynchronous: "
+ QString componentStr = "import Qt 4.7\nImage { source: \"" + source + "\"; asynchronous: "
+ (async ? QLatin1String("true") : QLatin1String("false")) + " }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
@@ -179,7 +179,7 @@ void tst_qdeclarativeimage::imageSource()
void tst_qdeclarativeimage::clearSource()
{
- QString componentStr = "import Qt 4.6\nImage { source: srcImage }";
+ QString componentStr = "import Qt 4.7\nImage { source: srcImage }";
QDeclarativeContext *ctxt = engine.rootContext();
ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/colors.png"));
QDeclarativeComponent component(&engine);
@@ -201,7 +201,7 @@ void tst_qdeclarativeimage::clearSource()
void tst_qdeclarativeimage::resized()
{
- QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
@@ -215,7 +215,7 @@ void tst_qdeclarativeimage::resized()
void tst_qdeclarativeimage::smooth()
{
- QString componentStr = "import Qt 4.6\nImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
@@ -230,7 +230,7 @@ void tst_qdeclarativeimage::smooth()
void tst_qdeclarativeimage::pixmap()
{
- QString componentStr = "import Qt 4.6\nImage { pixmap: testPixmap }";
+ QString componentStr = "import Qt 4.7\nImage { pixmap: testPixmap }";
QPixmap pixmap;
QDeclarativeContext *ctxt = engine.rootContext();
@@ -261,7 +261,7 @@ void tst_qdeclarativeimage::pixmap()
void tst_qdeclarativeimage::svg()
{
QString src = QUrl::fromLocalFile(SRCDIR "/data/heart.svg").toString();
- QString componentStr = "import Qt 4.6\nImage { source: \"" + src + "\"; sourceSize.width: 300; sourceSize.height: 300 }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"" + src + "\"; sourceSize.width: 300; sourceSize.height: 300 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
@@ -300,7 +300,7 @@ void tst_qdeclarativeimage::big()
// have to build a 400 MB image. That would be a bug in the JPEG loader.
QString src = QUrl::fromLocalFile(SRCDIR "/data/big.jpeg").toString();
- QString componentStr = "import Qt 4.6\nImage { source: \"" + src + "\"; sourceSize.width: 256; sourceSize.height: 256 }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"" + src + "\"; sourceSize.width: 256; sourceSize.height: 256 }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
index fe5f5a2..162c266 100644
--- a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
+++ b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp
@@ -114,7 +114,7 @@ void tst_qdeclarativeimageprovider::imageSource()
engine.addImageProvider("test", new TestProvider);
QVERIFY(engine.imageProvider("test") != 0);
- QString componentStr = "import Qt 4.6\nImage { source: \"" + source + "\"; " + properties + " }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"" + source + "\"; " + properties + " }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
@@ -145,7 +145,7 @@ void tst_qdeclarativeimageprovider::removeProvider()
QVERIFY(engine.imageProvider("test2") != 0);
// add provider, confirm it works
- QString componentStr = "import Qt 4.6\nImage { source: \"image://test2/exists1.png\" }";
+ QString componentStr = "import Qt 4.7\nImage { source: \"image://test2/exists1.png\" }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
index a6171ae..4400116 100644
--- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
+++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -293,7 +293,7 @@ void tst_QDeclarativeItem::keyNavigation()
void tst_QDeclarativeItem::smooth()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; Item { smooth: false; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Item { smooth: false; }", QUrl::fromLocalFile(""));
QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
QSignalSpy spy(item, SIGNAL(smoothChanged(bool)));
@@ -322,7 +322,7 @@ void tst_QDeclarativeItem::smooth()
void tst_QDeclarativeItem::clip()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6\nItem { clip: false\n }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7\nItem { clip: false\n }", QUrl::fromLocalFile(""));
QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
QSignalSpy spy(item, SIGNAL(clipChanged(bool)));
@@ -426,7 +426,7 @@ void tst_QDeclarativeItem::transforms()
QFETCH(QByteArray, qml);
QFETCH(QMatrix, matrix);
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6\nItem { transform: "+qml+"}", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7\nItem { transform: "+qml+"}", QUrl::fromLocalFile(""));
QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
QVERIFY(item);
QCOMPARE(item->sceneMatrix(), matrix);
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 373842b..7c327c2 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -1257,12 +1257,12 @@ void tst_qdeclarativelanguage::importsLocal_data()
<< "QDeclarativeRectangle"
<< "";
QTest::newRow("local import second")
- << "import Qt 4.6\nimport \"subdir\"\n"
+ << "import Qt 4.7\nimport \"subdir\"\n"
"Test {}"
<< "QDeclarativeRectangle"
<< "";
QTest::newRow("local import subsubdir")
- << "import Qt 4.6\nimport \"subdir/subsubdir\"\n"
+ << "import Qt 4.7\nimport \"subdir/subsubdir\"\n"
"SubTest {}"
<< "QDeclarativeRectangle"
<< "";
@@ -1465,24 +1465,24 @@ void tst_qdeclarativelanguage::importsOrder_data()
QTest::newRow("installed import versus builtin 1") <<
"import com.nokia.installedtest 1.5\n"
- "import Qt 4.6\n"
+ "import Qt 4.7\n"
"Rectangle {}"
<< "QDeclarativeRectangle"
<< "";
QTest::newRow("installed import versus builtin 2") <<
- "import Qt 4.6\n"
+ "import Qt 4.7\n"
"import com.nokia.installedtest 1.5\n"
"Rectangle {}"
<< "QDeclarativeText"
<< "";
QTest::newRow("namespaces cannot be overridden by types 1") <<
- "import Qt 4.6 as Rectangle\n"
+ "import Qt 4.7 as Rectangle\n"
"import com.nokia.installedtest 1.5\n"
"Rectangle {}"
<< ""
<< "Namespace Rectangle cannot be used as a type";
QTest::newRow("namespaces cannot be overridden by types 2") <<
- "import Qt 4.6 as Rectangle\n"
+ "import Qt 4.7 as Rectangle\n"
"import com.nokia.installedtest 1.5\n"
"Rectangle.Image {}"
<< "QDeclarativeImage"
@@ -1537,7 +1537,7 @@ void tst_qdeclarativelanguage::qmlAttachedPropertiesObjectMethod()
void tst_qdeclarativelanguage::crash1()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6\nComponent {}", QUrl());
+ component.setData("import Qt 4.7\nComponent {}", QUrl());
}
void tst_qdeclarativelanguage::crash2()
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index 5962a42..9d61ad0 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -118,7 +118,7 @@ void tst_QDeclarativeListModel::waitForWorker(QDeclarativeItem *item)
void tst_QDeclarativeListModel::static_i18n()
{
QString expect = QString::fromUtf8("na\303\257ve");
- QString componentStr = "import Qt 4.6\nListModel { ListElement { prop1: \""+expect+"\" } }";
+ QString componentStr = "import Qt 4.7\nListModel { ListElement { prop1: \""+expect+"\" } }";
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
component.setData(componentStr.toUtf8(), QUrl::fromLocalFile(""));
@@ -139,7 +139,7 @@ void tst_QDeclarativeListModel::static_nestedElements()
QString elementsStr = elements.join(",\n") + "\n";
QString componentStr =
- "import Qt 4.6\n"
+ "import Qt 4.7\n"
"ListModel {\n"
" ListElement {\n"
" attributes: [\n";
@@ -468,7 +468,7 @@ void tst_QDeclarativeListModel::static_types()
QFETCH(QString, qml);
QFETCH(QVariant, value);
- qml = "import Qt 4.6\nListModel { " + qml + " }";
+ qml = "import Qt 4.7\nListModel { " + qml + " }";
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
@@ -500,35 +500,35 @@ void tst_QDeclarativeListModel::error_data()
QTest::addColumn<QString>("error");
QTest::newRow("id not allowed in ListElement")
- << "import Qt 4.6\nListModel { ListElement { id: fred } }"
+ << "import Qt 4.7\nListModel { ListElement { id: fred } }"
<< "ListElement: cannot use reserved \"id\" property";
QTest::newRow("id allowed in ListModel")
- << "import Qt 4.6\nListModel { id:model }"
+ << "import Qt 4.7\nListModel { id:model }"
<< "";
QTest::newRow("random properties not allowed in ListModel")
- << "import Qt 4.6\nListModel { foo:123 }"
+ << "import Qt 4.7\nListModel { foo:123 }"
<< "ListModel: undefined property 'foo'";
QTest::newRow("random properties allowed in ListElement")
- << "import Qt 4.6\nListModel { ListElement { foo:123 } }"
+ << "import Qt 4.7\nListModel { ListElement { foo:123 } }"
<< "";
QTest::newRow("bindings not allowed in ListElement")
- << "import Qt 4.6\nRectangle { id: rect; ListModel { ListElement { foo: rect.color } } }"
+ << "import Qt 4.7\nRectangle { id: rect; ListModel { ListElement { foo: rect.color } } }"
<< "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 } ] } }"
+ << "import Qt 4.7\nListModel { ListElement { foo: [ ListElement { bar: 123 } ] } }"
<< "";
QTest::newRow("default properties not allowed in ListElement")
- << "import Qt 4.6\nListModel { ListElement { Item { } } }"
+ << "import Qt 4.7\nListModel { ListElement { Item { } } }"
<< "ListElement: cannot contain nested elements";
QTest::newRow("QML elements not allowed in ListElement")
- << "import Qt 4.6\nListModel { ListElement { a: Item { } } }"
+ << "import Qt 4.7\nListModel { ListElement { a: Item { } } }"
<< "ListElement: cannot contain nested elements";
}
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index 46d90aa..6b7a361 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -1361,10 +1361,10 @@ void tst_QDeclarativeListView::componentChanges()
QTRY_VERIFY(listView);
QDeclarativeComponent component(canvas->engine());
- component.setData("import Qt 4.6; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile(""));
+ component.setData("import Qt 4.7; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile(""));
QDeclarativeComponent delegateComponent(canvas->engine());
- delegateComponent.setData("import Qt 4.6; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
+ delegateComponent.setData("import Qt 4.7; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
QSignalSpy highlightSpy(listView, SIGNAL(highlightChanged()));
QSignalSpy delegateSpy(listView, SIGNAL(delegateChanged()));
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
index e6553dd..4a82b50 100644
--- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
+++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
@@ -104,7 +104,7 @@ tst_QDeclarativeLoader::tst_QDeclarativeLoader()
void tst_QDeclarativeLoader::url()
{
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nLoader { source: \"Rect120x60.qml\" }"), TEST_FILE(""));
+ component.setData(QByteArray("import Qt 4.7\nLoader { source: \"Rect120x60.qml\" }"), TEST_FILE(""));
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
QVERIFY(loader->item());
@@ -141,7 +141,7 @@ void tst_QDeclarativeLoader::invalidUrl()
QTest::ignoreMessage(QtWarningMsg, QString("(:-1: File error for URL " + QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml").toString() + ") ").toUtf8().constData());
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nLoader { source: \"IDontExist.qml\" }"), TEST_FILE(""));
+ component.setData(QByteArray("import Qt 4.7\nLoader { source: \"IDontExist.qml\" }"), TEST_FILE(""));
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
QVERIFY(loader->item() == 0);
@@ -157,7 +157,7 @@ void tst_QDeclarativeLoader::clear()
{
QDeclarativeComponent component(&engine);
component.setData(QByteArray(
- "import Qt 4.6\n"
+ "import Qt 4.7\n"
" Loader { id: loader\n"
" source: 'Rect120x60.qml'\n"
" Timer { interval: 200; running: true; onTriggered: loader.source = '' }\n"
@@ -203,7 +203,7 @@ void tst_QDeclarativeLoader::clear()
void tst_QDeclarativeLoader::urlToComponent()
{
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\n"
+ component.setData(QByteArray("import Qt 4.7\n"
"Loader {\n"
" id: loader\n"
" Component { id: myComp; Rectangle { width: 10; height: 10 } }\n"
@@ -412,7 +412,7 @@ void tst_QDeclarativeLoader::networkRequestUrl()
server.serveDirectory(SRCDIR "/data");
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nLoader { source: \"http://127.0.0.1:14450/Rect120x60.qml\" }"), QUrl::fromLocalFile(SRCDIR "/dummy.qml"));
+ component.setData(QByteArray("import Qt 4.7\nLoader { source: \"http://127.0.0.1:14450/Rect120x60.qml\" }"), QUrl::fromLocalFile(SRCDIR "/dummy.qml"));
if (component.isError())
qDebug() << component.errors();
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
@@ -436,7 +436,7 @@ void tst_QDeclarativeLoader::networkComponent()
QDeclarativeComponent component(&engine);
component.setData(QByteArray(
- "import Qt 4.6\n"
+ "import Qt 4.7\n"
"import \"http://127.0.0.1:14450/\" as NW\n"
"Item {\n"
" Component { id: comp; NW.SlowRect {} }\n"
@@ -468,7 +468,7 @@ void tst_QDeclarativeLoader::failNetworkRequest()
QTest::ignoreMessage(QtWarningMsg, "(:-1: Network error for URL http://127.0.0.1:14450/IDontExist.qml) ");
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nLoader { source: \"http://127.0.0.1:14450/IDontExist.qml\" }"), QUrl::fromLocalFile("http://127.0.0.1:14450/dummy.qml"));
+ component.setData(QByteArray("import Qt 4.7\nLoader { source: \"http://127.0.0.1:14450/IDontExist.qml\" }"), QUrl::fromLocalFile("http://127.0.0.1:14450/dummy.qml"));
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
index 4d43c68..df7c511 100644
--- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
+++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
@@ -632,7 +632,7 @@ void tst_QDeclarativePathView::componentChanges()
QVERIFY(pathView);
QDeclarativeComponent delegateComponent(canvas->engine());
- delegateComponent.setData("import Qt 4.6; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
+ delegateComponent.setData("import Qt 4.7; Text { text: '<b>Name:</b> ' + name }", QUrl::fromLocalFile(""));
QSignalSpy delegateSpy(pathView, SIGNAL(delegateChanged()));
diff --git a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
index c996a14..f1d3bf0 100644
--- a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
+++ b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
@@ -138,7 +138,7 @@ void tst_QDeclarativePropertyMap::changed()
QDeclarativeContext *ctxt = engine.rootContext();
ctxt->setContextProperty(QLatin1String("testdata"), &map);
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6\nText { text: { testdata.key1 = 'Hello World'; 'X' } }",
+ component.setData("import Qt 4.7\nText { text: { testdata.key1 = 'Hello World'; 'X' } }",
QUrl::fromLocalFile(""));
QVERIFY(component.isReady());
QDeclarativeText *txt = qobject_cast<QDeclarativeText*>(component.create());
@@ -179,7 +179,7 @@ void tst_QDeclarativePropertyMap::crashBug()
context.setContextProperty("map", &map);
QDeclarativeComponent c(&engine);
- c.setData("import Qt 4.6\nBinding { target: map; property: \"myProp\"; value: 10 + 23 }",QUrl());
+ c.setData("import Qt 4.7\nBinding { target: map; property: \"myProp\"; value: 10 + 23 }",QUrl());
QObject *obj = c.create(&context);
delete obj;
}
diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
index 419f5ea..8be7d80 100644
--- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
+++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
@@ -354,7 +354,7 @@ void tst_QDeclarativeRepeater::properties()
QSignalSpy delegateSpy(repeater, SIGNAL(delegateChanged()));
QDeclarativeComponent rectComponent(&engine);
- rectComponent.setData("import Qt 4.6; Rectangle {}", QUrl::fromLocalFile(""));
+ rectComponent.setData("import Qt 4.7; Rectangle {}", QUrl::fromLocalFile(""));
repeater->setDelegate(&rectComponent);
QCOMPARE(delegateSpy.count(),1);
diff --git a/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
index 5c93952..7927d97 100644
--- a/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
+++ b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp
@@ -70,7 +70,7 @@ tst_qdeclarativesystempalette::tst_qdeclarativesystempalette()
void tst_qdeclarativesystempalette::activePalette()
{
- QString componentStr = "import Qt 4.6\nSystemPalette { }";
+ QString componentStr = "import Qt 4.7\nSystemPalette { }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeSystemPalette *object = qobject_cast<QDeclarativeSystemPalette*>(component.create());
@@ -99,7 +99,7 @@ void tst_qdeclarativesystempalette::activePalette()
void tst_qdeclarativesystempalette::inactivePalette()
{
- QString componentStr = "import Qt 4.6\nSystemPalette { colorGroup: SystemPalette.Inactive }";
+ QString componentStr = "import Qt 4.7\nSystemPalette { colorGroup: SystemPalette.Inactive }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeSystemPalette *object = qobject_cast<QDeclarativeSystemPalette*>(component.create());
@@ -129,7 +129,7 @@ void tst_qdeclarativesystempalette::inactivePalette()
void tst_qdeclarativesystempalette::disabledPalette()
{
- QString componentStr = "import Qt 4.6\nSystemPalette { colorGroup: SystemPalette.Disabled }";
+ QString componentStr = "import Qt 4.7\nSystemPalette { colorGroup: SystemPalette.Disabled }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeSystemPalette *object = qobject_cast<QDeclarativeSystemPalette*>(component.create());
@@ -159,7 +159,7 @@ void tst_qdeclarativesystempalette::disabledPalette()
void tst_qdeclarativesystempalette::paletteChanged()
{
- QString componentStr = "import Qt 4.6\nSystemPalette { }";
+ QString componentStr = "import Qt 4.7\nSystemPalette { }";
QDeclarativeComponent component(&engine);
component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeSystemPalette *object = qobject_cast<QDeclarativeSystemPalette*>(component.create());
diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
index bf7d110..2d10756 100644
--- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
+++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
@@ -156,7 +156,7 @@ void tst_qdeclarativetext::text()
{
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nText { text: \"\" }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nText { text: \"\" }", QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QVERIFY(textObject != 0);
@@ -168,7 +168,7 @@ void tst_qdeclarativetext::text()
for (int i = 0; i < standard.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
@@ -181,7 +181,7 @@ void tst_qdeclarativetext::text()
for (int i = 0; i < richText.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -198,7 +198,7 @@ void tst_qdeclarativetext::width()
// uses Font metrics to find the width for standard and document to find the width for rich
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nText { text: \"\" }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nText { text: \"\" }", QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QVERIFY(textObject != 0);
@@ -214,7 +214,7 @@ void tst_qdeclarativetext::width()
qreal metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width();
metricWidth = qCeil(metricWidth);
- QString componentStr = "import Qt 4.6\nText { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -234,7 +234,7 @@ void tst_qdeclarativetext::width()
int documentWidth = document.idealWidth();
- QString componentStr = "import Qt 4.6\nText { text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -251,7 +251,7 @@ void tst_qdeclarativetext::wrap()
// for specified width and wrap set true
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nText { text: \"Hello\"; wrapMode: Text.WordWrap; width: 300 }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nText { text: \"Hello\"; wrapMode: Text.WordWrap; width: 300 }", QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
textHeight = textObject->height();
@@ -262,7 +262,7 @@ void tst_qdeclarativetext::wrap()
for (int i = 0; i < standard.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -278,7 +278,7 @@ void tst_qdeclarativetext::wrap()
for (int i = 0; i < richText.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -300,7 +300,7 @@ void tst_qdeclarativetext::elide()
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData(("import Qt 4.6\nText { text: \"\"; "+elide+" width: 100 }").toLatin1(), QUrl::fromLocalFile(""));
+ textComponent.setData(("import Qt 4.7\nText { text: \"\"; "+elide+" width: 100 }").toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QCOMPARE(textObject->elideMode(), m);
@@ -309,7 +309,7 @@ void tst_qdeclarativetext::elide()
for (int i = 0; i < standard.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { "+elide+" width: 100; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { "+elide+" width: 100; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -321,7 +321,7 @@ void tst_qdeclarativetext::elide()
// richtext - does nothing
for (int i = 0; i < richText.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { "+elide+" width: 100; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { "+elide+" width: 100; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -336,7 +336,7 @@ void tst_qdeclarativetext::textFormat()
{
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nText { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nText { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QVERIFY(textObject != 0);
@@ -344,7 +344,7 @@ void tst_qdeclarativetext::textFormat()
}
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nText { text: \"<b>Hello</b>\"; textFormat: Text.PlainText }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nText { text: \"<b>Hello</b>\"; textFormat: Text.PlainText }", QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QVERIFY(textObject != 0);
@@ -361,7 +361,7 @@ void tst_qdeclarativetext::horizontalAlignment()
{
for (int j=0; j < horizontalAlignmentmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -374,7 +374,7 @@ void tst_qdeclarativetext::horizontalAlignment()
{
for (int j=0; j < horizontalAlignmentmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -393,7 +393,7 @@ void tst_qdeclarativetext::verticalAlignment()
{
for (int j=0; j < verticalAlignmentmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -407,7 +407,7 @@ void tst_qdeclarativetext::verticalAlignment()
{
for (int j=0; j < verticalAlignmentmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -423,7 +423,7 @@ void tst_qdeclarativetext::font()
{
//test size, then bold, then italic, then family
{
- QString componentStr = "import Qt 4.6\nText { font.pointSize: 40; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { font.pointSize: 40; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -434,7 +434,7 @@ void tst_qdeclarativetext::font()
}
{
- QString componentStr = "import Qt 4.6\nText { font.pixelSize: 40; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { font.pixelSize: 40; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -445,7 +445,7 @@ void tst_qdeclarativetext::font()
}
{
- QString componentStr = "import Qt 4.6\nText { font.bold: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { font.bold: true; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -455,7 +455,7 @@ void tst_qdeclarativetext::font()
}
{
- QString componentStr = "import Qt 4.6\nText { font.italic: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { font.italic: true; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -465,7 +465,7 @@ void tst_qdeclarativetext::font()
}
{
- QString componentStr = "import Qt 4.6\nText { font.family: \"Helvetica\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { font.family: \"Helvetica\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -476,7 +476,7 @@ void tst_qdeclarativetext::font()
}
{
- QString componentStr = "import Qt 4.6\nText { font.family: \"\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { font.family: \"\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -490,7 +490,7 @@ void tst_qdeclarativetext::style()
//test style
for (int i = 0; i < styles.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { style: \"" + styleStrings.at(i) + "\"; styleColor: \"white\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { style: \"" + styleStrings.at(i) + "\"; styleColor: \"white\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -505,7 +505,7 @@ void tst_qdeclarativetext::color()
//test style
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -516,7 +516,7 @@ void tst_qdeclarativetext::color()
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nText { styleColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { styleColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -530,7 +530,7 @@ void tst_qdeclarativetext::color()
{
for (int j = 0; j < colorStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nText { color: \"" + colorStrings.at(i) + "\"; styleColor: \"" + colorStrings.at(j) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { color: \"" + colorStrings.at(i) + "\"; styleColor: \"" + colorStrings.at(j) + "\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -544,7 +544,7 @@ void tst_qdeclarativetext::color()
QColor testColor("#001234");
testColor.setAlpha(170);
- QString componentStr = "import Qt 4.6\nText { color: \"" + colorStr + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nText { color: \"" + colorStr + "\"; text: \"Hello World\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -558,14 +558,14 @@ void tst_qdeclarativetext::smooth()
for (int i = 0; i < standard.size(); i++)
{
{
- QString componentStr = "import Qt 4.6\nText { smooth: true; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { smooth: true; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QCOMPARE(textObject->smooth(), true);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -575,14 +575,14 @@ void tst_qdeclarativetext::smooth()
for (int i = 0; i < richText.size(); i++)
{
{
- QString componentStr = "import Qt 4.6\nText { smooth: true; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { smooth: true; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
QCOMPARE(textObject->smooth(), true);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -594,7 +594,7 @@ void tst_qdeclarativetext::smooth()
void tst_qdeclarativetext::weight()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -603,7 +603,7 @@ void tst_qdeclarativetext::weight()
QCOMPARE((int)textObject->font().weight(), (int)QDeclarativeFontValueType::Normal);
}
{
- QString componentStr = "import Qt 4.6\nText { font.weight: \"Bold\"; text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { font.weight: \"Bold\"; text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -616,7 +616,7 @@ void tst_qdeclarativetext::weight()
void tst_qdeclarativetext::underline()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -625,7 +625,7 @@ void tst_qdeclarativetext::underline()
QCOMPARE(textObject->font().underline(), false);
}
{
- QString componentStr = "import Qt 4.6\nText { font.underline: true; text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { font.underline: true; text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -638,7 +638,7 @@ void tst_qdeclarativetext::underline()
void tst_qdeclarativetext::overline()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -647,7 +647,7 @@ void tst_qdeclarativetext::overline()
QCOMPARE(textObject->font().overline(), false);
}
{
- QString componentStr = "import Qt 4.6\nText { font.overline: true; text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { font.overline: true; text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -660,7 +660,7 @@ void tst_qdeclarativetext::overline()
void tst_qdeclarativetext::strikeout()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -669,7 +669,7 @@ void tst_qdeclarativetext::strikeout()
QCOMPARE(textObject->font().strikeOut(), false);
}
{
- QString componentStr = "import Qt 4.6\nText { font.strikeout: true; text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { font.strikeout: true; text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -682,7 +682,7 @@ void tst_qdeclarativetext::strikeout()
void tst_qdeclarativetext::capitalization()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -691,7 +691,7 @@ void tst_qdeclarativetext::capitalization()
QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::MixedCase);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.capitalization: \"AllUppercase\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.capitalization: \"AllUppercase\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -700,7 +700,7 @@ void tst_qdeclarativetext::capitalization()
QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::AllUppercase);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.capitalization: \"AllLowercase\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.capitalization: \"AllLowercase\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -709,7 +709,7 @@ void tst_qdeclarativetext::capitalization()
QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::AllLowercase);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.capitalization: \"SmallCaps\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.capitalization: \"SmallCaps\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -718,7 +718,7 @@ void tst_qdeclarativetext::capitalization()
QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::SmallCaps);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.capitalization: \"Capitalize\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.capitalization: \"Capitalize\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -731,7 +731,7 @@ void tst_qdeclarativetext::capitalization()
void tst_qdeclarativetext::letterSpacing()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -740,7 +740,7 @@ void tst_qdeclarativetext::letterSpacing()
QCOMPARE(textObject->font().letterSpacing(), 0.0);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.letterSpacing: -50 }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: -50 }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -749,7 +749,7 @@ void tst_qdeclarativetext::letterSpacing()
QCOMPARE(textObject->font().letterSpacing(), -50.);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.letterSpacing: 200 }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: 200 }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -762,7 +762,7 @@ void tst_qdeclarativetext::letterSpacing()
void tst_qdeclarativetext::wordSpacing()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -771,7 +771,7 @@ void tst_qdeclarativetext::wordSpacing()
QCOMPARE(textObject->font().wordSpacing(), 0.0);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.wordSpacing: -50 }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.wordSpacing: -50 }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -780,7 +780,7 @@ void tst_qdeclarativetext::wordSpacing()
QCOMPARE(textObject->font().wordSpacing(), -50.);
}
{
- QString componentStr = "import Qt 4.6\nText { text: \"Hello world!\"; font.wordSpacing: 200 }";
+ QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.wordSpacing: 200 }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
@@ -811,7 +811,7 @@ public slots:
void tst_qdeclarativetext::clickLink()
{
{
- QString componentStr = "import Qt 4.6\nText { text: \"<a href=\\\"http://qt.nokia.com\\\">Hello world!</a>\" }";
+ QString componentStr = "import Qt 4.7\nText { text: \"<a href=\\\"http://qt.nokia.com\\\">Hello world!</a>\" }";
QDeclarativeComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QDeclarativeText *textObject = qobject_cast<QDeclarativeText*>(textComponent.create());
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index 6ef1f9f..25101ba 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -150,7 +150,7 @@ void tst_qdeclarativetextedit::text()
{
{
QDeclarativeComponent texteditComponent(&engine);
- texteditComponent.setData("import Qt 4.6\nTextEdit { text: \"\" }", QUrl());
+ texteditComponent.setData("import Qt 4.7\nTextEdit { text: \"\" }", QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
@@ -159,7 +159,7 @@ void tst_qdeclarativetextedit::text()
for (int i = 0; i < standard.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -170,7 +170,7 @@ void tst_qdeclarativetextedit::text()
for (int i = 0; i < richText.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -190,7 +190,7 @@ void tst_qdeclarativetextedit::width()
// uses Font metrics to find the width for standard and document to find the width for rich
{
QDeclarativeComponent texteditComponent(&engine);
- texteditComponent.setData("import Qt 4.6\nTextEdit { text: \"\" }", QUrl());
+ texteditComponent.setData("import Qt 4.7\nTextEdit { text: \"\" }", QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
@@ -204,7 +204,7 @@ void tst_qdeclarativetextedit::width()
qreal metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width();
metricWidth = floor(metricWidth);
- QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -221,7 +221,7 @@ void tst_qdeclarativetextedit::width()
int documentWidth = document.idealWidth();
- QString componentStr = "import Qt 4.6\nTextEdit { text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -236,7 +236,7 @@ void tst_qdeclarativetextedit::wrap()
// for specified width and wrap set true
{
QDeclarativeComponent texteditComponent(&engine);
- texteditComponent.setData("import Qt 4.6\nTextEdit { text: \"\"; wrapMode: TextEdit.WordWrap; width: 300 }", QUrl());
+ texteditComponent.setData("import Qt 4.7\nTextEdit { text: \"\"; wrapMode: TextEdit.WordWrap; width: 300 }", QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
QVERIFY(textEditObject != 0);
@@ -245,7 +245,7 @@ void tst_qdeclarativetextedit::wrap()
for (int i = 0; i < standard.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { wrapMode: TextEdit.WordWrap; width: 300; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { wrapMode: TextEdit.WordWrap; width: 300; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -256,7 +256,7 @@ void tst_qdeclarativetextedit::wrap()
for (int i = 0; i < richText.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { wrapMode: TextEdit.WordWrap; width: 300; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { wrapMode: TextEdit.WordWrap; width: 300; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -271,7 +271,7 @@ void tst_qdeclarativetextedit::textFormat()
{
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nTextEdit { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nTextEdit { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile(""));
QDeclarativeTextEdit *textObject = qobject_cast<QDeclarativeTextEdit*>(textComponent.create());
QVERIFY(textObject != 0);
@@ -279,7 +279,7 @@ void tst_qdeclarativetextedit::textFormat()
}
{
QDeclarativeComponent textComponent(&engine);
- textComponent.setData("import Qt 4.6\nTextEdit { text: \"<b>Hello</b>\"; textFormat: Text.PlainText }", QUrl::fromLocalFile(""));
+ textComponent.setData("import Qt 4.7\nTextEdit { text: \"<b>Hello</b>\"; textFormat: Text.PlainText }", QUrl::fromLocalFile(""));
QDeclarativeTextEdit *textObject = qobject_cast<QDeclarativeTextEdit*>(textComponent.create());
QVERIFY(textObject != 0);
@@ -296,7 +296,7 @@ void tst_qdeclarativetextedit::hAlign()
{
for (int j=0; j < hAlignmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -310,7 +310,7 @@ void tst_qdeclarativetextedit::hAlign()
{
for (int j=0; j < hAlignmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -330,7 +330,7 @@ void tst_qdeclarativetextedit::vAlign()
{
for (int j=0; j < vAlignmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -344,7 +344,7 @@ void tst_qdeclarativetextedit::vAlign()
{
for (int j=0; j < vAlignmentStrings.size(); j++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -360,7 +360,7 @@ void tst_qdeclarativetextedit::font()
{
//test size, then bold, then italic, then family
{
- QString componentStr = "import Qt 4.6\nTextEdit { font.pointSize: 40; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { font.pointSize: 40; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -372,7 +372,7 @@ void tst_qdeclarativetextedit::font()
}
{
- QString componentStr = "import Qt 4.6\nTextEdit { font.bold: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { font.bold: true; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -383,7 +383,7 @@ void tst_qdeclarativetextedit::font()
}
{
- QString componentStr = "import Qt 4.6\nTextEdit { font.italic: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { font.italic: true; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -394,7 +394,7 @@ void tst_qdeclarativetextedit::font()
}
{
- QString componentStr = "import Qt 4.6\nTextEdit { font.family: \"Helvetica\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { font.family: \"Helvetica\"; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -406,7 +406,7 @@ void tst_qdeclarativetextedit::font()
}
{
- QString componentStr = "import Qt 4.6\nTextEdit { font.family: \"\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { font.family: \"\"; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -421,7 +421,7 @@ void tst_qdeclarativetextedit::color()
//test normal
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -433,7 +433,7 @@ void tst_qdeclarativetextedit::color()
//test selection
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -444,7 +444,7 @@ void tst_qdeclarativetextedit::color()
//test selected text
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextEdit { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -457,7 +457,7 @@ void tst_qdeclarativetextedit::color()
QColor testColor("#001234");
testColor.setAlpha(170);
- QString componentStr = "import Qt 4.6\nTextEdit { color: \"" + colorStr + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { color: \"" + colorStr + "\"; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -470,7 +470,7 @@ void tst_qdeclarativetextedit::color()
void tst_qdeclarativetextedit::textMargin()
{
for(qreal i=0; i<=10; i+=0.3){
- QString componentStr = "import Qt 4.6\nTextEdit { textMargin: " + QString::number(i) + "; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { textMargin: " + QString::number(i) + "; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -482,7 +482,7 @@ void tst_qdeclarativetextedit::textMargin()
void tst_qdeclarativetextedit::persistentSelection()
{
{
- QString componentStr = "import Qt 4.6\nTextEdit { persistentSelection: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { persistentSelection: true; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -491,7 +491,7 @@ void tst_qdeclarativetextedit::persistentSelection()
}
{
- QString componentStr = "import Qt 4.6\nTextEdit { persistentSelection: false; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { persistentSelection: false; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -503,7 +503,7 @@ void tst_qdeclarativetextedit::persistentSelection()
void tst_qdeclarativetextedit::focusOnPress()
{
{
- QString componentStr = "import Qt 4.6\nTextEdit { focusOnPress: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { focusOnPress: true; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -512,7 +512,7 @@ void tst_qdeclarativetextedit::focusOnPress()
}
{
- QString componentStr = "import Qt 4.6\nTextEdit { focusOnPress: false; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextEdit { focusOnPress: false; text: \"Hello World\" }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
@@ -524,7 +524,7 @@ void tst_qdeclarativetextedit::focusOnPress()
void tst_qdeclarativetextedit::selection()
{
QString testStr = standard[0];//TODO: What should happen for multiline/rich text?
- QString componentStr = "import Qt 4.6\nTextEdit { text: \""+ testStr +"\"; }";
+ QString componentStr = "import Qt 4.7\nTextEdit { text: \""+ testStr +"\"; }";
QDeclarativeComponent texteditComponent(&engine);
texteditComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit*>(texteditComponent.create());
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index 9a66a36..fcd7527 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -109,7 +109,7 @@ void tst_qdeclarativetextinput::text()
{
{
QDeclarativeComponent textinputComponent(&engine);
- textinputComponent.setData("import Qt 4.6\nTextInput { text: \"\" }", QUrl());
+ textinputComponent.setData("import Qt 4.7\nTextInput { text: \"\" }", QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
@@ -120,7 +120,7 @@ void tst_qdeclarativetextinput::text()
for (int i = 0; i < standard.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextInput { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -138,7 +138,7 @@ void tst_qdeclarativetextinput::width()
// uses Font metrics to find the width for standard
{
QDeclarativeComponent textinputComponent(&engine);
- textinputComponent.setData("import Qt 4.6\nTextInput { text: \"\" }", QUrl());
+ textinputComponent.setData("import Qt 4.7\nTextInput { text: \"\" }", QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
QVERIFY(textinputObject != 0);
@@ -153,7 +153,7 @@ void tst_qdeclarativetextinput::width()
QFontMetricsF fm(f);
qreal metricWidth = fm.width(standard.at(i));
- QString componentStr = "import Qt 4.6\nTextInput { text: \"" + standard.at(i) + "\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -169,7 +169,7 @@ void tst_qdeclarativetextinput::font()
{
//test size, then bold, then italic, then family
{
- QString componentStr = "import Qt 4.6\nTextInput { font.pointSize: 40; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { font.pointSize: 40; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -183,7 +183,7 @@ void tst_qdeclarativetextinput::font()
}
{
- QString componentStr = "import Qt 4.6\nTextInput { font.bold: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { font.bold: true; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -196,7 +196,7 @@ void tst_qdeclarativetextinput::font()
}
{
- QString componentStr = "import Qt 4.6\nTextInput { font.italic: true; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { font.italic: true; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -209,7 +209,7 @@ void tst_qdeclarativetextinput::font()
}
{
- QString componentStr = "import Qt 4.6\nTextInput { font.family: \"Helvetica\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { font.family: \"Helvetica\"; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -223,7 +223,7 @@ void tst_qdeclarativetextinput::font()
}
{
- QString componentStr = "import Qt 4.6\nTextInput { font.family: \"\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { font.family: \"\"; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -240,7 +240,7 @@ void tst_qdeclarativetextinput::color()
//test color
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextInput { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -253,7 +253,7 @@ void tst_qdeclarativetextinput::color()
//test selection color
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextInput { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -266,7 +266,7 @@ void tst_qdeclarativetextinput::color()
//test selected text color
for (int i = 0; i < colorStrings.size(); i++)
{
- QString componentStr = "import Qt 4.6\nTextInput { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -281,7 +281,7 @@ void tst_qdeclarativetextinput::color()
QColor testColor("#001234");
testColor.setAlpha(170);
- QString componentStr = "import Qt 4.6\nTextInput { color: \"" + colorStr + "\"; text: \"Hello World\" }";
+ QString componentStr = "import Qt 4.7\nTextInput { color: \"" + colorStr + "\"; text: \"Hello World\" }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -296,7 +296,7 @@ void tst_qdeclarativetextinput::color()
void tst_qdeclarativetextinput::selection()
{
QString testStr = standard[0];
- QString componentStr = "import Qt 4.6\nTextInput { text: \""+ testStr +"\"; }";
+ QString componentStr = "import Qt 4.7\nTextInput { text: \""+ testStr +"\"; }";
QDeclarativeComponent textinputComponent(&engine);
textinputComponent.setData(componentStr.toLatin1(), QUrl());
QDeclarativeTextInput *textinputObject = qobject_cast<QDeclarativeTextInput*>(textinputComponent.create());
@@ -378,7 +378,7 @@ void tst_qdeclarativetextinput::selection()
void tst_qdeclarativetextinput::maxLength()
{
- //QString componentStr = "import Qt 4.6\nTextInput { maximumLength: 10; }";
+ //QString componentStr = "import Qt 4.7\nTextInput { maximumLength: 10; }";
QDeclarativeView *canvas = createView(SRCDIR "/data/maxLength.qml");
canvas->show();
canvas->setFocus();
@@ -408,7 +408,7 @@ void tst_qdeclarativetextinput::maxLength()
void tst_qdeclarativetextinput::masks()
{
//Not a comprehensive test of the possible masks, that's done elsewhere (QLineEdit)
- //QString componentStr = "import Qt 4.6\nTextInput { inputMask: 'HHHHhhhh'; }";
+ //QString componentStr = "import Qt 4.7\nTextInput { inputMask: 'HHHHhhhh'; }";
QDeclarativeView *canvas = createView(SRCDIR "/data/masks.qml");
canvas->show();
canvas->setFocus();
diff --git a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
index 1dfec50..a08a91c 100644
--- a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
+++ b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp
@@ -93,7 +93,7 @@ void tst_qdeclarativetimer::notRepeating()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100; running: true }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100; running: true }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
QVERIFY(timer->isRunning());
@@ -114,7 +114,7 @@ void tst_qdeclarativetimer::notRepeatingStart()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100 }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100 }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
QVERIFY(!timer->isRunning());
@@ -139,7 +139,7 @@ void tst_qdeclarativetimer::repeat()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100; repeat: true; running: true }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100; repeat: true; running: true }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
@@ -181,7 +181,7 @@ void tst_qdeclarativetimer::triggeredOnStart()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100; running: true; triggeredOnStart: true }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100; running: true; triggeredOnStart: true }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
QVERIFY(timer->triggeredOnStart());
@@ -216,7 +216,7 @@ void tst_qdeclarativetimer::triggeredOnStartRepeat()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 100; running: true; triggeredOnStart: true; repeat: true }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100; running: true; triggeredOnStart: true; repeat: true }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
@@ -240,7 +240,7 @@ void tst_qdeclarativetimer::noTriggerIfNotRunning()
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
component.setData(QByteArray(
- "import Qt 4.6\n"
+ "import Qt 4.7\n"
"Item { property bool ok: true\n"
"Timer { id: t1; interval: 100; repeat: true; running: true; onTriggered: if (!running) ok=false }"
"Timer { interval: 10; running: true; onTriggered: t1.running=false }"
@@ -258,7 +258,7 @@ void tst_qdeclarativetimer::changeDuration()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 200; repeat: true; running: true }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 200; repeat: true; running: true }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
@@ -294,7 +294,7 @@ void tst_qdeclarativetimer::restart()
{
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nTimer { interval: 500; repeat: true; running: true }"), QUrl::fromLocalFile(""));
+ component.setData(QByteArray("import Qt 4.7\nTimer { interval: 500; repeat: true; running: true }"), QUrl::fromLocalFile(""));
QDeclarativeTimer *timer = qobject_cast<QDeclarativeTimer*>(component.create());
QVERIFY(timer != 0);
diff --git a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
index ce389f3..beabf86 100644
--- a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
+++ b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp
@@ -453,7 +453,7 @@ void tst_qdeclarativewebview::newWindowComponent()
QTRY_COMPARE(wv->property("progress").toDouble(), 1.0);
QDeclarativeComponent substituteComponent(&engine);
- substituteComponent.setData("import Qt 4.6; WebView { objectName: 'newWebView'; url: 'basic.html'; }", QUrl::fromLocalFile(""));
+ substituteComponent.setData("import Qt 4.7; WebView { objectName: 'newWebView'; url: 'basic.html'; }", QUrl::fromLocalFile(""));
QSignalSpy newWindowComponentSpy(wv, SIGNAL(newWindowComponentChanged()));
wv->setProperty("newWindowComponent", QVariant::fromValue(&substituteComponent));
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
index fe2dac2..a1dae24 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
+++ b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp
@@ -85,7 +85,7 @@ void tst_QDeclarativeWorkerScript::source()
QUrl source = QUrl::fromLocalFile(SRCDIR "/data/worker.qml");
QDeclarativeComponent component(&m_engine);
- component.setData("import Qt 4.6\nWorkerScript { source: '" + source.toString().toUtf8() + "'; }", QUrl());
+ component.setData("import Qt 4.7\nWorkerScript { source: '" + source.toString().toUtf8() + "'; }", QUrl());
QDeclarativeWorkerScript *item = qobject_cast<QDeclarativeWorkerScript*>(component.create());
QVERIFY(item != 0);
diff --git a/tests/auto/declarative/sql/tst_sql.cpp b/tests/auto/declarative/sql/tst_sql.cpp
index 1bab2d2..c8b8dc3 100644
--- a/tests/auto/declarative/sql/tst_sql.cpp
+++ b/tests/auto/declarative/sql/tst_sql.cpp
@@ -196,7 +196,7 @@ void tst_sql::testQml()
QFETCH(QString, jsfile);
QString qml=
- "import Qt 4.6\n"
+ "import Qt 4.7\n"
"import \""+jsfile+"\" as JS\n"
"Text { text: JS.test() }";