aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick1/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtquick1/qdeclarativetextinput/tst_qdeclarativetextinput.cpp')
-rw-r--r--tests/auto/qtquick1/qdeclarativetextinput/tst_qdeclarativetextinput.cpp55
1 files changed, 1 insertions, 54 deletions
diff --git a/tests/auto/qtquick1/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/qtquick1/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index aaee4ec53a..f13cbf4708 100644
--- a/tests/auto/qtquick1/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/qtquick1/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -51,6 +51,7 @@
#include <QtCore/qmath.h>
#include <private/qapplication_p.h>
#include <private/qinputpanel_p.h>
+#include "../../shared/platforminputcontext.h"
#include "qplatformdefs.h"
@@ -82,60 +83,6 @@ void sendPreeditText(const QString &text, int cursor)
}
-class PlatformInputContext : public QPlatformInputContext
-{
-public:
- PlatformInputContext()
- : m_visible(false), m_action(QInputPanel::Click), m_cursorPosition(0),
- m_invokeActionCallCount(0), m_showInputPanelCallCount(0), m_hideInputPanelCallCount(0),
- m_updateCallCount(0)
- {
- }
-
- virtual void showInputPanel()
- {
- m_visible = true;
- m_showInputPanelCallCount++;
- }
- virtual void hideInputPanel()
- {
- m_visible = false;
- m_hideInputPanelCallCount++;
- }
- virtual bool isInputPanelVisible() const
- {
- return m_visible;
- }
- virtual void invokeAction(QInputPanel::Action action, int cursorPosition)
- {
- m_invokeActionCallCount++;
- m_action = action;
- m_cursorPosition = cursorPosition;
- }
- virtual void update(Qt::InputMethodQueries)
- {
- m_updateCallCount++;
- }
-
- void clear() {
- m_cursorPosition = 0;
- m_invokeActionCallCount = 0;
- m_visible = false;
- m_showInputPanelCallCount = 0;
- m_hideInputPanelCallCount = 0;
- m_updateCallCount = 0;
- }
-
- bool m_visible;
- QInputPanel::Action m_action;
- int m_cursorPosition;
- int m_invokeActionCallCount;
- int m_showInputPanelCallCount;
- int m_hideInputPanelCallCount;
- int m_updateCallCount;
-};
-
-
class tst_qdeclarativetextinput : public QObject
{