summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp5
3 files changed, 3 insertions, 12 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index 66a2355..3988f7f 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -218,10 +218,7 @@ void QDeclarativeTextPrivate::determineHorizontalAlignment()
if (hAlignImplicit && q->isComponentComplete()) {
// if no explicit alignment has been set, follow the natural layout direction of the text
QDeclarativeText::HAlignment previousAlign = hAlign;
- if (text.isEmpty() && QApplication::layoutDirection() == Qt::RightToLeft)
- hAlign = QDeclarativeText::AlignRight;
- else
- hAlign = text.isRightToLeft() ? QDeclarativeText::AlignRight : QDeclarativeText::AlignLeft;
+ hAlign = text.isRightToLeft() ? QDeclarativeText::AlignRight : QDeclarativeText::AlignLeft;
if (previousAlign != hAlign)
emit q->horizontalAlignmentChanged(hAlign);
}
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index 5e1459c..78729aa 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -1547,10 +1547,7 @@ void QDeclarativeTextEditPrivate::determineHorizontalAlignment()
if (hAlignImplicit && q->isComponentComplete()) {
// if no explicit alignment has been set, follow the natural layout direction of the text
QDeclarativeTextEdit::HAlignment previousAlign = hAlign;
- if (text.isEmpty() && QApplication::layoutDirection() == Qt::RightToLeft)
- hAlign = QDeclarativeTextEdit::AlignRight;
- else
- hAlign = rightToLeftText ? QDeclarativeTextEdit::AlignRight : QDeclarativeTextEdit::AlignLeft;
+ hAlign = rightToLeftText ? QDeclarativeTextEdit::AlignRight : QDeclarativeTextEdit::AlignLeft;
if (previousAlign != hAlign)
emit q->horizontalAlignmentChanged(hAlign);
}
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index d9d9335..670a6ea 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -1283,10 +1283,7 @@ void QDeclarativeTextInputPrivate::determineHorizontalAlignment()
QString text = control->text();
// if no explicit alignment has been set, follow the natural layout direction of the text
QDeclarativeTextInput::HAlignment previousAlign = hAlign;
- if (text.isEmpty() && QApplication::layoutDirection() == Qt::RightToLeft)
- hAlign = QDeclarativeTextInput::AlignRight;
- else
- hAlign = text.isRightToLeft() ? QDeclarativeTextInput::AlignRight : QDeclarativeTextInput::AlignLeft;
+ hAlign = text.isRightToLeft() ? QDeclarativeTextInput::AlignRight : QDeclarativeTextInput::AlignLeft;
if (previousAlign != hAlign)
emit q->horizontalAlignmentChanged(hAlign);
}