From e8aa56b74b1a63a185ef71b9818ba8b0f9fe9040 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 29 Jun 2012 12:38:53 +0200 Subject: Add stylehint to use querying RTL keyboard support. Change-Id: Ic58ed7cb64cc7fe60b4d431e9f29e389c62265fc Reviewed-by: Girish Ramakrishnan --- src/gui/kernel/qplatformintegration.cpp | 2 ++ src/gui/kernel/qplatformintegration.h | 3 ++- src/gui/kernel/qstylehints.cpp | 5 +++++ src/gui/kernel/qstylehints.h | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp index 3021f6373e..d9e9c75920 100644 --- a/src/gui/kernel/qplatformintegration.cpp +++ b/src/gui/kernel/qplatformintegration.cpp @@ -298,6 +298,8 @@ QVariant QPlatformIntegration::styleHint(StyleHint hint) const return qreal(1.7); case StartDragVelocity: return 0; // no limit + case UseRtlExtensions: + return QVariant(false); } return 0; diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h index ea13a25bab..8ed48b268a 100644 --- a/src/gui/kernel/qplatformintegration.h +++ b/src/gui/kernel/qplatformintegration.h @@ -133,7 +133,8 @@ public: ShowIsFullScreen, PasswordMaskDelay, FontSmoothingGamma, - StartDragVelocity + StartDragVelocity, + UseRtlExtensions }; virtual QVariant styleHint(StyleHint hint) const; diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp index 194b5d3f71..99e37e4a41 100644 --- a/src/gui/kernel/qstylehints.cpp +++ b/src/gui/kernel/qstylehints.cpp @@ -112,4 +112,9 @@ qreal QStyleHints::fontSmoothingGamma() const return hint(QPlatformIntegration::FontSmoothingGamma).toReal(); } +bool QStyleHints::useRtlExtensions() const +{ + return hint(QPlatformIntegration::UseRtlExtensions).toBool(); +} + QT_END_NAMESPACE diff --git a/src/gui/kernel/qstylehints.h b/src/gui/kernel/qstylehints.h index f15679b7d6..a82af89789 100644 --- a/src/gui/kernel/qstylehints.h +++ b/src/gui/kernel/qstylehints.h @@ -65,6 +65,7 @@ public: bool showIsFullScreen() const; int passwordMaskDelay() const; qreal fontSmoothingGamma() const; + bool useRtlExtensions() const; private: friend class QGuiApplication; -- cgit v1.2.3