aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-01-14 11:28:06 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-01-17 10:50:04 +0100
commitf09f3655e4d6076b5b35563fc485fd102a6fc903 (patch)
tree6ee9b104afce498cd09dfc65e7aeb3fd7cd1b8a9 /src/qml
parentb974fac576b620436af64ad8b617f2276b756a05 (diff)
Fix Qt.inputMethod ownership
Change-Id: Ic51f9daf17742a421a810d95b2a510caf657e08f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/qml/qqmlglobal.cpp2
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp
index 82c1b68715..e100b53386 100644
--- a/src/qml/qml/qqmlglobal.cpp
+++ b/src/qml/qml/qqmlglobal.cpp
@@ -33,6 +33,7 @@
#include <private/qqmlglobal_p.h>
+#include <QtQml/qqmlengine.h>
#include <QtCore/qvariant.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qdebug.h>
@@ -358,6 +359,7 @@ QObject *QQmlGuiProvider::inputMethod()
// We don't have any input method code by default
QObject *o = new QObject();
o->setObjectName(QString::fromLatin1("No inputMethod available"));
+ QQmlEngine::setObjectOwnership(o, QQmlEngine::JavaScriptOwnership);
return o;
}
#endif
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index 9cf9ba9c12..19cb1edb60 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -1268,7 +1268,6 @@ ReturnedValue QtObject::method_get_application(CallContext *ctx)
ReturnedValue QtObject::method_get_inputMethod(CallContext *ctx)
{
QObject *o = QQml_guiProvider()->inputMethod();
- QQmlEngine::setObjectOwnership(o, QQmlEngine::CppOwnership);
return QV4::QObjectWrapper::wrap(ctx->d()->engine, o);
}
#endif