diff options
author | Erik Verbruggen <erik.verbruggen@theqtcompany.com> | 2016-02-17 12:13:17 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-07-08 09:00:31 +0000 |
commit | 032847aa29bcf0526f9790173715c6afef8c9481 (patch) | |
tree | 45273fe8ac355d99ddb50e7a7d73512a24f71bb0 | |
parent | a9385bc9831119251db29dbe4613b640af8387fa (diff) |
Remove superclass of QScxmlEvent.
The QScxmlEvent doens't need to be a subclass of QEvent anymore.
Change-Id: I6b08cd59a9b21158e450f36534c1f76b9bb24b10
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r-- | src/scxml/qscxmlevent.cpp | 13 | ||||
-rw-r--r-- | src/scxml/qscxmlevent.h | 12 | ||||
-rw-r--r-- | src/scxml/qscxmlstatemachine.cpp | 3 |
3 files changed, 4 insertions, 24 deletions
diff --git a/src/scxml/qscxmlevent.cpp b/src/scxml/qscxmlevent.cpp index bf5de7a..f26aa97 100644 --- a/src/scxml/qscxmlevent.cpp +++ b/src/scxml/qscxmlevent.cpp @@ -48,9 +48,6 @@ QT_BEGIN_NAMESPACE using namespace QScxmlExecutableContent; -QEvent::Type QScxmlEvent::scxmlEventType = (QEvent::Type) QEvent::registerEventType(); -QEvent::Type QScxmlEvent::ignoreEventType = (QEvent::Type) QEvent::registerEventType(); - QAtomicInt QScxmlEventBuilder::idCounter = QAtomicInt(0); QScxmlEvent *QScxmlEventBuilder::buildEvent() @@ -267,7 +264,7 @@ void QScxmlEventBuilder::submitError(const QString &type, const QString &msg, co * Creates a new external SCXML event. */ QScxmlEvent::QScxmlEvent() - : QEvent(scxmlEventType), d(new QScxmlEventPrivate) + : d(new QScxmlEventPrivate) { } /*! @@ -308,7 +305,6 @@ void QScxmlEvent::clear() */ QScxmlEvent &QScxmlEvent::operator=(const QScxmlEvent &other) { - QEvent::operator=(other); *d = *other.d; return *this; } @@ -317,7 +313,7 @@ QScxmlEvent &QScxmlEvent::operator=(const QScxmlEvent &other) * Constructs a copy of \a other. */ QScxmlEvent::QScxmlEvent(const QScxmlEvent &other) - : QEvent(other), d(new QScxmlEventPrivate(*other.d)) + : d(new QScxmlEventPrivate(*other.d)) { } @@ -562,11 +558,6 @@ void QScxmlEvent::setErrorMessage(const QString &message) d->data = message; } -void QScxmlEvent::makeIgnorable() -{ - t = ignoreEventType; -} - QByteArray QScxmlEventPrivate::debugString(QScxmlEvent *event) { if (event == nullptr) { diff --git a/src/scxml/qscxmlevent.h b/src/scxml/qscxmlevent.h index 82efc57..c9f901d 100644 --- a/src/scxml/qscxmlevent.h +++ b/src/scxml/qscxmlevent.h @@ -42,7 +42,6 @@ #include <QtScxml/qscxmlglobals.h> -#include <QEvent> #include <QStringList> #include <QVariantList> @@ -54,7 +53,7 @@ class WrappedQStateMachine; class QScxmlEventPrivate; -class Q_SCXML_EXPORT QScxmlEvent: public QEvent +class Q_SCXML_EXPORT QScxmlEvent { Q_GADGET Q_PROPERTY(QString name READ name CONSTANT) @@ -110,15 +109,8 @@ public: QString errorMessage() const; void setErrorMessage(const QString &message); -protected: - friend class QScxmlInternal::WrappedQStateMachine; -#ifndef Q_QDOC - static QEvent::Type scxmlEventType; - static QEvent::Type ignoreEventType; - void makeIgnorable(); -#endif // Q_QDOC - private: + friend class QScxmlInternal::WrappedQStateMachine; QScxmlEventPrivate *d; }; diff --git a/src/scxml/qscxmlstatemachine.cpp b/src/scxml/qscxmlstatemachine.cpp index 31e620c..7aa64a2 100644 --- a/src/scxml/qscxmlstatemachine.cpp +++ b/src/scxml/qscxmlstatemachine.cpp @@ -518,9 +518,6 @@ void QScxmlStateMachinePrivate::returnDoneEvent(QScxmlExecutableContent::Contain bool QScxmlStateMachinePrivate::nameMatch(const StateTable::Array &patterns, QScxmlEvent *event) const { - if (event->type() == QEvent::None) - return false; - const QString eventName = event->name(); bool selected = false; for (int eventSelectorIter = 0; eventSelectorIter < patterns.size(); ++eventSelectorIter) { |