summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebenginetestsupport_p.h
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2017-04-24 14:58:11 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2017-06-22 05:35:32 +0000
commit84b72e6b2387991f90293984f2666563c93cf13c (patch)
treefba4da001f374b7c05d3a1a239fefc4d10840cc8 /src/webengine/api/qquickwebenginetestsupport_p.h
parent5aa051f934c563397d79411af541099d164b2cc1 (diff)
Add back input method auto tests and test virtual keyboard for Quick
This patch also fixes the update of the ItemAcceptsInputMethod flag of QQuickWebEngineView regarding to the focused element in the view. Change-Id: Ic6e39401bdc7ca5fab9cc03e878aa731f23fc147 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webengine/api/qquickwebenginetestsupport_p.h')
-rw-r--r--src/webengine/api/qquickwebenginetestsupport_p.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/webengine/api/qquickwebenginetestsupport_p.h b/src/webengine/api/qquickwebenginetestsupport_p.h
index cca8d1df4..a84d00307 100644
--- a/src/webengine/api/qquickwebenginetestsupport_p.h
+++ b/src/webengine/api/qquickwebenginetestsupport_p.h
@@ -51,6 +51,7 @@
// We mean it.
//
+#include <private/qinputmethod_p.h>
#include <private/qtwebengineglobal_p.h>
#include <QObject>
@@ -73,13 +74,33 @@ Q_SIGNALS:
void loadingChanged(QQuickWebEngineLoadRequest *loadRequest);
};
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineTestInputContext : public QPlatformInputContext {
+ Q_OBJECT
+
+public:
+ QQuickWebEngineTestInputContext();
+ ~QQuickWebEngineTestInputContext();
+
+ Q_INVOKABLE void create();
+ Q_INVOKABLE void release();
+
+ virtual void showInputPanel();
+ virtual void hideInputPanel();
+ virtual bool isInputPanelVisible() const;
+
+private:
+ bool m_visible;
+};
+
class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineTestSupport : public QObject {
Q_OBJECT
Q_PROPERTY(QQuickWebEngineErrorPage *errorPage READ errorPage CONSTANT FINAL)
+ Q_PROPERTY(QQuickWebEngineTestInputContext *testInputContext READ testInputContext CONSTANT FINAL)
public:
QQuickWebEngineTestSupport();
QQuickWebEngineErrorPage *errorPage() const;
+ QQuickWebEngineTestInputContext *testInputContext() const;
Q_SIGNALS:
void windowCloseRejected();
@@ -87,6 +108,7 @@ Q_SIGNALS:
private:
QScopedPointer<QQuickWebEngineErrorPage> m_errorPage;
+ QScopedPointer<QQuickWebEngineTestInputContext> m_testInputContext;
};
QT_END_NAMESPACE