diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index 9a4e89a6cf..860653cc4c 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -1352,7 +1352,7 @@ QGradient::QGradient() Constructs a gradient based on a predefined \a preset. The coordinate mode of the resulting gradient is - QGradient::ObjectBoundingMode, allowing the preset + QGradient::ObjectMode, allowing the preset to be applied to arbitrary object sizes. */ QGradient::QGradient(Preset preset) @@ -1380,7 +1380,7 @@ QGradient::QGradient(Preset preset) return; m_type = LinearGradient; - setCoordinateMode(ObjectBoundingMode); + setCoordinateMode(ObjectMode); setSpread(PadSpread); const QJsonValue start = presetData[QLatin1Literal("start")]; diff --git a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp index e4b43f2912..cd3eaa1478 100644 --- a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp +++ b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp @@ -331,7 +331,7 @@ void tst_QBrush::gradientPresets() { QGradient gradient(QGradient::WarmFlame); QCOMPARE(gradient.type(), QGradient::LinearGradient); - QCOMPARE(gradient.coordinateMode(), QGradient::ObjectBoundingMode); + QCOMPARE(gradient.coordinateMode(), QGradient::ObjectMode); QLinearGradient *lg = static_cast<QLinearGradient *>(&gradient); QCOMPARE(lg->start(), QPointF(0, 1));