summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlineedit.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2010-06-05 19:20:23 (GMT)
committerLars Knoll <lars.knoll@nokia.com>2010-06-09 22:07:34 (GMT)
commit1533e7251d1dc4318b87ec799f0367f5fca0b092 (patch)
tree554c742cff985ffc261a92c588ee3b54bd76b0f9 /src/gui/widgets/qlineedit.cpp
parent6287977849ff5cab64a944fb0590d306a79f3637 (diff)
downloadQt-1533e7251d1dc4318b87ec799f0367f5fca0b092.zip
Qt-1533e7251d1dc4318b87ec799f0367f5fca0b092.tar.gz
Qt-1533e7251d1dc4318b87ec799f0367f5fca0b092.tar.bz2
Correct BiDi behavior of QLineEdit
* LayoutDirectionChange event doesn't affect the text anymore. * Default text direction is determined from string * Qt::Key_Direction_L/R forces the layout direction Task-number: Part of Qt-3292 Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/gui/widgets/qlineedit.cpp')
-rw-r--r--src/gui/widgets/qlineedit.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index c1c4abf..1bffde1 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1860,7 +1860,7 @@ void QLineEdit::paintEvent(QPaintEvent *)
p.setClipRect(r);
QFontMetrics fm = fontMetrics();
- Qt::Alignment va = QStyle::visualAlignment(layoutDirection(), QFlag(d->alignment));
+ Qt::Alignment va = QStyle::visualAlignment(d->control->layoutDirection(), QFlag(d->alignment));
switch (va & Qt::AlignVertical_Mask) {
case Qt::AlignBottom:
d->vscroll = r.y() + r.height() - fm.height() - d->verticalMargin;
@@ -2161,9 +2161,6 @@ void QLineEdit::changeEvent(QEvent *ev)
}
update();
break;
- case QEvent::LayoutDirectionChange:
- d->control->setLayoutDirection(layoutDirection());
- break;
default:
break;
}