From a98741516c02bbc1f479300d08a39fb5f93e1d64 Mon Sep 17 00:00:00 2001 From: Pekka Vuorela Date: Thu, 5 Jan 2012 13:29:23 +0200 Subject: Move keyboard locale and input direction to QInputPanel Deprecated QGuiApplication::keyboardInputLocale() and keyboardInputDirection(), introduced QInputPanel::locale() and inputDirection(). Change-Id: Ic48c77f10821a949751c73c73f22bd78e2192b9c Reviewed-by: Joona Petrell Reviewed-by: Lars Knoll --- src/gui/text/qlinecontrol_p.h | 2 +- src/gui/text/qtextengine.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/text') diff --git a/src/gui/text/qlinecontrol_p.h b/src/gui/text/qlinecontrol_p.h index 166300f997..fb14df27bb 100644 --- a/src/gui/text/qlinecontrol_p.h +++ b/src/gui/text/qlinecontrol_p.h @@ -277,7 +277,7 @@ public: Qt::LayoutDirection layoutDirection() const { if (m_layoutDirection == Qt::LayoutDirectionAuto) { if (m_text.isEmpty()) - return QGuiApplication::keyboardInputDirection(); + return qApp->inputPanel()->inputDirection(); return m_text.isRightToLeft() ? Qt::RightToLeft : Qt::LeftToRight; } return m_layoutDirection; diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 00418bae5a..0dd8d0bef3 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -54,6 +54,7 @@ #include #include "qtextdocument_p.h" #include +#include #include @@ -1408,7 +1409,7 @@ bool QTextEngine::isRightToLeft() const itemize(); // this places the cursor in the right position depending on the keyboard layout if (layoutData->string.isEmpty()) - return QGuiApplication::keyboardInputDirection() == Qt::RightToLeft; + return qApp ? qApp->inputPanel()->inputDirection() == Qt::RightToLeft : false; return layoutData->string.isRightToLeft(); } -- cgit v1.2.3