diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-02-21 13:31:19 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-23 01:19:51 +0100 |
commit | a08546507fe0ce356e4183e557d9408295c80610 (patch) | |
tree | 67b1c3f9a3ce626335be3accb9f1bf9f8b486c03 /src/quick/items/qquicktextcontrol_p_p.h | |
parent | 6a42a6e0a9a1abdda0d07a5a20b4ac7e45348684 (diff) |
Reduce QQuickTextEdit memory usage.
Remove unnecessary members from QQuickTextEditPrivate and
QQuickTextControlPrivate and re-order and pack to reduce padding for
alignment.
Change-Id: I14f5e3fc01646d02745f095c2a4b168cd675745d
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Diffstat (limited to 'src/quick/items/qquicktextcontrol_p_p.h')
-rw-r--r-- | src/quick/items/qquicktextcontrol_p_p.h | 55 |
1 files changed, 23 insertions, 32 deletions
diff --git a/src/quick/items/qquicktextcontrol_p_p.h b/src/quick/items/qquicktextcontrol_p_p.h index daf2f8ca82..44bc00221b 100644 --- a/src/quick/items/qquicktextcontrol_p_p.h +++ b/src/quick/items/qquicktextcontrol_p_p.h @@ -132,49 +132,40 @@ public: bool isPreediting() const; void commitPreedit(); - QTextDocument *doc; - bool cursorOn; - QTextCursor cursor; - bool cursorIsFocusIndicator; - QTextCharFormat lastCharFormat; - - Qt::TextInteractionFlags interactionFlags; - - QBasicTimer cursorBlinkTimer; - QBasicTimer trippleClickTimer; QPointF trippleClickPoint; + QPointF mousePressPos; - bool mousePressed; - - QPoint mousePressPos; - - QPointer<QObject> contextObject; - - bool lastSelectionState; - - bool ignoreAutomaticScrollbarAdjustement; + QTextCharFormat lastCharFormat; + QTextDocument *doc; + QTextCursor cursor; QTextCursor selectedWordOnDoubleClick; QTextCursor selectedBlockOnTrippleClick; + QString tentativeCommit; + QString highlightedAnchor; // Anchor below cursor + QString anchorOnMousePress; + QString linkToCopy; - bool overwriteMode; - bool acceptRichText; + QBasicTimer cursorBlinkTimer; + QBasicTimer trippleClickTimer; int preeditCursor; - bool hideCursor; // used to hide the cursor in the preedit area - QString tentativeCommit; - - QPalette palette; - bool hasFocus; - bool isEnabled; - QString highlightedAnchor; // Anchor below cursor - QString anchorOnMousePress; - bool hadSelectionOnMousePress; + Qt::TextInteractionFlags interactionFlags; - bool wordSelectionEnabled; + bool cursorOn : 1; + bool cursorIsFocusIndicator : 1; + bool mousePressed : 1; + bool lastSelectionState : 1; + bool ignoreAutomaticScrollbarAdjustement : 1; + bool overwriteMode : 1; + bool acceptRichText : 1; + bool hideCursor : 1; // used to hide the cursor in the preedit area + bool hasFocus : 1; + bool isEnabled : 1; + bool hadSelectionOnMousePress : 1; + bool wordSelectionEnabled : 1; - QString linkToCopy; void _q_copyLink(); void _q_updateBlock(const QTextBlock &); void _q_documentLayoutChanged(); |