summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2016-05-04 16:38:45 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2016-05-17 09:19:08 +0000
commit3394ef1186f7ee30860f87dc6878da05a010b9eb (patch)
treeaa99df39f3c39a94125993253d87bff522614abf
parent113e78a4beccdf717d484279baab08be8d805201 (diff)
Improve QtScxml module conformity to other Qt modules
The other QML modules use a versioning based on the Qt modules version. In addition the QML plugin name is always libdeclarative_<module_name>.so. Therefore the target for the QML project has to be adjusted accordingly. Change-Id: I218836bc01a7cb4ab8d8c3edde1d3d6deeaffd75 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--examples/scxml/invoke-dynamic/invoke-dynamic.qml2
-rw-r--r--examples/scxml/mediaplayer-common/Mediaplayer.qml2
-rw-r--r--examples/scxml/trafficlight-qml-dynamic/trafficlight-qml-dynamic.qml2
-rw-r--r--src/imports/scxmlstatemachine/plugin.cpp7
-rw-r--r--src/imports/scxmlstatemachine/plugins.qmltypes4
-rw-r--r--src/imports/scxmlstatemachine/qmldir2
-rw-r--r--src/imports/scxmlstatemachine/scxmlstatemachine.pro2
-rw-r--r--src/imports/scxmlstatemachine/statemachineloader.cpp2
-rw-r--r--src/scxml/doc/qtscxml-index.qdoc2
-rw-r--r--src/scxml/doc/qtscxml-instantiating-state-machines.qdoc2
-rw-r--r--src/scxml/doc/qtscxml-module-qml.qdoc4
11 files changed, 18 insertions, 13 deletions
diff --git a/examples/scxml/invoke-dynamic/invoke-dynamic.qml b/examples/scxml/invoke-dynamic/invoke-dynamic.qml
index 105422d..616928e 100644
--- a/examples/scxml/invoke-dynamic/invoke-dynamic.qml
+++ b/examples/scxml/invoke-dynamic/invoke-dynamic.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtScxml 1.0 as Scxml
+import QtScxml 5.7 as Scxml
MainView {
stateMachine: directions.stateMachine
diff --git a/examples/scxml/mediaplayer-common/Mediaplayer.qml b/examples/scxml/mediaplayer-common/Mediaplayer.qml
index b3181a8..4d793fa 100644
--- a/examples/scxml/mediaplayer-common/Mediaplayer.qml
+++ b/examples/scxml/mediaplayer-common/Mediaplayer.qml
@@ -50,7 +50,7 @@
import QtQuick 2.5
import QtQuick.Window 2.2
-import QtScxml 1.0 as Scxml
+import QtScxml 5.7 as Scxml
Window {
id: root
diff --git a/examples/scxml/trafficlight-qml-dynamic/trafficlight-qml-dynamic.qml b/examples/scxml/trafficlight-qml-dynamic/trafficlight-qml-dynamic.qml
index a6997e3..772d2fb 100644
--- a/examples/scxml/trafficlight-qml-dynamic/trafficlight-qml-dynamic.qml
+++ b/examples/scxml/trafficlight-qml-dynamic/trafficlight-qml-dynamic.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtScxml 1.0 as Scxml
+import QtScxml 5.7 as Scxml
TrafficLight {
Scxml.StateMachineLoader {
diff --git a/src/imports/scxmlstatemachine/plugin.cpp b/src/imports/scxmlstatemachine/plugin.cpp
index 6a3a664..1837935 100644
--- a/src/imports/scxmlstatemachine/plugin.cpp
+++ b/src/imports/scxmlstatemachine/plugin.cpp
@@ -53,6 +53,11 @@ class QScxmlStateMachinePlugin : public QQmlExtensionPlugin
public:
void registerTypes(const char *uri)
{
+ // @uri QtScxml
+ Q_ASSERT(uri == QStringLiteral("QtScxml"));
+
+ int major = 5;
+ int minor = 7;
// Do not rely on RegisterMethodArgumentMetaType meta-call to register the QScxmlEvent type.
// This registration is required for the receiving end of the signal emission that carries
// parameters of this type to be able to treat them correctly as a gadget. This is because the
@@ -60,7 +65,7 @@ public:
// to do a meta-type registration.
static const int qScxmlEventMetaTypeId = qMetaTypeId<QScxmlEvent>();
Q_UNUSED(qScxmlEventMetaTypeId)
- qmlRegisterType<QScxmlStateMachineLoader>(uri, 1, 0, "StateMachineLoader");
+ qmlRegisterType<QScxmlStateMachineLoader>(uri, major, minor, "StateMachineLoader");
qmlProtectModule(uri, 1);
}
};
diff --git a/src/imports/scxmlstatemachine/plugins.qmltypes b/src/imports/scxmlstatemachine/plugins.qmltypes
index bc452d6..1366717 100644
--- a/src/imports/scxmlstatemachine/plugins.qmltypes
+++ b/src/imports/scxmlstatemachine/plugins.qmltypes
@@ -4,14 +4,14 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtScxml 1.0'
+// 'qmlplugindump -nonrelocatable QtScxml 5.7'
Module {
dependencies: ["QtQuick 2.0"]
Component {
name: "QScxmlStateMachineLoader"
prototype: "QObject"
- exports: ["QtScxml/StateMachineLoader 1.0"]
+ exports: ["QtScxml/StateMachineLoader 5.7"]
exportMetaObjectRevisions: [0]
Property { name: "filename"; type: "QUrl" }
Property { name: "stateMachine"; type: "QScxmlStateMachine"; isReadonly: true; isPointer: true }
diff --git a/src/imports/scxmlstatemachine/qmldir b/src/imports/scxmlstatemachine/qmldir
index e1fd0ee..e836ddd 100644
--- a/src/imports/scxmlstatemachine/qmldir
+++ b/src/imports/scxmlstatemachine/qmldir
@@ -1,5 +1,5 @@
module QtScxml
-plugin declarative_scxmlstatemachine
+plugin declarative_scxml
classname QScxmlStateMachinePlugin
typeinfo plugins.qmltypes
diff --git a/src/imports/scxmlstatemachine/scxmlstatemachine.pro b/src/imports/scxmlstatemachine/scxmlstatemachine.pro
index c178157..23497ac 100644
--- a/src/imports/scxmlstatemachine/scxmlstatemachine.pro
+++ b/src/imports/scxmlstatemachine/scxmlstatemachine.pro
@@ -1,5 +1,5 @@
+TARGET = scxml
TARGETPATH = QtScxml
-IMPORT_VERSION = 1.0
QT = scxml qml-private core-private
diff --git a/src/imports/scxmlstatemachine/statemachineloader.cpp b/src/imports/scxmlstatemachine/statemachineloader.cpp
index 1fc48bf..68bdae8 100644
--- a/src/imports/scxmlstatemachine/statemachineloader.cpp
+++ b/src/imports/scxmlstatemachine/statemachineloader.cpp
@@ -53,7 +53,7 @@
\brief Dynamically loads an SCXML file and instantiates the state machine.
- \since Scxml 1.0
+ \since QtScxml 5.7
*/
/*!
diff --git a/src/scxml/doc/qtscxml-index.qdoc b/src/scxml/doc/qtscxml-index.qdoc
index 4f2fd7b..1605d50 100644
--- a/src/scxml/doc/qtscxml-index.qdoc
+++ b/src/scxml/doc/qtscxml-index.qdoc
@@ -52,7 +52,7 @@
in your .qml file:
\code
- import QtScxml 1.0
+ import QtScxml 5.7
\endcode
To link against the module, add this line to your qmake .pro file:
diff --git a/src/scxml/doc/qtscxml-instantiating-state-machines.qdoc b/src/scxml/doc/qtscxml-instantiating-state-machines.qdoc
index 755e3ac..3b8d6aa 100644
--- a/src/scxml/doc/qtscxml-instantiating-state-machines.qdoc
+++ b/src/scxml/doc/qtscxml-instantiating-state-machines.qdoc
@@ -43,7 +43,7 @@
Or, in QML:
\qml
- import QtScxml 1.0
+ import QtScxml 5.7
Item {
property QtObject stateMachine: scxmlLoader.stateMachine
diff --git a/src/scxml/doc/qtscxml-module-qml.qdoc b/src/scxml/doc/qtscxml-module-qml.qdoc
index 5510c2c..ddcdf3e 100644
--- a/src/scxml/doc/qtscxml-module-qml.qdoc
+++ b/src/scxml/doc/qtscxml-module-qml.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \qmlmodule Scxml 1.0
+ \qmlmodule Scxml 5.7
\title Qt SCXML QML Types
\ingroup qmlmodules
\brief Enables the use of SCXML state machines with QML.
@@ -35,7 +35,7 @@
in your .qml file:
\code
- import QtScxml 1.0
+ import QtScxml 5.7
\endcode
For more information, see \l{Instantiating State Machines}.