From cca5c6b033c23d4e153032012e8279bbcce74728 Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 11 May 2009 13:45:37 +0200 Subject: Make autoSipEnabled available on all platforms. This is relevant on S60 too, so it's time to make it cross platform. RevBy: mauricek --- src/gui/kernel/qapplication.cpp | 12 +++++++----- src/gui/kernel/qapplication.h | 4 ++-- src/gui/kernel/qapplication_p.h | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 56a65be..285f882 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -135,8 +135,8 @@ bool QApplicationPrivate::quitOnLastWindowClosed = true; #ifdef Q_OS_WINCE int QApplicationPrivate::autoMaximizeThreshold = -1; -bool QApplicationPrivate::autoSipEnabled = false; #endif +bool QApplicationPrivate::autoSipEnabled = false; QApplicationPrivate::QApplicationPrivate(int &argc, char **argv, QApplication::Type type) : QCoreApplicationPrivate(argc, argv) @@ -1234,11 +1234,13 @@ bool QApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventLis \since 4.5 \brief toggles automatic SIP (software input panel) visibility - The auto SIP property is only available as part of Qt for Windows CE. - Set this property to true to automatically display the SIP when entering widgets that accept keyboard input. This property only affects widgets with - the WA_InputMethodEnabled attribute set. + the WA_InputMethodEnabled attribute set, and is typically used to launch + a virtual keyboard on devices which have very few or no keys. + + The property only has an effect on platforms which use software input + panels, such as Windows CE and Symbian. */ #ifdef Q_OS_WINCE @@ -1251,6 +1253,7 @@ int QApplication::autoMaximizeThreshold() const { return QApplicationPrivate::autoMaximizeThreshold; } +#endif void QApplication::setAutoSipEnabled(const bool enabled) { @@ -1261,7 +1264,6 @@ bool QApplication::autoSipEnabled() const { return QApplicationPrivate::autoSipEnabled; } -#endif #ifndef QT_NO_STYLE_STYLESHEET diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h index 15066da..afe5fa5 100644 --- a/src/gui/kernel/qapplication.h +++ b/src/gui/kernel/qapplication.h @@ -111,8 +111,8 @@ class Q_GUI_EXPORT QApplication : public QCoreApplication #endif #ifdef Q_OS_WINCE Q_PROPERTY(int autoMaximizeThreshold READ autoMaximizeThreshold WRITE setAutoMaximizeThreshold) - Q_PROPERTY(bool autoSipEnabled READ autoSipEnabled WRITE setAutoSipEnabled) #endif + Q_PROPERTY(bool autoSipEnabled READ autoSipEnabled WRITE setAutoSipEnabled) public: enum Type { Tty, GuiClient, GuiServer }; @@ -298,9 +298,9 @@ public Q_SLOTS: #ifdef Q_OS_WINCE void setAutoMaximizeThreshold(const int threshold); int autoMaximizeThreshold() const; +#endif void setAutoSipEnabled(const bool enabled); bool autoSipEnabled() const; -#endif static void closeAllWindows(); static void aboutQt(); diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index bfc5652..a6fc602 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -221,8 +221,8 @@ public: static void emitLastWindowClosed(); #ifdef Q_OS_WINCE static int autoMaximizeThreshold; - static bool autoSipEnabled; #endif + static bool autoSipEnabled; static QGraphicsSystem *graphicsSystem() #if !defined(Q_WS_QWS) -- cgit v0.12