From 6397e5bc49f11e20a9d1838d8d8df46dd9486263 Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Wed, 22 Sep 2010 15:10:44 +0200 Subject: Fix text direction setting in QTextBlock layout QTextControl should no longer inherit the layout direction of parent widget as its default text direction. Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Lars Knoll --- src/gui/text/qtextcontrol.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index 5fe0c0c..7f2c4e9 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -404,12 +404,6 @@ void QTextControlPrivate::init(Qt::TextFormat format, const QString &text, QText Q_Q(QTextControl); setContent(format, text, document); - QWidget *parentWidget = qobject_cast(parent); - if (parentWidget) { - QTextOption opt = doc->defaultTextOption(); - opt.setTextDirection(parentWidget->layoutDirection()); - doc->setDefaultTextOption(opt); - } doc->setUndoRedoEnabled(interactionFlags & Qt::TextEditable); q->setCursorWidth(-1); } -- cgit v0.12