summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-04-11 21:34:44 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-04-11 21:34:44 +0200
commitefeb2a2895bfa2d83f5e7494149a7fa14789e1ee (patch)
tree0ac1249995fa364b034fe7255f330de5992c8646
parent011c9c90d5667588809618616637e2c910baeae8 (diff)
parent67d48807b44735a2385b88db7ada01f7cd7eacfd (diff)
Merge remote-tracking branch 'origin/5.11' into dev
-rw-r--r--dist/changes-5.10.126
-rw-r--r--src/scxml/Qt5ScxmlMacros.cmake1
-rw-r--r--src/scxml/doc/qtscxml.qdocconf2
-rw-r--r--src/scxml/qscxmlexecutablecontent.cpp18
-rw-r--r--src/scxml/qscxmlexecutablecontent_p.h2
-rw-r--r--src/scxml/qscxmlstatemachine.cpp45
-rw-r--r--src/scxml/qscxmlstatemachine.h140
7 files changed, 122 insertions, 112 deletions
diff --git a/dist/changes-5.10.1 b/dist/changes-5.10.1
new file mode 100644
index 0000000..695c4e3
--- /dev/null
+++ b/dist/changes-5.10.1
@@ -0,0 +1,26 @@
+Qt 5.10.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.10.0.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.10 series is binary compatible with the 5.9.x series.
+Applications compiled for 5.9 will continue to run with 5.10.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+This release contains all fixes included in the Qt 5.9.4 release.
+
+****************************************************************************
+* Qt 5.10.1 Changes *
+****************************************************************************
+
+ - This release contains only minor code improvements.
diff --git a/src/scxml/Qt5ScxmlMacros.cmake b/src/scxml/Qt5ScxmlMacros.cmake
index 234258c..c4454ec 100644
--- a/src/scxml/Qt5ScxmlMacros.cmake
+++ b/src/scxml/Qt5ScxmlMacros.cmake
@@ -63,5 +63,6 @@ function(qt5_add_statecharts outfiles)
VERBATIM)
list(APPEND ${outfiles} ${outfile_cpp})
endforeach()
+ set_source_files_properties(${outfiles} PROPERTIES SKIP_AUTOMOC TRUE)
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
endfunction()
diff --git a/src/scxml/doc/qtscxml.qdocconf b/src/scxml/doc/qtscxml.qdocconf
index 0e794d9..4902ae4 100644
--- a/src/scxml/doc/qtscxml.qdocconf
+++ b/src/scxml/doc/qtscxml.qdocconf
@@ -42,6 +42,8 @@ sourcedirs += .. \
../../../tools/qscxmlc/doc \
../../../examples/scxml
+excludefiles += "../qscxmlexecutablecontent_p.h"
+
tagfile = qtscxml.tags
manifestmeta.highlighted.names = "QtScxml/Qt SCXML Calculator QML Example" \
diff --git a/src/scxml/qscxmlexecutablecontent.cpp b/src/scxml/qscxmlexecutablecontent.cpp
index 26c8ab2..ea5f528 100644
--- a/src/scxml/qscxmlexecutablecontent.cpp
+++ b/src/scxml/qscxmlexecutablecontent.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtScxml module of the Qt Toolkit.
@@ -83,6 +83,22 @@ using namespace QScxmlExecutableContent;
*/
/*!
+ \enum QScxmlExecutableContent::anonymous
+ \since 5.8
+
+ This enum type holds the invalid values for type definitions.
+
+ \value NoContainer
+ \l ContainerId is unknown.
+ \value NoEvaluator
+ \l EvaluatorId is unknown.
+ \value NoInstruction
+ \l InstructionId is unknown.
+ \value NoString
+ \l StringId is unknown.
+*/
+
+/*!
\class QScxmlExecutableContent::EvaluatorInfo
\brief The EvaluatorInfo class represents a unit of executable content.
\since 5.8
diff --git a/src/scxml/qscxmlexecutablecontent_p.h b/src/scxml/qscxmlexecutablecontent_p.h
index 707e8cd..5980330 100644
--- a/src/scxml/qscxmlexecutablecontent_p.h
+++ b/src/scxml/qscxmlexecutablecontent_p.h
@@ -61,7 +61,6 @@
#include <QtScxml/qscxmlstatemachine.h>
#endif // BUILD_QSCXMLC
-#ifndef Q_QDOC
QT_BEGIN_NAMESPACE
namespace QScxmlExecutableContent {
@@ -510,6 +509,5 @@ private:
};
QT_END_NAMESPACE
-#endif // Q_QDOC
#endif // QSCXMLEXECUTABLECONTENT_P_H
diff --git a/src/scxml/qscxmlstatemachine.cpp b/src/scxml/qscxmlstatemachine.cpp
index c1d9a68..b7431ba 100644
--- a/src/scxml/qscxmlstatemachine.cpp
+++ b/src/scxml/qscxmlstatemachine.cpp
@@ -94,8 +94,9 @@ Q_LOGGING_CATEGORY(scxmlLog, "scxml.statemachine")
*/
/*!
- \fn QScxmlStateMachine::connectToEvent(const QString &scxmlEventSpec,
- const QObject *receiver,
+ \fn template<typename PointerToMemberFunction> QMetaObject::Connection QScxmlStateMachine::connectToEvent(
+ const QString &scxmlEventSpec,
+ const typename QtPrivate::FunctionPointer<PointerToMemberFunction>::Object *receiver,
PointerToMemberFunction method,
Qt::ConnectionType type)
@@ -113,7 +114,8 @@ Q_LOGGING_CATEGORY(scxmlLog, "scxml.statemachine")
*/
/*!
- \fn QScxmlStateMachine::connectToEvent(const QString &scxmlEventSpec,
+ \fn template<typename Functor> typename QtPrivate::QEnableIf<!QtPrivate::FunctionPointer<Functor>::IsPointerToMemberFunction && !std::is_same<const char*, Functor>::value, QMetaObject::Connection>::Type QScxmlStateMachine::connectToEvent(
+ const QString &scxmlEventSpec,
Functor functor,
Qt::ConnectionType type)
@@ -131,7 +133,8 @@ Q_LOGGING_CATEGORY(scxmlLog, "scxml.statemachine")
*/
/*!
- \fn QScxmlStateMachine::connectToEvent(const QString &scxmlEventSpec,
+ \fn template<typename Functor> typename QtPrivate::QEnableIf<!QtPrivate::FunctionPointer<Functor>::IsPointerToMemberFunction && !std::is_same<const char*, Functor>::value, QMetaObject::Connection>::Type QScxmlStateMachine::connectToEvent(
+ const QString &scxmlEventSpec,
const QObject *context,
Functor functor,
Qt::ConnectionType type)
@@ -150,8 +153,9 @@ Q_LOGGING_CATEGORY(scxmlLog, "scxml.statemachine")
*/
/*!
- \fn QScxmlStateMachine::connectToState(const QString &scxmlStateName,
- const QObject *receiver,
+ \fn template<typename PointerToMemberFunction> QMetaObject::Connection QScxmlStateMachine::connectToState(
+ const QString &scxmlStateName,
+ const typename QtPrivate::FunctionPointer<PointerToMemberFunction>::Object *receiver,
PointerToMemberFunction method,
Qt::ConnectionType type)
@@ -164,9 +168,9 @@ Q_LOGGING_CATEGORY(scxmlLog, "scxml.statemachine")
Returns a handle to the connection, which can be used later to disconnect.
*/
-
/*!
- \fn QScxmlStateMachine::connectToState(const QString &scxmlStateName,
+ \fn template<typename Functor> typename QtPrivate::QEnableIf<!QtPrivate::FunctionPointer<Functor>::IsPointerToMemberFunction && !std::is_same<const char*, Functor>::value, QMetaObject::Connection>::Type QScxmlStateMachine::connectToState(
+ const QString &scxmlStateName,
Functor functor,
Qt::ConnectionType type)
@@ -180,7 +184,8 @@ Q_LOGGING_CATEGORY(scxmlLog, "scxml.statemachine")
*/
/*!
- \fn QScxmlStateMachine::connectToState(const QString &scxmlStateName,
+ \fn template<typename Functor> typename QtPrivate::QEnableIf<!QtPrivate::FunctionPointer<Functor>::IsPointerToMemberFunction && !std::is_same<const char*, Functor>::value, QMetaObject::Connection>::Type QScxmlStateMachine::connectToState(
+ const QString &scxmlStateName,
const QObject *context,
Functor functor,
Qt::ConnectionType type)
@@ -195,8 +200,8 @@ Q_LOGGING_CATEGORY(scxmlLog, "scxml.statemachine")
*/
/*!
- \fn QScxmlStateMachine::onEntry(const QObject *receiver,
- const char *method)
+ \fn std::function<void(bool)> QScxmlStateMachine::onEntry(
+ const QObject *receiver, const char *method)
Returns a functor that accepts a boolean argument and calls the given
\a method on \a receiver using QMetaObject::invokeMethod() if that argument
@@ -210,7 +215,8 @@ Q_LOGGING_CATEGORY(scxmlLog, "scxml.statemachine")
*/
/*!
- \fn QScxmlStateMachine::onExit(const QObject *receiver, const char *method)
+ \fn std::function<void(bool)> QScxmlStateMachine::onExit(
+ const QObject *receiver, const char *method)
Returns a functor that accepts a boolean argument and calls the given
\a method on \a receiver using QMetaObject::invokeMethod() if that argument
@@ -224,7 +230,8 @@ Q_LOGGING_CATEGORY(scxmlLog, "scxml.statemachine")
*/
/*!
- \fn QScxmlStateMachine::onEntry(Functor functor)
+ \fn template<typename Functor> std::function<void(bool)> QScxmlStateMachine::onEntry(
+ Functor functor)
Returns a functor that accepts a boolean argument and calls the given
\a functor if that argument is \c true. The given \a functor must not
@@ -235,7 +242,7 @@ Q_LOGGING_CATEGORY(scxmlLog, "scxml.statemachine")
*/
/*!
- \fn QScxmlStateMachine::onExit(Functor functor)
+ \fn template<typename Functor> std::function<void(bool)> QScxmlStateMachine::onExit(Functor functor)
Returns a functor that accepts a boolean argument and calls the given
\a functor if that argument is \c false. The given \a functor must not
@@ -246,8 +253,9 @@ Q_LOGGING_CATEGORY(scxmlLog, "scxml.statemachine")
*/
/*!
- \fn QScxmlStateMachine::onEntry(const QObject *receiver,
- PointerToMemberFunction method)
+ \fn template<typename PointerToMemberFunction> std::function<void(bool)> QScxmlStateMachine::onEntry(
+ const typename QtPrivate::FunctionPointer<PointerToMemberFunction>::Object *receiver,
+ PointerToMemberFunction method)
Returns a functor that accepts a boolean argument and calls the given
\a method on \a receiver if that argument is \c true and the \a receiver
@@ -259,8 +267,9 @@ Q_LOGGING_CATEGORY(scxmlLog, "scxml.statemachine")
*/
/*!
- \fn QScxmlStateMachine::onExit(const QObject *receiver,
- PointerToMemberFunction method)
+ \fn template<typename PointerToMemberFunction> std::function<void(bool)> QScxmlStateMachine::onExit(
+ const typename QtPrivate::FunctionPointer<PointerToMemberFunction>::Object *receiver,
+ PointerToMemberFunction method)
Returns a functor that accepts a boolean argument and calls the given
\a method on \a receiver if that argument is \c false and the \a receiver
diff --git a/src/scxml/qscxmlstatemachine.h b/src/scxml/qscxmlstatemachine.h
index 2017444..090a1b6 100644
--- a/src/scxml/qscxmlstatemachine.h
+++ b/src/scxml/qscxmlstatemachine.h
@@ -69,7 +69,7 @@ class Q_SCXML_EXPORT QScxmlStateMachine: public QObject
Q_PROPERTY(bool initialized READ isInitialized NOTIFY initializedChanged)
Q_PROPERTY(QScxmlDataModel *dataModel READ dataModel WRITE setDataModel NOTIFY dataModelChanged)
Q_PROPERTY(QVariantMap initialValues READ initialValues WRITE setInitialValues NOTIFY initialValuesChanged)
- Q_PROPERTY(QVector<QScxmlInvokableService *> invokedServices READ invokedServices NOTIFY invokedServicesChanged)
+ Q_PROPERTY(QVector<QScxmlInvokableService*> invokedServices READ invokedServices NOTIFY invokedServicesChanged)
Q_PROPERTY(QString sessionId READ sessionId CONSTANT)
Q_PROPERTY(QString name READ name CONSTANT)
Q_PROPERTY(bool invoked READ isInvoked CONSTANT)
@@ -111,79 +111,49 @@ public:
QMetaObject::Connection connectToState(const QString &scxmlStateName,
const QObject *receiver, const char *method,
Qt::ConnectionType type = Qt::AutoConnection);
-#ifdef Q_QDOC
- template<typename PointerToMemberFunction>
- QMetaObject::Connection connectToState(const QString &scxmlStateName,
- const QObject *receiver, PointerToMemberFunction method,
- Qt::ConnectionType type = Qt::AutoConnection);
- template<typename Functor>
- QMetaObject::Connection connectToState(const QString &scxmlStateName, Functor functor,
- Qt::ConnectionType type = Qt::AutoConnection);
- template<typename Functor>
- QMetaObject::Connection connectToState(const QString &scxmlStateName,
- const QObject *context, Functor functor,
- Qt::ConnectionType type = Qt::AutoConnection);
-#else
// connect state to a QObject slot
- template <typename Func1>
+ template <typename PointerToMemberFunction>
inline QMetaObject::Connection connectToState(
const QString &scxmlStateName,
- const typename QtPrivate::FunctionPointer<Func1>::Object *receiver, Func1 slot,
+ const typename QtPrivate::FunctionPointer<PointerToMemberFunction>::Object *receiver,
+ PointerToMemberFunction method,
Qt::ConnectionType type = Qt::AutoConnection)
{
- typedef QtPrivate::FunctionPointer<Func1> SlotType;
+ typedef QtPrivate::FunctionPointer<PointerToMemberFunction> SlotType;
return connectToStateImpl(
scxmlStateName, receiver, nullptr,
- new QtPrivate::QSlotObject<Func1, typename SlotType::Arguments, void>(slot),
+ new QtPrivate::QSlotObject<PointerToMemberFunction,
+ typename SlotType::Arguments, void>(method),
type);
}
// connect state to a functor or function pointer (without context)
- template <typename Func1>
+ template <typename Functor>
inline typename QtPrivate::QEnableIf<
- !QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction &&
- !std::is_same<const char*, Func1>::value, QMetaObject::Connection>::Type
- connectToState(const QString &scxmlStateName, Func1 slot,
+ !QtPrivate::FunctionPointer<Functor>::IsPointerToMemberFunction &&
+ !std::is_same<const char*, Functor>::value, QMetaObject::Connection>::Type
+ connectToState(const QString &scxmlStateName, Functor functor,
Qt::ConnectionType type = Qt::AutoConnection)
{
// Use this as context
- return connectToState(scxmlStateName, this, slot, type);
+ return connectToState(scxmlStateName, this, functor, type);
}
// connectToState to a functor or function pointer (with context)
- template <typename Func1>
+ template <typename Functor>
inline typename QtPrivate::QEnableIf<
- !QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction &&
- !std::is_same<const char*, Func1>::value, QMetaObject::Connection>::Type
- connectToState(const QString &scxmlStateName, QObject *context, Func1 slot,
+ !QtPrivate::FunctionPointer<Functor>::IsPointerToMemberFunction &&
+ !std::is_same<const char*, Functor>::value, QMetaObject::Connection>::Type
+ connectToState(const QString &scxmlStateName, const QObject *context, Functor functor,
Qt::ConnectionType type = Qt::AutoConnection)
{
- QtPrivate::QSlotObjectBase *slotObj = new QtPrivate::QFunctorSlotObject<Func1, 1,
- QtPrivate::List<bool>, void>(slot);
- return connectToStateImpl(scxmlStateName, context, reinterpret_cast<void **>(&slot),
+ QtPrivate::QSlotObjectBase *slotObj = new QtPrivate::QFunctorSlotObject<Functor, 1,
+ QtPrivate::List<bool>, void>(functor);
+ return connectToStateImpl(scxmlStateName, context, reinterpret_cast<void **>(&functor),
slotObj, type);
}
-#endif
-
-#ifdef Q_QDOC
- static std::function<void(bool)> onEntry(const QObject *receiver, const char *method);
- static std::function<void(bool)> onExit(const QObject *receiver, const char *method);
-
- template<typename Functor>
- static std::function<void(bool)> onEntry(Functor functor);
-
- template<typename Functor>
- static std::function<void(bool)> onExit(Functor functor);
-
- template<typename PointerToMemberFunction>
- static std::function<void(bool)> onEntry(const QObject *receiver,
- PointerToMemberFunction method);
- template<typename PointerToMemberFunction>
- static std::function<void(bool)> onExit(const QObject *receiver,
- PointerToMemberFunction method);
-#else
static std::function<void(bool)> onEntry(const QObject *receiver, const char *method)
{
const QPointer<QObject> receiverPointer(const_cast<QObject *>(receiver));
@@ -220,89 +190,77 @@ public:
};
}
- template<typename Func1>
+ template<typename PointerToMemberFunction>
static std::function<void(bool)> onEntry(
- const typename QtPrivate::FunctionPointer<Func1>::Object *receiver, Func1 slot)
+ const typename QtPrivate::FunctionPointer<PointerToMemberFunction>::Object *receiver,
+ PointerToMemberFunction method)
{
- typedef typename QtPrivate::FunctionPointer<Func1>::Object Object;
+ typedef typename QtPrivate::FunctionPointer<PointerToMemberFunction>::Object Object;
const QPointer<Object> receiverPointer(const_cast<Object *>(receiver));
- return [receiverPointer, slot](bool isEnteringState) {
+ return [receiverPointer, method](bool isEnteringState) {
if (isEnteringState && !receiverPointer.isNull())
- (receiverPointer->*slot)();
+ (receiverPointer->*method)();
};
}
- template<typename Func1>
+ template<typename PointerToMemberFunction>
static std::function<void(bool)> onExit(
- const typename QtPrivate::FunctionPointer<Func1>::Object *receiver, Func1 slot)
+ const typename QtPrivate::FunctionPointer<PointerToMemberFunction>::Object *receiver,
+ PointerToMemberFunction method)
{
- typedef typename QtPrivate::FunctionPointer<Func1>::Object Object;
+ typedef typename QtPrivate::FunctionPointer<PointerToMemberFunction>::Object Object;
const QPointer<Object> receiverPointer(const_cast<Object *>(receiver));
- return [receiverPointer, slot](bool isEnteringState) {
+ return [receiverPointer, method](bool isEnteringState) {
if (!isEnteringState && !receiverPointer.isNull())
- (receiverPointer->*slot)();
+ (receiverPointer->*method)();
};
}
-#endif // !Q_QDOC
QMetaObject::Connection connectToEvent(const QString &scxmlEventSpec,
const QObject *receiver, const char *method,
Qt::ConnectionType type = Qt::AutoConnection);
-#ifdef Q_QDOC
- template<typename PointerToMemberFunction>
- QMetaObject::Connection connectToEvent(const QString &scxmlEventSpec,
- const QObject *receiver, PointerToMemberFunction method,
- Qt::ConnectionType type = Qt::AutoConnection);
- template<typename Functor>
- QMetaObject::Connection connectToEvent(const QString &scxmlEventSpec, Functor functor,
- Qt::ConnectionType type = Qt::AutoConnection);
- template<typename Functor>
- QMetaObject::Connection connectToEvent(const QString &scxmlEventSpec,
- const QObject *context, Functor functor,
- Qt::ConnectionType type = Qt::AutoConnection);
-#else
-
// connect state to a QObject slot
- template <typename Func1>
+ template <typename PointerToMemberFunction>
inline QMetaObject::Connection connectToEvent(
const QString &scxmlEventSpec,
- const typename QtPrivate::FunctionPointer<Func1>::Object *receiver, Func1 slot,
+ const typename QtPrivate::FunctionPointer<PointerToMemberFunction>::Object *receiver,
+ PointerToMemberFunction method,
Qt::ConnectionType type = Qt::AutoConnection)
{
- typedef QtPrivate::FunctionPointer<Func1> SlotType;
+ typedef QtPrivate::FunctionPointer<PointerToMemberFunction> SlotType;
return connectToEventImpl(
scxmlEventSpec, receiver, nullptr,
- new QtPrivate::QSlotObject<Func1, typename SlotType::Arguments, void>(slot),
+ new QtPrivate::QSlotObject<PointerToMemberFunction,
+ typename SlotType::Arguments, void>(method),
type);
}
// connect state to a functor or function pointer (without context)
- template <typename Func1>
+ template <typename Functor>
inline typename QtPrivate::QEnableIf<
- !QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction &&
- !std::is_same<const char*, Func1>::value, QMetaObject::Connection>::Type
- connectToEvent(const QString &scxmlEventSpec, Func1 slot,
+ !QtPrivate::FunctionPointer<Functor>::IsPointerToMemberFunction &&
+ !std::is_same<const char*, Functor>::value, QMetaObject::Connection>::Type
+ connectToEvent(const QString &scxmlEventSpec, Functor functor,
Qt::ConnectionType type = Qt::AutoConnection)
{
// Use this as context
- return connectToEvent(scxmlEventSpec, this, slot, type);
+ return connectToEvent(scxmlEventSpec, this, functor, type);
}
// connectToEvent to a functor or function pointer (with context)
- template <typename Func1>
+ template <typename Functor>
inline typename QtPrivate::QEnableIf<
- !QtPrivate::FunctionPointer<Func1>::IsPointerToMemberFunction &&
- !std::is_same<const char*, Func1>::value, QMetaObject::Connection>::Type
- connectToEvent(const QString &scxmlEventSpec, QObject *context, Func1 slot,
+ !QtPrivate::FunctionPointer<Functor>::IsPointerToMemberFunction &&
+ !std::is_same<const char*, Functor>::value, QMetaObject::Connection>::Type
+ connectToEvent(const QString &scxmlEventSpec, const QObject *context, Functor functor,
Qt::ConnectionType type = Qt::AutoConnection)
{
- QtPrivate::QSlotObjectBase *slotObj = new QtPrivate::QFunctorSlotObject<Func1, 1,
- QtPrivate::List<QScxmlEvent>, void>(slot);
- return connectToEventImpl(scxmlEventSpec, context, reinterpret_cast<void **>(&slot),
+ QtPrivate::QSlotObjectBase *slotObj = new QtPrivate::QFunctorSlotObject<Functor, 1,
+ QtPrivate::List<QScxmlEvent>, void>(functor);
+ return connectToEventImpl(scxmlEventSpec, context, reinterpret_cast<void **>(&functor),
slotObj, type);
}
-#endif
Q_INVOKABLE void submitEvent(QScxmlEvent *event);
Q_INVOKABLE void submitEvent(const QString &eventName);