aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktext_p.h
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2017-11-29 16:40:07 +0100
committerAleix Pol Gonzalez <aleixpol@kde.org>2018-07-31 16:38:01 +0000
commite92f76cf9ea91e87ec2e3e68234899fd9c12142f (patch)
treef90d2d8a3d7a787368a25b8e868835cbf7d3fe9c /src/quick/items/qquicktext_p.h
parent6952f40a3ef47e5bc62286f75b26b2d79eaa9d74 (diff)
Increase fine-grained signals for some properties in Text
Text.[content/painted][Width/Height] were being always notified of changes at bulk. This is can be harmful in performance of QML applications that will trigger change requests on the program whenever a property is modified. This introduces separate signals so it's not a problem anymore. Change-Id: I5b82cf13158298dbc91157b837d0ed4aadeb86cf Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/quick/items/qquicktext_p.h')
-rw-r--r--src/quick/items/qquicktext_p.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/quick/items/qquicktext_p.h b/src/quick/items/qquicktext_p.h
index 15e989c13d..f4e7fa7046 100644
--- a/src/quick/items/qquicktext_p.h
+++ b/src/quick/items/qquicktext_p.h
@@ -79,10 +79,10 @@ class Q_QUICK_PRIVATE_EXPORT QQuickText : public QQuickImplicitSizeItem
Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY textFormatChanged)
Q_PROPERTY(TextElideMode elide READ elideMode WRITE setElideMode NOTIFY elideModeChanged) //### elideMode?
- Q_PROPERTY(qreal contentWidth READ contentWidth NOTIFY contentSizeChanged)
- Q_PROPERTY(qreal contentHeight READ contentHeight NOTIFY contentSizeChanged)
- Q_PROPERTY(qreal paintedWidth READ contentWidth NOTIFY contentSizeChanged) // Compatibility
- Q_PROPERTY(qreal paintedHeight READ contentHeight NOTIFY contentSizeChanged)
+ Q_PROPERTY(qreal contentWidth READ contentWidth NOTIFY contentWidthChanged)
+ Q_PROPERTY(qreal contentHeight READ contentHeight NOTIFY contentHeightChanged)
+ Q_PROPERTY(qreal paintedWidth READ contentWidth NOTIFY contentWidthChanged) // Compatibility
+ Q_PROPERTY(qreal paintedHeight READ contentHeight NOTIFY contentHeightChanged)
Q_PROPERTY(qreal lineHeight READ lineHeight WRITE setLineHeight NOTIFY lineHeightChanged)
Q_PROPERTY(LineHeightMode lineHeightMode READ lineHeightMode WRITE setLineHeightMode NOTIFY lineHeightModeChanged)
Q_PROPERTY(QUrl baseUrl READ baseUrl WRITE setBaseUrl RESET resetBaseUrl NOTIFY baseUrlChanged)
@@ -272,6 +272,8 @@ 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);
void lineHeightChanged(qreal lineHeight);
void lineHeightModeChanged(LineHeightMode mode);
void fontSizeModeChanged();