summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qinputpanel_p.h
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2011-09-22 16:43:27 +0300
committerQt by Nokia <qt-info@nokia.com>2011-09-23 11:09:19 +0200
commit3f311a5b3aac70d9dc7072ef78e14f81a2a65253 (patch)
treeeff4f9f648fda366cd79279384083c7d23c76d9b /src/gui/kernel/qinputpanel_p.h
parenteb1f41b8c186614392cff5b7b51c86e5f5c4e2b6 (diff)
Add autotest for QInputPanel
Change-Id: I8ac28d93f610cd3eb69087d2c961a5aab6c47e1e Reviewed-on: http://codereview.qt-project.org/5394 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/gui/kernel/qinputpanel_p.h')
-rw-r--r--src/gui/kernel/qinputpanel_p.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gui/kernel/qinputpanel_p.h b/src/gui/kernel/qinputpanel_p.h
index f44b66832b..cf999cdd5f 100644
--- a/src/gui/kernel/qinputpanel_p.h
+++ b/src/gui/kernel/qinputpanel_p.h
@@ -46,6 +46,8 @@
#include <private/qobject_p.h>
#include <QtCore/QWeakPointer>
#include <QTransform>
+#include <qplatforminputcontext_qpa.h>
+#include <private/qguiapplication_p.h>
QT_BEGIN_HEADER
@@ -55,11 +57,21 @@ class QInputPanelPrivate : public QObjectPrivate
{
public:
inline QInputPanelPrivate()
- : visible(false)
+ : visible(false), testContext(0)
{}
+ QPlatformInputContext *platformInputContext() const
+ {
+ return testContext ? testContext : QGuiApplicationPrivate::platformIntegration()->inputContext();
+ }
+ static inline QInputPanelPrivate *get(QInputPanel *inputPanel)
+ {
+ return inputPanel->d_func();
+ }
+
QTransform inputItemTransform;
QWeakPointer<QObject> inputItem;
bool visible;
+ QPlatformInputContext *testContext;
};
QT_END_NAMESPACE