summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/shared/platforminputcontext.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/shared/platforminputcontext.h')
-rw-r--r--tests/auto/declarative/shared/platforminputcontext.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/declarative/shared/platforminputcontext.h b/tests/auto/declarative/shared/platforminputcontext.h
index 0c23db4d..041f15b2 100644
--- a/tests/auto/declarative/shared/platforminputcontext.h
+++ b/tests/auto/declarative/shared/platforminputcontext.h
@@ -42,6 +42,8 @@
#include <qplatforminputcontext_qpa.h>
#include <QtGui/QInputPanel>
+#include <private/qinputpanel_p.h>
+
class PlatformInputContext : public QPlatformInputContext
{
public:
@@ -50,6 +52,12 @@ public:
m_invokeActionCallCount(0), m_showInputPanelCallCount(0), m_hideInputPanelCallCount(0),
m_updateCallCount(0), m_direction(Qt::LeftToRight)
{
+ QInputPanelPrivate::get(qApp->inputPanel())->testContext = this;
+ }
+
+ ~PlatformInputContext()
+ {
+ QInputPanelPrivate::get(qApp->inputPanel())->testContext = 0;
}
virtual void showInputPanel()