diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2010-06-05 19:11:50 (GMT) |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2010-06-09 22:07:22 (GMT) |
commit | 312c028d44a80f5d6029eb166a0de731f8452525 (patch) | |
tree | 906a77e853b332043af27e1d1d2a5f687c2ab146 /src/gui/kernel/qwidget.cpp | |
parent | 0b06274858cab9cedace8e684d16664e49d5f814 (diff) | |
download | Qt-312c028d44a80f5d6029eb166a0de731f8452525.zip Qt-312c028d44a80f5d6029eb166a0de731f8452525.tar.gz Qt-312c028d44a80f5d6029eb166a0de731f8452525.tar.bz2 |
Handle setting the layoutDirection to Qt::LayoutDirectionAuto
Setting it to LayoutAuto will be ignored on an
application level (only LeftToRight or RightToLeft
are valid).
On a widget level is does the same as calling unsetLayoutDirection().
Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 895c85d..ab84a54 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -4828,6 +4828,11 @@ void QWidget::setLayoutDirection(Qt::LayoutDirection direction) { Q_D(QWidget); + if (direction == Qt::LayoutDirectionAuto) { + unsetLayoutDirection(); + return; + } + setAttribute(Qt::WA_SetLayoutDirection); d->setLayoutDirection_helper(direction); } |