diff options
author | Alexander Akulich <akulichalexander@gmail.com> | 2018-10-21 20:33:07 +0300 |
---|---|---|
committer | Alexandr Akulich <akulichalexander@gmail.com> | 2018-10-25 13:34:54 +0000 |
commit | 7f6657337f3b0b43c089efd29c914d4af26395e2 (patch) | |
tree | 0ecc409f73bf933350cd12047dee8ea6ae204c78 | |
parent | cff2ea73dbe802de970e80025de80d9734d0f35d (diff) |
Fix QML compatibility for Text.contentWidth/Height changed handlers
The properties used to have a single notifier that name is different from
the properties names. QML Engine always connects a handler to signal, if it
exists and only if there is no such signal then it lookup for a property
notifier. In commit e92f76cf9ea91e87ec2e3e68234899fd9c12142f we introduced
new signals that match the names of the two property changes handlers, but
the signals are not available on older import.
Remove revision number from the notifiers of Text.contentWidth/contentHeight
to fix backward compatibility until a better solution (such as extra engine
logic like "if a signal that matches the handler is not available then check
if there is a way to connect to a property notifier that matches the handler"
Fixes: QTBUG-71247
Change-Id: I11fb6230d85218ef437816c60c8147b953d47241
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r-- | src/quick/items/qquicktext_p.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/quick/items/qquicktext_p.h b/src/quick/items/qquicktext_p.h index f4e7fa7046..1af60051fb 100644 --- a/src/quick/items/qquicktext_p.h +++ b/src/quick/items/qquicktext_p.h @@ -272,8 +272,10 @@ Q_SIGNALS: void textFormatChanged(QQuickText::TextFormat textFormat); void elideModeChanged(QQuickText::TextElideMode mode); void contentSizeChanged(); - Q_REVISION(12) void contentWidthChanged(qreal contentWidth); - Q_REVISION(12) void contentHeightChanged(qreal contentHeight); + // The next two signals should be marked as Q_REVISION(12). See QTBUG-71247 + void contentWidthChanged(qreal contentWidth); + void contentHeightChanged(qreal contentHeight); + void lineHeightChanged(qreal lineHeight); void lineHeightModeChanged(LineHeightMode mode); void fontSizeModeChanged(); |