aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/imports/gamepad/gamepad.pro2
-rw-r--r--src/imports/gamepad/plugins.qmltypes9
-rw-r--r--src/imports/gamepad/qtgamepad.cpp5
3 files changed, 13 insertions, 3 deletions
diff --git a/src/imports/gamepad/gamepad.pro b/src/imports/gamepad/gamepad.pro
index 4b00665..e518f10 100644
--- a/src/imports/gamepad/gamepad.pro
+++ b/src/imports/gamepad/gamepad.pro
@@ -1,7 +1,7 @@
CXX_MODULE = gamepad
TARGET = declarative_gamepad
TARGETPATH = QtGamepad
-IMPORT_VERSION = 1.0
+IMPORT_VERSION = 1.$$QT_MINOR_VERSION
QT += qml quick gamepad
diff --git a/src/imports/gamepad/plugins.qmltypes b/src/imports/gamepad/plugins.qmltypes
index f376dfe..259e952 100644
--- a/src/imports/gamepad/plugins.qmltypes
+++ b/src/imports/gamepad/plugins.qmltypes
@@ -4,10 +4,10 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtGamepad 1.0'
+// 'qmlplugindump -nonrelocatable QtGamepad 1.12'
Module {
- dependencies: []
+ dependencies: ["QtQuick 2.12"]
Component {
name: "QGamepad"
prototype: "QObject"
@@ -401,6 +401,11 @@ Module {
Parameter { name: "deviceId"; type: "int" }
}
Signal {
+ name: "gamepadNameChanged"
+ Parameter { name: "deviceId"; type: "int" }
+ Parameter { name: "name"; type: "string" }
+ }
+ Signal {
name: "gamepadDisconnected"
Parameter { name: "deviceId"; type: "int" }
}
diff --git a/src/imports/gamepad/qtgamepad.cpp b/src/imports/gamepad/qtgamepad.cpp
index f3f6439..4f9f263 100644
--- a/src/imports/gamepad/qtgamepad.cpp
+++ b/src/imports/gamepad/qtgamepad.cpp
@@ -62,10 +62,15 @@ public:
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtGamepad"));
+ //@uri QtGamepad
+
qmlRegisterSingletonType<QGamepadManager>(uri, 1, 0, "GamepadManager", &gamepadmanager_singletontype_provider);
qmlRegisterType<QGamepad>(uri, 1, 0, "Gamepad");
qmlRegisterType<QGamepadKeyNavigation>(uri, 1, 0, "GamepadKeyNavigation");
qmlRegisterType<QGamepadMouseItem>(uri, 1, 0, "GamepadMouseItem");
+
+ // Register the latest Qt version as QML type version
+ qmlRegisterModule(uri, 1, QT_VERSION_MINOR);
}
void initializeEngine(QQmlEngine *engine, const char *uri)