diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2018-08-31 09:53:51 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@qt.io> | 2018-09-13 07:26:39 +0000 |
commit | 7da78510f828a02c7a9be70c9f3a37da53521554 (patch) | |
tree | 8eecb82dc993dde98bd1744b06bd6f9a2e3313dc | |
parent | 03b5dd34e0f4277be1c1210b1db7e523569bf4cd (diff) |
Update QML registrations and plugin.typesv5.12.0-beta4v5.12.0-beta3v5.12.0-beta2v5.12.0-beta1
As a matter of Qt convention, the minor version of the QML API
matches the general Qt minor version. Starting with Qt 6 the major version
should match too.
Task-number: QTBUG-70264
Change-Id: I57ab6af5b8bdc7aeba9972f9611d00071cc460d8
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
-rw-r--r-- | src/imports/gamepad/gamepad.pro | 2 | ||||
-rw-r--r-- | src/imports/gamepad/plugins.qmltypes | 9 | ||||
-rw-r--r-- | src/imports/gamepad/qtgamepad.cpp | 5 |
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) |