summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativetextedit.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-09-05 20:50:58 +1000
committerQt Continuous Integration System <qt-info@nokia.com>2011-09-05 20:50:58 +1000
commitf0c4a037f9ebd184dc25571fa591f89dba943105 (patch)
treeef95e909ff455d191211b14c1b59ffe8f6ae208b /src/declarative/graphicsitems/qdeclarativetextedit.cpp
parentd066214044be2db65dcb5a09ba888909b12fed41 (diff)
parent220048de8130bbe6059af0a05c7328ae0048bf42 (diff)
Merge branch '4.7' of git://scm.dev.nokia.troll.no/qt/qt-doc-team
* '4.7' of git://scm.dev.nokia.troll.no/qt/qt-doc-team: (60 commits) Fix assert error on Windows with a negative char. Revert readonly BorderImage::sourceSize change URLs used with scheme handler use appropriate encoding for scheme Fix memory leak in ListModel custom parser DEF file update If automatic translation of input widget is off, skip reset Prevent leakage of native window handles QSslCertificate: blacklist fraudulent *.google.com Symbian: Not possible to catch RequestSoftwareInputPanel in eventFilter Added an additional check to workaround an issue on Windows. Exact word bubble doesn't disappear when screen is tapped (fix part 2) Exact word bubble doesn't disappear when screen is tapped Compile fix for Symbian 5th and earlier Symbian: Fix backspace on empty lines of multiline textedits Handle CloseSoftwareInputPanel event in QCoeFepInputContext Fix delayed password masking mid-string. Disabled splitscreen translation still moves screen Make text rendering working outside the gui thread on Symbian. Fix softkeys cleanup Fix clientRect usage in QWidgetPrivate::setGeometry_sys() ...
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextedit.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index 15a3caec2d..24d7f75dab 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -547,7 +547,15 @@ bool QDeclarativeTextEditPrivate::determineHorizontalAlignment()
{
Q_Q(QDeclarativeTextEdit);
if (hAlignImplicit && q->isComponentComplete()) {
- bool alignToRight = text.isEmpty() ? QApplication::keyboardInputDirection() == Qt::RightToLeft : rightToLeftText;
+ bool alignToRight;
+ if (text.isEmpty()) {
+ const QString preeditText = control->textCursor().block().layout()->preeditAreaText();
+ alignToRight = preeditText.isEmpty()
+ ? QApplication::keyboardInputDirection() == Qt::RightToLeft
+ : preeditText.isRightToLeft();
+ } else {
+ alignToRight = rightToLeftText;
+ }
return setHAlign(alignToRight ? QDeclarativeTextEdit::AlignRight : QDeclarativeTextEdit::AlignLeft);
}
return false;
@@ -1582,6 +1590,7 @@ void QDeclarativeTextEdit::q_textChanged()
void QDeclarativeTextEdit::moveCursorDelegate()
{
Q_D(QDeclarativeTextEdit);
+ d->determineHorizontalAlignment();
updateMicroFocus();
emit cursorRectangleChanged();
if(!d->cursor)