aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickshape
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickshape')
-rw-r--r--tests/auto/quick/qquickshape/data/pathitem3.qml12
-rw-r--r--tests/auto/quick/qquickshape/data/pathitem4.qml6
-rw-r--r--tests/auto/quick/qquickshape/tst_qquickshape.cpp7
3 files changed, 12 insertions, 13 deletions
diff --git a/tests/auto/quick/qquickshape/data/pathitem3.qml b/tests/auto/quick/qquickshape/data/pathitem3.qml
index 3b819991e6..fccd1aa2de 100644
--- a/tests/auto/quick/qquickshape/data/pathitem3.qml
+++ b/tests/auto/quick/qquickshape/data/pathitem3.qml
@@ -13,14 +13,14 @@ Item {
ShapePath {
strokeWidth: 4
strokeColor: "red"
- fillGradient: ShapeLinearGradient {
+ fillGradient: LinearGradient {
x1: 20; y1: 20
x2: 180; y2: 130
- ShapeGradientStop { position: 0; color: "blue" }
- ShapeGradientStop { position: 0.2; color: "green" }
- ShapeGradientStop { position: 0.4; color: "red" }
- ShapeGradientStop { position: 0.6; color: "yellow" }
- ShapeGradientStop { position: 1; color: "cyan" }
+ GradientStop { position: 0; color: "blue" }
+ GradientStop { position: 0.2; color: "green" }
+ GradientStop { position: 0.4; color: "red" }
+ GradientStop { position: 0.6; color: "yellow" }
+ GradientStop { position: 1; color: "cyan" }
}
strokeStyle: ShapePath.DashLine
dashPattern: [ 1, 4 ]
diff --git a/tests/auto/quick/qquickshape/data/pathitem4.qml b/tests/auto/quick/qquickshape/data/pathitem4.qml
index 26e7084b8d..1d769051ee 100644
--- a/tests/auto/quick/qquickshape/data/pathitem4.qml
+++ b/tests/auto/quick/qquickshape/data/pathitem4.qml
@@ -28,10 +28,10 @@ Item {
}
ShapePath {
- fillGradient: ShapeLinearGradient {
+ fillGradient: LinearGradient {
y2: 150
- ShapeGradientStop { position: 0; color: "yellow" }
- ShapeGradientStop { position: 1; color: "green" }
+ GradientStop { position: 0; color: "yellow" }
+ GradientStop { position: 1; color: "green" }
}
startX: 10; startY: 100
diff --git a/tests/auto/quick/qquickshape/tst_qquickshape.cpp b/tests/auto/quick/qquickshape/tst_qquickshape.cpp
index fecac573b7..a984c28732 100644
--- a/tests/auto/quick/qquickshape/tst_qquickshape.cpp
+++ b/tests/auto/quick/qquickshape/tst_qquickshape.cpp
@@ -65,9 +65,8 @@ tst_QQuickShape::tst_QQuickShape()
const char *uri = "tst_qquickpathitem";
qmlRegisterType<QQuickShape>(uri, 1, 0, "Shape");
qmlRegisterType<QQuickShapePath>(uri, 1, 0, "ShapePath");
- qmlRegisterType<QQuickShapeGradientStop>(uri, 1, 0, "ShapeGradientStop");
qmlRegisterUncreatableType<QQuickShapeGradient>(uri, 1, 0, "ShapeGradient", QQuickShapeGradient::tr("ShapeGradient is an abstract base class"));
- qmlRegisterType<QQuickShapeLinearGradient>(uri, 1, 0, "ShapeLinearGradient");
+ qmlRegisterType<QQuickShapeLinearGradient>(uri, 1, 0, "LinearGradient");
}
void tst_QQuickShape::initValues()
@@ -206,9 +205,9 @@ void tst_QQuickShape::changeSignals()
QCOMPARE(vpChangeSpy.count(), 14);
QQmlListReference stopList(lgrad, "stops");
QCOMPARE(stopList.count(), 5);
- qobject_cast<QQuickShapeGradientStop *>(stopList.at(1))->setPosition(0.3);
+ qobject_cast<QQuickGradientStop *>(stopList.at(1))->setPosition(0.3);
QCOMPARE(vpChangeSpy.count(), 15);
- qobject_cast<QQuickShapeGradientStop *>(stopList.at(1))->setColor(Qt::black);
+ qobject_cast<QQuickGradientStop *>(stopList.at(1))->setColor(Qt::black);
QCOMPARE(vpChangeSpy.count(), 16);
}