diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-12-20 23:00:16 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-12-20 23:00:16 (GMT) |
commit | ad23f356e503536b34ea8e59aa3390459d1bbfea (patch) | |
tree | d4d2dd72b32b1b83ab9ae967af21609f11e46a46 /src/declarative/graphicsitems/qdeclarativetextedit.cpp | |
parent | 8bea6ea27ff47ff2a02cb6e8ef5b16b3a7d0f0d5 (diff) | |
parent | 987a683ff51997cb23cb931af99c6554651742d7 (diff) | |
download | Qt-ad23f356e503536b34ea8e59aa3390459d1bbfea.zip Qt-ad23f356e503536b34ea8e59aa3390459d1bbfea.tar.gz Qt-ad23f356e503536b34ea8e59aa3390459d1bbfea.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-water
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextedit.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextedit.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index e05f4e4..4e16d24 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -643,6 +643,8 @@ int QDeclarativeTextEdit::cursorPosition() const void QDeclarativeTextEdit::setCursorPosition(int pos) { Q_D(QDeclarativeTextEdit); + if (pos < 0 || pos > d->text.length()) + return; QTextCursor cursor = d->control->textCursor(); if (cursor.position() == pos) return; |