aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/v8/qv8engine.cpp
diff options
context:
space:
mode:
authorPekka Vuorela <pekka.ta.vuorela@nokia.com>2012-02-03 10:07:51 +0200
committerQt by Nokia <qt-info@nokia.com>2012-02-10 09:54:58 +0100
commite761f5b906c427433325debb9f08c4f2d0ba902d (patch)
treefa8fbc933b6ed9ea2cdbc918d4317c95992c26e7 /src/declarative/qml/v8/qv8engine.cpp
parent9634dc440269fc03f825a6d18b371d8e612ba9ec (diff)
Use QInputMethod instead of deprecated QInputPanel
Similarly deprecate Qt.application.inputPanel and introduce replacement Qt.inputMethod. Change-Id: Ie4fd467f93f75023c86b0a2d038d858fe5001146 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Sami Kananoja <sami.kananoja@nokia.com>
Diffstat (limited to 'src/declarative/qml/v8/qv8engine.cpp')
-rw-r--r--src/declarative/qml/v8/qv8engine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/qml/v8/qv8engine.cpp b/src/declarative/qml/v8/qv8engine.cpp
index 405e406c88..90137330b5 100644
--- a/src/declarative/qml/v8/qv8engine.cpp
+++ b/src/declarative/qml/v8/qv8engine.cpp
@@ -41,6 +41,8 @@
#include "qv8engine_p.h"
+#include <QtGui/QGuiApplication>
+
#include "qv8contextwrapper_p.h"
#include "qv8valuetypewrapper_p.h"
#include "qv8sequencewrapper_p.h"
@@ -575,6 +577,7 @@ void QV8Engine::initializeGlobal(v8::Handle<v8::Object> global)
if (m_engine) {
qt->Set(v8::String::New("application"), newQObject(new QDeclarativeApplication(m_engine)));
+ qt->Set(v8::String::New("inputMethod"), newQObject(qGuiApp->inputMethod(), CppOwnership));
qt->Set(v8::String::New("lighter"), V8FUNCTION(lighter, this));
qt->Set(v8::String::New("darker"), V8FUNCTION(darker, this));
qt->Set(v8::String::New("tint"), V8FUNCTION(tint, this));