diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem3.qml | 12 | ||||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem4.qml | 6 | ||||
-rw-r--r-- | tests/auto/quick/qquickshape/tst_qquickshape.cpp | 7 | ||||
-rw-r--r-- | tests/manual/shapestest/shapestest.qml | 12 |
4 files changed, 18 insertions, 19 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); } diff --git a/tests/manual/shapestest/shapestest.qml b/tests/manual/shapestest/shapestest.qml index bf503c12d9..df53f088ae 100644 --- a/tests/manual/shapestest/shapestest.qml +++ b/tests/manual/shapestest/shapestest.qml @@ -83,14 +83,14 @@ Rectangle { ShapePath { strokeWidth: 4 strokeColor: "red" - fillGradient: ShapeLinearGradient { + fillGradient: LinearGradient { x1: 0; y1: 0 x2: 200; y2: 100 - 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" } } fillColor: "blue" // ignored with the gradient set strokeStyle: ShapePath.DashLine |