diff options
-rw-r--r-- | src/quick/items/qquicktext.cpp | 4 | ||||
-rw-r--r-- | src/quick/items/qquicktext_p.h | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index 1c7f1ca6aa..f39e8e0316 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -2969,6 +2969,8 @@ void QQuickText::setRenderType(QQuickText::RenderType renderType) d->updateLayout(); } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +#if QT_DEPRECATED_SINCE(5, 15) /*! \qmlmethod QtQuick::Text::doLayout() \deprecated @@ -2980,6 +2982,8 @@ void QQuickText::doLayout() forceLayout(); } +#endif +#endif /*! \qmlmethod QtQuick::Text::forceLayout() \since 5.9 diff --git a/src/quick/items/qquicktext_p.h b/src/quick/items/qquicktext_p.h index b64751b6f4..0fffc1fb9a 100644 --- a/src/quick/items/qquicktext_p.h +++ b/src/quick/items/qquicktext_p.h @@ -223,7 +223,12 @@ public: QRectF boundingRect() const override; QRectF clipRect() const override; - Q_INVOKABLE void doLayout(); // ### Qt 6: remove +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +#if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_X("Use forceLayout() instead") + Q_INVOKABLE void doLayout(); +#endif +#endif Q_REVISION(9) Q_INVOKABLE void forceLayout(); RenderType renderType() const; |