diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-08-09 11:15:59 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-08-18 14:00:49 +0000 |
commit | 0933e6d71310178667cce1a60ac65c23a956eb34 (patch) | |
tree | 4fd7bb83bbe7ddd499c266387e13a169d57e16ba /tools | |
parent | 52057e503c6bde4c5c196572a1ec55bdd93d61e6 (diff) |
In Qt mode reject documents with events that cannot be mapped to slots
This severely limits the use of Qt mode, as hierarchical events like
done.state.foo cannot appear in the document anymore. However, it makes
the rules about what is and what is not legal in Qt mode more
consistent.
Task-number: QTBUG-53435
Change-Id: I08b90f34c651a57d86607eea2a38f5bd1f73b8b3
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qscxmlc/scxmlcppdumper.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tools/qscxmlc/scxmlcppdumper.cpp b/tools/qscxmlc/scxmlcppdumper.cpp index 6266b8d..d13b18e 100644 --- a/tools/qscxmlc/scxmlcppdumper.cpp +++ b/tools/qscxmlc/scxmlcppdumper.cpp @@ -764,9 +764,6 @@ QString CppDumper::generateSlotDecls(const GeneratedTableData::MetaDataInfo &inf QString decls; foreach (const QString &eventName, info.incomingEvents) { - if (!DocumentModel::isEventToBeGenerated(eventName)) - continue; - decls += QStringLiteral(" void %1(const QVariant &data = QVariant());\n") .arg(mangleIdentifier(eventName)); } @@ -780,9 +777,6 @@ QString CppDumper::generateSlotDefs(const QString &className, QString defs; foreach (const QString &eventName, info.incomingEvents) { - if (!DocumentModel::isEventToBeGenerated(eventName)) - continue; - const auto mangledName = mangleIdentifier(eventName); defs += QStringLiteral("void %1::%2(const QVariant &data)\n").arg(className, mangledName); defs += QStringLiteral("{ submitEvent(QStringLiteral(\"%1\"), data); }\n\n").arg(eventName); @@ -893,9 +887,6 @@ QString CppDumper::generateMetaObject(const QString &className, // event slots: foreach (const QString &eventName, info.incomingEvents) { - if (!DocumentModel::isEventToBeGenerated(eventName)) - continue; - FunctionDef slot; slot.type.name = "void"; slot.type.rawName = slot.type.name; @@ -916,9 +907,6 @@ QString CppDumper::generateMetaObject(const QString &className, } foreach (const QString &eventName, info.incomingEvents) { - if (!DocumentModel::isEventToBeGenerated(eventName)) - continue; - FunctionDef slot; slot.type.name = "void"; slot.type.rawName = slot.type.name; |