summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativetextinput_p.h
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-05-20 04:22:39 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2011-05-20 06:01:53 (GMT)
commita0b2fc44ff8752193cacde52276b1822741f5374 (patch)
tree65a995e853eaf9bf7583aadd4cb857ffe3dbef5a /src/declarative/graphicsitems/qdeclarativetextinput_p.h
parent80db0a1e59658f9e445219fc48d9236a79edca72 (diff)
downloadQt-a0b2fc44ff8752193cacde52276b1822741f5374.zip
Qt-a0b2fc44ff8752193cacde52276b1822741f5374.tar.gz
Qt-a0b2fc44ff8752193cacde52276b1822741f5374.tar.bz2
Notify when the TextInput cursorRectangle property changes within pre-edit
Anything that updates the horizontal scroll is also likely to change the position of the cursor rectangle and the micro focus. So group these actions together and ensure they're done before emitting cursorPositionChanged() so positionToRectangle() returns a valid value from that handler. Change-Id: I5fadc58efb148a8dabe88a94381c86cd64dba3bd Task-number: QTBUG-19089 Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextinput_p.h')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
index ec70e43..171db92 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
@@ -75,7 +75,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextInput : public QDeclarativeImplicitSizeP
Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly NOTIFY readOnlyChanged)
Q_PROPERTY(bool cursorVisible READ isCursorVisible WRITE setCursorVisible NOTIFY cursorVisibleChanged)
Q_PROPERTY(int cursorPosition READ cursorPosition WRITE setCursorPosition NOTIFY cursorPositionChanged)
- Q_PROPERTY(QRect cursorRectangle READ cursorRectangle NOTIFY cursorPositionChanged)
+ Q_PROPERTY(QRect cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged)
Q_PROPERTY(QDeclarativeComponent *cursorDelegate READ cursorDelegate WRITE setCursorDelegate NOTIFY cursorDelegateChanged)
Q_PROPERTY(int selectionStart READ selectionStart NOTIFY selectionStartChanged)
Q_PROPERTY(int selectionEnd READ selectionEnd NOTIFY selectionEndChanged)
@@ -221,6 +221,7 @@ public:
Q_SIGNALS:
void textChanged();
void cursorPositionChanged();
+ void cursorRectangleChanged();
void selectionStartChanged();
void selectionEndChanged();
void selectedTextChanged();
@@ -279,8 +280,8 @@ private Q_SLOTS:
void q_textChanged();
void selectionChanged();
void createCursor();
- void moveCursor();
void cursorPosChanged();
+ void updateCursorRectangle();
void updateRect(const QRect &r = QRect());
void q_canPasteChanged();