Commit 34d3b5d8 authored by Kai Koehne's avatar Kai Koehne
Browse files

QuickDesigner: Remove dependency of autotests to tests/manual/qml

Copy over used files to tests/auto/qml/qmldesigner/data directory.
parent 3828d6b2
......@@ -6090,10 +6090,8 @@ void TestCore::changePropertyBinding()
void TestCore::loadTestFiles()
{
const QString manualTestPath = QLatin1String(QTCREATORDIR) + "/tests/manual/qml/testfiles";
qDebug() << manualTestPath;
{ //empty.qml
QFile file(manualTestPath + "/empty.qml");
QFile file(":/fx/empty.qml");
QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text));
QPlainTextEdit textEdit;
......@@ -6111,12 +6109,12 @@ void TestCore::loadTestFiles()
QVERIFY(model.data());
ModelNode rootModelNode(testRewriterView->rootModelNode());
QVERIFY(rootModelNode.isValid());
QCOMPARE(rootModelNode.type(), QLatin1String("Qt/Rectangle"));
QCOMPARE(rootModelNode.type(), QLatin1String("Qt/Item"));
QVERIFY(rootModelNode.allDirectSubModelNodes().isEmpty());
}
{ //helloworld.qml
QFile file(manualTestPath + "/helloworld.qml");
QFile file(":/fx/helloworld.qml");
QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text));
QPlainTextEdit textEdit;
......@@ -6146,7 +6144,7 @@ void TestCore::loadTestFiles()
QCOMPARE(textNode.variantProperty("y").value().toInt(), 93);
}
{ //states.qml
QFile file(manualTestPath + "/states.qml");
QFile file(":/fx/states.qml");
QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text));
QPlainTextEdit textEdit;
......@@ -6195,7 +6193,7 @@ void TestCore::loadTestFiles()
QSKIP("Fails because the text editor model doesn't know about components", SkipAll);
{ //usingbutton.qml
QFile file(manualTestPath + "/usingbutton.qml");
QFile file(":/fx/usingbutton.qml");
QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text));
QPlainTextEdit textEdit;
......@@ -6209,7 +6207,6 @@ void TestCore::loadTestFiles()
testRewriterView->setTextModifier(&textModifier);
model->attachView(testRewriterView.data());
qDebug() << testRewriterView->errors().first().toString();
QVERIFY(testRewriterView->errors().isEmpty());
QVERIFY(model.data());
......
import Qt 4.7
Rectangle {
width: 300
height: 300
id: page
color: "#ffff00"
Rectangle {
width: 183
x: 31
objectName: "Rectangle_1"
y: 76
rotation: -20
height: 193
color: "#ffaa00"
gradient: Gradient {
GradientStop { position: 0.0; color: "#ffaa00" }
GradientStop { position: 1.0; color: "#ffaa7f" }
}
Text {
width: 78
x: 11
y: 10
height: 20
id: helloText2
text: "Hello QmlGraphics!"
}
Text {
width: 85
x: 11
objectName: "xt5"
y: 165
height: 18
id: helloText5
text: "blah!!!!!"
}
Image {
width: 422
x: 47
objectName: "Image_1"
opacity: 0.6
y: 45.2
rotation: 0
scale: 0.2
height: 498
source: "http://farm4.static.flickr.com/3002/2722850010_02b62a030f_m.jpg"
smooth: true
fillMode: "Tile"
}
Text {
width: 100
x: 178
y: 11.64
rotation: 90
height: 20
id: helloText11
text: "Hello QmlGraphics!"
}
}
Text {
width: 100
x: 10
y: 13
height: 20
id: helloText3
text: "Hello QmlGraphics!"
}
width: 200
height: 200
Text {
width: 127
x: 163
y: 184
height: 106
id: helloText4
text: "Hello QmlGraphics!"
x: 66
y: 93
text: "Hello World"
}
}
import Qt 4.7
Item {
id: theRootItem;
width: 400;
height: 400;
Rectangle {
width: 157;
height: 120;
x: 145;
y: 157;
id: rectangle_1;
Rectangle {
id: rect
width: 200
height: 200
Text {
id: text
x: 66
y: 93
text: "Base State"
}
Rectangle {
x: 49;
y: 6;
width: 100;
id: rectangle_2;
color: "#009920";
height: 100;
}
states: [
State {
name: "State1";
when: destination === "one";
name: "State1"
PropertyChanges {
target: rectangle_2;
height: 200
width: 300
target: rect
color: "blue"
}
PropertyChanges {
target: text
text: "State1"
}
},
State {
name: "State2";
when: false == true;
},
State {
name: "State3";
name: "State2"
PropertyChanges {
target: rectangle_2;
x: 200
y: 300
target: rect
color: "gray"
}
}
]
transitions: [
Transition {
NumberAnimation {
properties: "width, height"
easing: "OutQuad"
duration: 500
PropertyChanges {
target: text
text: "State2"
}
}
]
}
Image {
id: image1
x: 41
y: 46
source: "images/qtcreator.png"
}
}
import Qt 4.7
import "components" as X
Rectangle {
width: 640
height: 480
X.MyButton {
}
}
<RCC>
<qresource prefix="/" >
<qresource prefix="/">
<file>fx/attributes.qml</file>
<file>fx/empty.qml</file>
<file>fx/helloworld.qml</file>
......@@ -7,5 +7,6 @@
<file>qwidget/test.qml</file>
<file>fx/topitem.qml</file>
<file>fx/subitems/SubItem.qml</file>
<file>fx/states.qml</file>
</qresource>
</RCC>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment