summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/shared/platforminputcontext.h
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-02-02 14:52:09 +1000
committerAndrew den Exter <andrew.den-exter@nokia.com>2012-02-02 06:28:43 +0100
commitb9fd262ee0040cbddb1a87d15335372054881122 (patch)
treed9c68ced812bb70fc5c95b2e30b3d54b0f9e1f06 /tests/auto/declarative/shared/platforminputcontext.h
parent7d0e73b77bbc60ac56776ae1d4a87df6812f716c (diff)
Fix or ignore test qdeclarativetextinput test failures.
Don't leave dangling pointers to test plaform input contexts, clear preedit text from input before continuing with test, allow some larger error for cursor positions across all platforms, and add an expected failure for a failure originating in QWidgetLineControl. Change-Id: I843d13c29d8e44e5e6bfa71b67358b11c1741e97 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
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()