Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qt6-scxml for openSUSE:Factory checked in at 2025-10-13 17:23:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-scxml (Old) and /work/SRC/openSUSE:Factory/.qt6-scxml.new.18484 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-scxml" Mon Oct 13 17:23:45 2025 rev:36 rq:1310362 version:6.10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-scxml/qt6-scxml.changes 2025-08-29 18:35:49.879668472 +0200 +++ /work/SRC/openSUSE:Factory/.qt6-scxml.new.18484/qt6-scxml.changes 2025-10-13 17:26:51.614101070 +0200 @@ -1,0 +2,6 @@ +Tue Oct 7 08:53:28 UTC 2025 - Christophe Marin <[email protected]> + +- Update to 6.10.0 + * https://www.qt.io/blog/qt-6.10-released + +------------------------------------------------------------------- Old: ---- qtscxml-everywhere-src-6.9.2.tar.xz New: ---- qtscxml-everywhere-src-6.10.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-scxml.spec ++++++ --- /var/tmp/diff_new_pack.5qfWrz/_old 2025-10-13 17:26:53.954198924 +0200 +++ /var/tmp/diff_new_pack.5qfWrz/_new 2025-10-13 17:26:53.970199594 +0200 @@ -16,8 +16,8 @@ # -%define real_version 6.9.2 -%define short_version 6.9 +%define real_version 6.10.0 +%define short_version 6.10 %define short_name qtscxml %define tar_name qtscxml-everywhere-src %define tar_suffix %{nil} @@ -31,10 +31,10 @@ %global __requires_exclude qt6qmlimport\\((Calculator|InvokeExample|Mediaplayer|TrafficLightApplication)\\) # Name: qt6-scxml%{?pkg_suffix} -Version: 6.9.2 +Version: 6.10.0 Release: 0 Summary: SCXML (state machine notation) compiler and related tools -License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) +License: GPL-2.0-only OR GPL-3.0-or-later OR LGPL-3.0-only URL: https://www.qt.io Source0: https://download.qt.io/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz Source99: qt6-scxml-rpmlintrc @@ -217,7 +217,7 @@ %{_qt6_includedir}/QtScxmlGlobal/ %{_qt6_libdir}/libQt6Scxml.prl %{_qt6_libdir}/libQt6Scxml.so -%{_qt6_metatypesdir}/qt6scxml_*_metatypes.json +%{_qt6_metatypesdir}/qt6scxml_metatypes.json %{_qt6_mkspecsdir}/features/qscxmlc.prf %{_qt6_mkspecsdir}/modules/qt_lib_scxml.pri %{_qt6_mkspecsdir}/modules/qt_lib_scxmlglobal_private.pri @@ -238,7 +238,7 @@ %{_qt6_includedir}/QtScxmlQml/ %{_qt6_libdir}/libQt6ScxmlQml.prl %{_qt6_libdir}/libQt6ScxmlQml.so -%{_qt6_metatypesdir}/qt6scxmlqml_*_metatypes.json +%{_qt6_metatypesdir}/qt6scxmlqml_metatypes.json %{_qt6_mkspecsdir}/modules/qt_lib_scxmlqml.pri %{_qt6_pkgconfigdir}/Qt6ScxmlQml.pc %exclude %{_qt6_includedir}/QtScxmlQml/%{real_version} @@ -257,7 +257,7 @@ %{_qt6_includedir}/QtStateMachine/ %{_qt6_libdir}/libQt6StateMachine.prl %{_qt6_libdir}/libQt6StateMachine.so -%{_qt6_metatypesdir}/qt6statemachine_*_metatypes.json +%{_qt6_metatypesdir}/qt6statemachine_metatypes.json %{_qt6_mkspecsdir}/modules/qt_lib_statemachine.pri %{_qt6_pkgconfigdir}/Qt6StateMachine.pc %exclude %{_qt6_includedir}/QtStateMachine/%{real_version} @@ -276,7 +276,7 @@ %{_qt6_includedir}/QtStateMachineQml/ %{_qt6_libdir}/libQt6StateMachineQml.prl %{_qt6_libdir}/libQt6StateMachineQml.so -%{_qt6_metatypesdir}/qt6statemachineqml_*_metatypes.json +%{_qt6_metatypesdir}/qt6statemachineqml_metatypes.json %{_qt6_mkspecsdir}/modules/qt_lib_statemachineqml.pri %{_qt6_pkgconfigdir}/Qt6StateMachineQml.pc %exclude %{_qt6_includedir}/QtStateMachineQml/%{real_version} ++++++ qtscxml-everywhere-src-6.9.2.tar.xz -> qtscxml-everywhere-src-6.10.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/.cmake.conf new/qtscxml-everywhere-src-6.10.0/.cmake.conf --- old/qtscxml-everywhere-src-6.9.2/.cmake.conf 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/.cmake.conf 2025-10-02 00:59:41.000000000 +0200 @@ -1,4 +1,4 @@ -set(QT_REPO_MODULE_VERSION "6.9.2") +set(QT_REPO_MODULE_VERSION "6.10.0") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1") list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/.tag new/qtscxml-everywhere-src-6.10.0/.tag --- old/qtscxml-everywhere-src-6.9.2/.tag 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/.tag 2025-10-02 00:59:41.000000000 +0200 @@ -1 +1 @@ -dc7bdbd8a767e1c6cd5b1ae8ef6a15c4c37b2a2a +4d8a8fa98dba2370c424c8a16282e812bef27dbc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/dependencies.yaml new/qtscxml-everywhere-src-6.10.0/dependencies.yaml --- old/qtscxml-everywhere-src-6.9.2/dependencies.yaml 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/dependencies.yaml 2025-10-02 00:59:41.000000000 +0200 @@ -1,7 +1,7 @@ dependencies: ../qtbase: - ref: 6f0d27d2e4ba5fa6562f738aaaf8eaf98ebf51e7 + ref: 5a8637e4516bc48a0b3f4b5ec3b18618b92e7222 required: true ../qtdeclarative: - ref: b653aebb2175203d86199b1d320fd10f939df3fc + ref: 7e0ab1d98c159c9f4c9afab78b43e7c70f449e41 required: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/src/scxml/doc/qtscxml.qdocconf new/qtscxml-everywhere-src-6.10.0/src/scxml/doc/qtscxml.qdocconf --- old/qtscxml-everywhere-src-6.9.2/src/scxml/doc/qtscxml.qdocconf 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/src/scxml/doc/qtscxml.qdocconf 2025-10-02 00:59:41.000000000 +0200 @@ -9,6 +9,9 @@ examplesinstallpath = scxml exampledirs = ../../../examples/scxml . +# Path to the root of qtscxml (for automatic linking to source code) +url.sources.rootdir = ../../.. + examples.fileextensions += "*.scxml" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/src/statemachine/doc/qtstatemachine-index.qdoc new/qtscxml-everywhere-src-6.10.0/src/statemachine/doc/qtstatemachine-index.qdoc --- old/qtscxml-everywhere-src-6.9.2/src/statemachine/doc/qtstatemachine-index.qdoc 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/src/statemachine/doc/qtstatemachine-index.qdoc 2025-10-02 00:59:41.000000000 +0200 @@ -63,6 +63,6 @@ Furthermore, Qt State Machine in Qt \QtVersion may contain third party modules under following permissive licenses: - \generatelist{groupsbymodule attributions-qtstatemachine} + \annotatedlist attributions-qtstatemachine */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/src/statemachine/doc/qtstatemachine.qdocconf new/qtscxml-everywhere-src-6.10.0/src/statemachine/doc/qtstatemachine.qdocconf --- old/qtscxml-everywhere-src-6.9.2/src/statemachine/doc/qtstatemachine.qdocconf 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/src/statemachine/doc/qtstatemachine.qdocconf 2025-10-02 00:59:41.000000000 +0200 @@ -12,6 +12,9 @@ exampledirs = ../../../examples/statemachine \ snippets +# Path to the root of qtscxml (for automatic linking to source code) +url.sources.rootdir = ../../.. + qhp.projects = QtStateMachine qhp.QtStateMachine.file = qtstatemachine.qhp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/src/statemachine/qstatemachine.cpp new/qtscxml-everywhere-src-6.10.0/src/statemachine/qstatemachine.cpp --- old/qtscxml-everywhere-src-6.9.2/src/statemachine/qstatemachine.cpp 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/src/statemachine/qstatemachine.cpp 2025-10-02 00:59:41.000000000 +0200 @@ -1232,9 +1232,19 @@ return false; } return true; - } - else + } else { + // we don't treat the machine as compound if it's a sub-state of this machine + // see isCompound() implementation + // but that machine still can be in a final state (Finished) + QState *grp = toStandardState(s); + if (QStatePrivate::get(grp)->isMachine && (grp != rootState())) { + QStateMachine *stateMachine = static_cast<QStateMachine*>(grp); + if (stateMachine->d_func()->stopProcessingReason == Finished) { + return true; + } + } return false; + } } #ifndef QT_NO_PROPERTIES diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/tests/auto/qstatemachine/qstatemachine/tst_qstatemachine.cpp new/qtscxml-everywhere-src-6.10.0/tests/auto/qstatemachine/qstatemachine/tst_qstatemachine.cpp --- old/qtscxml-everywhere-src-6.9.2/tests/auto/qstatemachine/qstatemachine/tst_qstatemachine.cpp 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/tests/auto/qstatemachine/qstatemachine/tst_qstatemachine.cpp 2025-10-02 00:59:41.000000000 +0200 @@ -246,6 +246,7 @@ void postDelayedEventWithChronoAndStop(); void postDelayedEventWithChronoFromThread(); void bindings(); + void severalStateMachinesInParallelState(); }; class TestState : public QState @@ -7059,5 +7060,50 @@ } } +static QStateMachine *createChild(QState *parent) +{ + QStateMachine *fsm = new QStateMachine(parent); + QState *s1 = new QState(); + QFinalState *s2 = new QFinalState(); + fsm->addState(s1); + fsm->addState(s2); + fsm->setInitialState(s1); + s1->addTransition(s2); + return fsm; +} + +void tst_QStateMachine::severalStateMachinesInParallelState() +{ + QStateMachine machine; + QState *s1 = new QState(QState::ParallelStates); + QFinalState *s2 = new QFinalState(); + + machine.addState(s1); + machine.addState(s2); + machine.setInitialState(s1); + s1->addTransition(s1, &QState::finished, s2); + + QStateMachine *child1 = createChild(s1); + QStateMachine *child2 = createChild(s1); + + QSignalSpy finishedSpy(&machine, &QStateMachine::finished); + QSignalSpy child1Spy(child1, &QStateMachine::finished); + QSignalSpy child2Spy(child2, &QStateMachine::stopped); + QSignalSpy runningSpy(&machine, &QStateMachine::runningChanged); + + QVERIFY(child1Spy.isValid()); + QVERIFY(child2Spy.isValid()); + QVERIFY(finishedSpy.isValid()); + QVERIFY(runningSpy.isValid()); + + machine.start(); + + QTRY_COMPARE(finishedSpy.size(), 1); + TEST_RUNNING_CHANGED_STARTED_STOPPED; + QTRY_COMPARE(child1Spy.size(), 1); + QTRY_COMPARE(child2Spy.size(), 1); + +} + QTEST_MAIN(tst_QStateMachine) #include "tst_qstatemachine.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/generator.cpp new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/generator.cpp --- old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/generator.cpp 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/generator.cpp 2025-10-02 00:59:41.000000000 +0200 @@ -51,13 +51,30 @@ } // -- QtScxml -uint nameToBuiltinType(const QByteArray &name) +static int nameToBuiltinType(const QByteArray &name) { if (name.isEmpty()) return 0; - uint tp = qMetaTypeTypeInternal(name.constData()); - return tp < uint(QMetaType::User) ? tp : uint(QMetaType::UnknownType); + uint tp = QMetaType::UnknownType; + if (const QtPrivate::QMetaTypeInterface *iface = QMetaType::fromName(name).iface()) + tp = iface->typeId.loadRelaxed(); // always registered + +#ifndef QT_BOOTSTRAPPED + if (tp >= uint(QMetaType::User)) + tp = QMetaType::UnknownType; +#endif + + return int(tp); +} + +/* + Returns \c true if the type is a built-in type. +*/ +static bool isBuiltinType(const QByteArray &type) +{ + int id = nameToBuiltinType(type); + return id != QMetaType::UnknownType; } constexpr const char *cxxTypeTag(TypeTags t) @@ -74,17 +91,6 @@ return ""; } -/* - Returns \c true if the type is a built-in type. -*/ -bool isBuiltinType(const QByteArray &type) - { - int id = qMetaTypeTypeInternal(type.constData()); - if (id == QMetaType::UnknownType) - return false; - return (id < QMetaType::User); -} - static const char *metaTypeEnumValueString(int type) { #define RETURN_METATYPENAME_STRING(MetaTypeName, MetaTypeId, RealType) \ @@ -260,6 +266,7 @@ QByteArray alias = cdef->flagAliases.value(def.name); if (cdef->enumDeclarations.contains(alias)) { def.name = alias; + def.flags |= cdef->enumDeclarations[alias]; enumList += def; } } @@ -660,11 +667,11 @@ if (f.isConstructor) fprintf(out, "Constructor("); else - fprintf(out, "%s(", f.type.name.constData()); // return type + fprintf(out, "%s(", disambiguatedTypeName(f.type.name).constData()); // return type const char *comma = ""; for (const auto &argument : f.arguments) { - fprintf(out, "%s%s", comma, argument.type.name.constData()); + fprintf(out, "%s%s", comma, disambiguatedTypeName(argument.type.name).constData()); comma = ", "; } @@ -757,7 +764,9 @@ for (const PropertyDef &p : std::as_const(cdef->propertyList)) { fprintf(out, " // property '%s'\n" " QtMocHelpers::PropertyData<%s%s>(%d, ", - p.name.constData(), cxxTypeTag(p.typeTag), p.type.constData(), stridx(p.name)); + p.name.constData(), cxxTypeTag(p.typeTag), + disambiguatedTypeName(p.type, p.typeTag).constData(), + stridx(p.name)); generateTypeInfo(p.type); fputc(',', out); @@ -842,7 +851,7 @@ fprintf(out, " // %s '%s'\n" " QtMocHelpers::EnumData<%s>(%d, %d,", e.flags & EnumIsFlag ? "flag" : "enum", e.name.constData(), - e.name.constData(), stridx(e.name), stridx(typeName)); + disambiguatedTypeName(e.name).constData(), stridx(e.name), stridx(typeName)); if (e.flags) { const char *separator = ""; @@ -935,7 +944,7 @@ QMultiMap<QByteArray, int> automaticPropertyMetaTypes; for (int i = 0; i < int(cdef->propertyList.size()); ++i) { const PropertyDef &p = cdef->propertyList.at(i); - const QByteArray propertyType = p.type; + const QByteArray &propertyType = p.type; if (registerableMetaType(propertyType) && !isBuiltinType(propertyType)) automaticPropertyMetaTypes.insert(cxxTypeTag(p.typeTag) + propertyType, i); } @@ -949,7 +958,7 @@ for (int i = 0; i < methodList.size(); ++i) { const FunctionDef &f = methodList.at(i); for (int j = 0; j < f.arguments.size(); ++j) { - const QByteArray argType = f.arguments.at(j).normalizedType; + const QByteArray &argType = f.arguments.at(j).normalizedType; if (registerableMetaType(argType) && !isBuiltinType(argType)) methodsWithAutomaticTypes[i].insert(argType, j); } @@ -991,7 +1000,7 @@ if (it != begin) fprintf(out, ","); fprintf(out, "(*reinterpret_cast<%s>(_a[%d]))", - a.typeNameForCast.constData(), offset++); + disambiguatedTypeNameForCast(a.normalizedType).constData(), offset++); } }; @@ -1045,7 +1054,7 @@ } // -- QtScxml if (f.normalizedType != "void") - fprintf(out, "{ %s _r = ", noRef(f.normalizedType).constData()); + fprintf(out, "{ %s _r = ", disambiguatedTypeName(noRef(f.normalizedType)).constData()); fprintf(out, "_t->"); if (f.inPrivateClass.size()) fprintf(out, "%s->", f.inPrivateClass.constData()); @@ -1062,7 +1071,7 @@ const ArgumentDef &a = *it; if (it != begin) fprintf(out, ","); - fprintf(out, "(*reinterpret_cast< %s>(_a[%d]))",a.typeNameForCast.constData(), offset++); + fprintf(out, "(*reinterpret_cast<%s>(_a[%d]))", disambiguatedTypeNameForCast(a.normalizedType).constData(), offset++); usedArgs |= UsedA; } if (f.isPrivateSignal) { @@ -1073,8 +1082,8 @@ } fprintf(out, ");"); if (f.normalizedType != "void") { - fprintf(out, "\n if (_a[0]) *reinterpret_cast< %s*>(_a[0]) = std::move(_r); } ", - noRef(f.normalizedType).constData()); + fprintf(out, "\n if (_a[0]) *reinterpret_cast<%s*>(_a[0]) = std::move(_r); } ", + disambiguatedTypeName(noRef(f.normalizedType)).constData()); usedArgs |= UsedA; } fprintf(out, " break;\n"); @@ -1212,22 +1221,22 @@ #if QT_VERSION <= QT_VERSION_CHECK(7, 0, 0) else if (auto eflags = cdef->enumDeclarations.value(p.type); eflags & EnumIsFlag) fprintf(out, " case %d: QtMocHelpers::assignFlags<%s>(_v, %s%s()); break;\n", - propindex, p.type.constData(), prefix.constData(), p.read.constData()); + propindex, disambiguatedTypeName(p.type, p.typeTag).constData(), prefix.constData(), p.read.constData()); #endif else if (p.read == "default") fprintf(out, " case %d: *reinterpret_cast<%s%s*>(_v) = %s%s().value(); break;\n", - propindex, cxxTypeTag(p.typeTag), p.type.constData(), + propindex, cxxTypeTag(p.typeTag), disambiguatedTypeName(p.type, p.typeTag).constData(), prefix.constData(), p.bind.constData()); else if (!p.read.isEmpty()) // -- QtScxml - fprintf(out, " case %d: *reinterpret_cast<%s%s*>(_v) = %s%s%s; break;\n", - propindex, cxxTypeTag(p.typeTag), p.type.constData(), - prefix.constData(), p.read.constData(), - p.read.endsWith(')') ? "" : "()"); + fprintf(out, " case %d: *reinterpret_cast<%s%s*>(_v) = %s%s%s; break;\n", + propindex, cxxTypeTag(p.typeTag), disambiguatedTypeName(p.type, p.typeTag).constData(), + prefix.constData(), p.read.constData(), + p.read.endsWith(')') ? "" : "()"); // -- QtScxml else fprintf(out, " case %d: *reinterpret_cast<%s%s*>(_v) = %s%s; break;\n", - propindex, cxxTypeTag(p.typeTag), p.type.constData(), + propindex, cxxTypeTag(p.typeTag), disambiguatedTypeName(p.type, p.typeTag).constData(), prefix.constData(), p.member.constData()); } fprintf(out, " default: break;\n"); @@ -1252,21 +1261,24 @@ if (p.write == "default") { fprintf(out, " case %d: {\n", propindex); fprintf(out, " %s%s().setValue(*reinterpret_cast<%s%s*>(_v));\n", - prefix.constData(), p.bind.constData(), cxxTypeTag(p.typeTag), p.type.constData()); + prefix.constData(), p.bind.constData(), cxxTypeTag(p.typeTag), + disambiguatedTypeName(p.type, p.typeTag).constData()); fprintf(out, " break;\n"); fprintf(out, " }\n"); } else if (!p.write.isEmpty()) { fprintf(out, " case %d: %s%s(*reinterpret_cast<%s%s*>(_v)); break;\n", propindex, prefix.constData(), p.write.constData(), - cxxTypeTag(p.typeTag), p.type.constData()); + cxxTypeTag(p.typeTag), disambiguatedTypeName(p.type, p.typeTag).constData()); } else { fprintf(out, " case %d:", propindex); if (p.notify.isEmpty()) { fprintf(out, " QtMocHelpers::setProperty(%s%s, *reinterpret_cast<%s%s*>(_v)); break;\n", - prefix.constData(), p.member.constData(), cxxTypeTag(p.typeTag), p.type.constData()); + prefix.constData(), p.member.constData(), cxxTypeTag(p.typeTag), + disambiguatedTypeName(p.type, p.typeTag).constData()); } else { fprintf(out, "\n if (QtMocHelpers::setProperty(%s%s, *reinterpret_cast<%s%s*>(_v)))\n", - prefix.constData(), p.member.constData(), cxxTypeTag(p.typeTag), p.type.constData()); + prefix.constData(), p.member.constData(), cxxTypeTag(p.typeTag), + disambiguatedTypeName(p.type, p.typeTag).constData()); fprintf(out, " Q_EMIT _t->%s(", p.notify.constData()); if (p.notifyId > -1) { const FunctionDef &f = cdef->signalList.at(p.notifyId); @@ -1284,7 +1296,7 @@ } if (needReset) { - fprintf(out, "if (_c == QMetaObject::ResetProperty) {\n"); + fprintf(out, " if (_c == QMetaObject::ResetProperty) {\n"); fprintf(out, " switch (_id) {\n"); for (int propindex = 0; propindex < int(cdef->propertyList.size()); ++propindex) { const PropertyDef &p = cdef->propertyList.at(propindex); @@ -1562,16 +1574,38 @@ fputs("\n", out); } +#endif +// -- QtScxml + +QByteArray Generator::disambiguatedTypeName(const QByteArray &name) +{ + if (cdef->allEnumNames.contains(name)) + return "enum " + name; + return name; +} + +// in contexts where we already print the type tag, we don't want to do the +// disambiguation +QByteArray Generator::disambiguatedTypeName(const QByteArray &name, TypeTags tag) +{ + if (tag == TypeTag::None) + return disambiguatedTypeName(name); + return name; +} + +QByteArray Generator::disambiguatedTypeNameForCast(const QByteArray &name) +{ + return QByteArray("std::add_pointer_t<"+ disambiguatedTypeName(name) +">"); +} QT_WARNING_DISABLE_GCC("-Wunused-function") QT_WARNING_DISABLE_CLANG("-Wunused-function") QT_WARNING_DISABLE_CLANG("-Wundefined-internal") QT_WARNING_DISABLE_MSVC(4334) // '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) +#define CBOR_NO_HALF_FLOAT_TYPE 1 #define CBOR_ENCODER_WRITER_CONTROL 1 #define CBOR_ENCODER_WRITE_FUNCTION CborDevice::callback -#endif -// -- QtScxml QT_END_NAMESPACE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/generator.h new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/generator.h --- old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/generator.h 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/generator.h 2025-10-02 00:59:41.000000000 +0200 @@ -53,6 +53,9 @@ #if 0 // -- QtScxml void generatePluginMetaData(); #endif // -- QtScxml + QByteArray disambiguatedTypeName(const QByteArray &name); + QByteArray disambiguatedTypeName(const QByteArray &name, TypeTags tag); + QByteArray disambiguatedTypeNameForCast(const QByteArray &name); QMultiMap<QByteArray, int> automaticPropertyMetaTypesHelper(); QMap<int, QMultiMap<QByteArray, int>> methodsWithAutomaticTypesHelper(const QList<FunctionDef> &methodList); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc.cpp new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc.cpp --- old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc.cpp 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc.cpp 2025-10-02 00:59:41.000000000 +0200 @@ -243,7 +243,7 @@ NoInclude, }; -bool Moc::parseEnum(EnumDef *def) +bool Moc::parseEnum(EnumDef *def, ClassDef *containingClass) { bool isTypdefEnum = false; // typedef enum { ... } Foo; @@ -252,6 +252,8 @@ if (test(IDENTIFIER)) { def->name = lexem(); + if (containingClass) + containingClass->allEnumNames.insert(def->name); } else { if (lookup(-1) != TYPEDEF) return false; // anonymous enum @@ -294,6 +296,8 @@ if (!test(IDENTIFIER)) return false; def->name = lexem(); + // used as the name for our enum, but we don't track it, + // because we only care about types that might conflict with members } return true; } @@ -316,7 +320,6 @@ arg.rightType += lexem(); } arg.normalizedType = normalizeType(QByteArray(arg.type.name + ' ' + arg.rightType)); - arg.typeNameForCast = QByteArray("std::add_pointer_t<"+arg.normalizedType+">"); if (test(EQ)) arg.isDefault = true; def->arguments += arg; @@ -772,7 +775,7 @@ break; case ENUM: { EnumDef enumDef; - if (parseEnum(&enumDef)) + if (parseEnum(&enumDef, nullptr)) def.enumList += enumDef; } break; case CLASS: @@ -869,6 +872,7 @@ continue; ClassDef def; if (parseClassHead(&def)) { + Symbol qmlRegistrationMacroSymbol = {}; prependNamespaces(def, namespaceList); FunctionDef::Access access = FunctionDef::Private; @@ -978,12 +982,23 @@ break; case ENUM: { EnumDef enumDef; - if (parseEnum(&enumDef)) + if (parseEnum(&enumDef, &def)) def.enumList += enumDef; } break; case SEMIC: case COLON: break; + case IDENTIFIER: + { + const QByteArray lex = lexem(); + if (lex.startsWith("QML_")) { + if ( lex == "QML_ELEMENT" || lex == "QML_NAMED_ELEMENT" + || lex == "QML_ANONYMOUS" || lex == "QML_VALUE_TYPE") { + qmlRegistrationMacroSymbol = symbol(); + } + } + } + Q_FALLTHROUGH(); default: FunctionDef funcDef; funcDef.access = access; @@ -1024,6 +1039,20 @@ next(RBRACE); + /* if the header is available, moc will see a Q_CLASSINFO entry; the + token is only visible if the header is missing + To avoid false positives, we only warn when encountering the token in a QObject or gadget + */ + if ((def.hasQObject || def.hasQGadget) && qmlRegistrationMacroSymbol.token != NOTOKEN) { + QByteArray msg("Potential QML registration macro was found, but no header containing it was included.\n" + "This might cause runtime errors in QML applications\n" + "Include <QtQmlIntegration/qqmlintegration.h> or <QtQml/qqmlregistration.h> to fix this."); + if (qmlMacroWarningIsFatal) + error(qmlRegistrationMacroSymbol, msg.constData()); + else + warning(qmlRegistrationMacroSymbol, msg.constData()); + } + if (!def.hasQObject && !def.hasQGadget && def.signalList.isEmpty() && def.slotList.isEmpty() && def.propertyList.isEmpty() && def.enumDeclarations.isEmpty()) continue; // no meta object code required @@ -1076,6 +1105,18 @@ } } +QByteArrayView Moc::strippedFileName() const +{ + QByteArrayView fn = QByteArrayView(filename); + + auto isSlash = [](char ch) { return ch == '/' || ch == '\\'; }; + auto rit = std::find_if(fn.crbegin(), fn.crend(), isSlash); + if (rit != fn.crend()) + fn = fn.last(rit - fn.crbegin()); + + return fn; +} + static bool any_type_contains(const QList<PropertyDef> &properties, const QByteArray &pattern) { for (const auto &p : properties) { @@ -1143,12 +1184,7 @@ void Moc::generate(FILE *out, FILE *jsonOutput) { - QByteArrayView fn = QByteArrayView(filename); - - auto isSlash = [](char ch) { return ch == '/' || ch == '\\'; }; - auto rit = std::find_if(fn.crbegin(), fn.crend(), isSlash); - if (rit != fn.crend()) - fn = fn.last(rit - fn.crbegin()); + QByteArrayView fn = strippedFileName(); fprintf(out, "/****************************************************************************\n" "** Meta object code from reading C++ file '%s'\n**\n" , fn.constData()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc.h new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc.h --- old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc.h 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc.h 2025-10-02 00:59:41.000000000 +0200 @@ -66,7 +66,6 @@ ArgumentDef() : isDefault(false) {} Type type; QByteArray rightType, normalizedType, name; - QByteArray typeNameForCast; // type name to be used in cast from void * in metacall bool isDefault; QJsonObject toJson() const; @@ -208,6 +207,7 @@ QList<FunctionDef> signalList, slotList, methodList, publicList; QList<QByteArray> nonClassSignalList; QList<PropertyDef> propertyList; + QSet<QByteArray> allEnumNames; int revisionedMethods = 0; bool hasQObject = false; @@ -253,6 +253,7 @@ QList<QString> parsedPluginMetadataFiles; void parse(); + QByteArrayView strippedFileName() const; void generate(FILE *out, FILE *jsonOutput); bool parseClassHead(ClassDef *def); @@ -270,7 +271,7 @@ Type parseType(); - bool parseEnum(EnumDef *def); + bool parseEnum(EnumDef *def, ClassDef *containingClass); bool parseFunction(FunctionDef *def, bool inMacro = false); bool parseMaybeFunction(const ClassDef *cdef, FunctionDef *def); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc_patches/generator.cpp.patch new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc_patches/generator.cpp.patch --- old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc_patches/generator.cpp.patch 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc_patches/generator.cpp.patch 2025-10-02 00:59:41.000000000 +0200 @@ -1,5 +1,5 @@ ---- .upstream/generator.cpp 2024-11-29 10:11:30.591492464 +0100 -+++ generator.cpp 2024-11-29 15:09:02.730259362 +0100 +--- .upstream/generator.cpp 2025-08-05 11:34:36.126880750 +0200 ++++ generator.cpp 2025-08-05 11:45:06.536876641 +0200 @@ -4,7 +4,9 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 @@ -37,10 +37,10 @@ +} +// -- QtScxml + - uint nameToBuiltinType(const QByteArray &name) + static int nameToBuiltinType(const QByteArray &name) { if (name.isEmpty()) -@@ -72,21 +97,23 @@ +@@ -78,21 +103,23 @@ return nullptr; } @@ -78,7 +78,7 @@ static inline qsizetype lengthOfEscapeSequence(const QByteArray &s, qsizetype i) { -@@ -113,7 +140,7 @@ +@@ -119,7 +146,7 @@ // Prints \a s to \a out, breaking it into lines of at most ColumnWidth. The // opening and closing quotes are NOT included (it's up to the caller). @@ -87,7 +87,7 @@ { static constexpr int ColumnWidth = 68; const qsizetype len = s.size(); -@@ -256,8 +283,10 @@ +@@ -263,8 +290,10 @@ bool hasStaticMetaCall = (cdef->hasQObject || !cdef->methodList.isEmpty() || !cdef->propertyList.isEmpty() || !cdef->constructorList.isEmpty()); @@ -98,7 +98,7 @@ const QByteArray qualifiedClassNameIdentifier = generateQualifiedClassNameIdentifier(cdef->qualified); -@@ -518,8 +547,10 @@ +@@ -525,8 +554,10 @@ } fprintf(out, "}\n"); @@ -109,7 +109,7 @@ // // Generate internal qt_metacall() function -@@ -535,7 +566,9 @@ +@@ -542,7 +573,9 @@ // // Generate plugin meta data // @@ -119,7 +119,7 @@ // // Generate function to make sure the non-class signals exist in the parent classes -@@ -1004,6 +1037,13 @@ +@@ -1013,6 +1046,13 @@ const FunctionDef &f = methodList.at(methodindex); Q_ASSERT(!f.normalizedType.isEmpty()); fprintf(out, " case %d: ", methodindex); @@ -131,9 +131,9 @@ + } + // -- QtScxml if (f.normalizedType != "void") - fprintf(out, "{ %s _r = ", noRef(f.normalizedType).constData()); + fprintf(out, "{ %s _r = ", disambiguatedTypeName(noRef(f.normalizedType)).constData()); fprintf(out, "_t->"); -@@ -1080,6 +1120,10 @@ +@@ -1089,6 +1129,10 @@ const FunctionDef &f = cdef->signalList.at(methodindex); if (f.wasCloned || !f.inPrivateClass.isEmpty() || f.isStatic) continue; @@ -144,7 +144,7 @@ fprintf(out, " if (QtMocHelpers::indexOfMethod<%s (%s::*)(", f.type.rawName.constData() , cdef->classname.constData()); -@@ -1098,7 +1142,7 @@ +@@ -1107,7 +1151,7 @@ } fprintf(out, ")%s>(_a, &%s::%s, %d))\n", f.isConst ? " const" : "", @@ -153,23 +153,22 @@ fprintf(out, " return;\n"); } fprintf(out, " }\n"); -@@ -1175,9 +1219,12 @@ - propindex, cxxTypeTag(p.typeTag), p.type.constData(), +@@ -1184,9 +1228,12 @@ + propindex, cxxTypeTag(p.typeTag), disambiguatedTypeName(p.type, p.typeTag).constData(), prefix.constData(), p.bind.constData()); else if (!p.read.isEmpty()) - fprintf(out, " case %d: *reinterpret_cast<%s%s*>(_v) = %s%s(); break;\n", -- propindex, cxxTypeTag(p.typeTag), p.type.constData(), -- prefix.constData(), p.read.constData()); + // -- QtScxml -+ fprintf(out, " case %d: *reinterpret_cast<%s%s*>(_v) = %s%s%s; break;\n", -+ propindex, cxxTypeTag(p.typeTag), p.type.constData(), -+ prefix.constData(), p.read.constData(), -+ p.read.endsWith(')') ? "" : "()"); ++ fprintf(out, " case %d: *reinterpret_cast<%s%s*>(_v) = %s%s%s; break;\n", + propindex, cxxTypeTag(p.typeTag), disambiguatedTypeName(p.type, p.typeTag).constData(), +- prefix.constData(), p.read.constData()); ++ prefix.constData(), p.read.constData(), ++ p.read.endsWith(')') ? "" : "()"); + // -- QtScxml else fprintf(out, " case %d: *reinterpret_cast<%s%s*>(_v) = %s%s; break;\n", - propindex, cxxTypeTag(p.typeTag), p.type.constData(), -@@ -1293,6 +1340,10 @@ + propindex, cxxTypeTag(p.typeTag), disambiguatedTypeName(p.type, p.typeTag).constData(), +@@ -1305,6 +1352,10 @@ { if (def->wasCloned || def->isAbstract) return; @@ -180,7 +179,7 @@ fprintf(out, "\n// SIGNAL %d\n%s %s::%s(", index, def->type.name.constData(), cdef->qualified.constData(), def->name.constData()); -@@ -1354,6 +1405,36 @@ +@@ -1366,6 +1417,36 @@ fprintf(out, "}\n"); } @@ -217,13 +216,17 @@ static CborError jsonValueToCbor(CborEncoder *parent, const QJsonValue &v); static CborError jsonObjectToCbor(CborEncoder *parent, const QJsonObject &o) { -@@ -1489,7 +1570,11 @@ +@@ -1493,6 +1574,8 @@ - #define CBOR_ENCODER_WRITER_CONTROL 1 - #define CBOR_ENCODER_WRITE_FUNCTION CborDevice::callback + fputs("\n", out); + } +#endif +// -- QtScxml + QByteArray Generator::disambiguatedTypeName(const QByteArray &name) + { +@@ -1526,4 +1609,6 @@ + QT_END_NAMESPACE +#if 0 // -- QtScxml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc_patches/generator.h.patch new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc_patches/generator.h.patch --- old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc_patches/generator.h.patch 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc_patches/generator.h.patch 2025-10-02 00:59:41.000000000 +0200 @@ -1,5 +1,5 @@ ---- .upstream/generator.h 2024-11-26 09:17:44.310374771 +0100 -+++ generator.h 2024-11-29 14:24:29.342501933 +0100 +--- .upstream/generator.h 2025-06-30 09:17:40.517007436 +0200 ++++ generator.h 2025-08-05 11:38:51.803690743 +0200 @@ -6,23 +6,34 @@ #include "moc.h" @@ -46,6 +46,6 @@ +#if 0 // -- QtScxml void generatePluginMetaData(); +#endif // -- QtScxml - QMultiMap<QByteArray, int> automaticPropertyMetaTypesHelper(); - QMap<int, QMultiMap<QByteArray, int>> - methodsWithAutomaticTypesHelper(const QList<FunctionDef> &methodList); + QByteArray disambiguatedTypeName(const QByteArray &name); + QByteArray disambiguatedTypeName(const QByteArray &name, TypeTags tag); + QByteArray disambiguatedTypeNameForCast(const QByteArray &name); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc_patches/moc.cpp.patch new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc_patches/moc.cpp.patch --- old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc_patches/moc.cpp.patch 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc_patches/moc.cpp.patch 2025-10-02 00:59:41.000000000 +0200 @@ -1,5 +1,5 @@ ---- .upstream/moc.cpp 2024-11-22 10:57:14.673629148 +0100 -+++ moc.cpp 2024-11-29 15:00:06.897734418 +0100 +--- .upstream/moc.cpp 2025-06-30 09:17:40.517007436 +0200 ++++ moc.cpp 2025-08-05 11:30:27.602092370 +0200 @@ -12,15 +12,15 @@ #include <QtCore/qdir.h> #include <QtCore/qjsondocument.h> @@ -20,7 +20,7 @@ // only moc needs this function static QByteArray normalizeType(const QByteArray &ba) { -@@ -2006,6 +2006,7 @@ +@@ -2042,6 +2042,7 @@ } } } @@ -28,7 +28,7 @@ QJsonObject ClassDef::toJson() const { -@@ -2199,8 +2200,8 @@ +@@ -2235,8 +2236,8 @@ def["alias"_L1] = QString::fromUtf8(enumName); if (!type.isEmpty()) def["type"_L1] = QString::fromUtf8(type); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc_patches/moc.h.patch new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc_patches/moc.h.patch --- old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc_patches/moc.h.patch 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc_patches/moc.h.patch 2025-10-02 00:59:41.000000000 +0200 @@ -1,5 +1,5 @@ ---- .upstream/moc.h 2024-11-22 10:57:14.673629148 +0100 -+++ moc.h 2024-11-29 14:50:33.988625304 +0100 +--- .upstream/moc.h 2025-06-30 09:17:40.517007436 +0200 ++++ moc.h 2025-08-05 11:30:27.606092383 +0200 @@ -4,15 +4,13 @@ #ifndef MOC_H #define MOC_H @@ -45,7 +45,7 @@ ReferenceType referenceType; }; Q_DECLARE_TYPEINFO(Type, Q_RELOCATABLE_TYPE); -@@ -92,8 +92,9 @@ +@@ -91,8 +91,9 @@ bool inlineCode = false; bool wasCloned = false; @@ -56,7 +56,7 @@ bool isCompat = false; bool isInvokable = false; bool isScriptable = false; -@@ -107,6 +108,11 @@ +@@ -106,6 +107,11 @@ QJsonObject toJson(int index) const; static void accessToJson(QJsonObject *obj, Access acs); @@ -68,7 +68,7 @@ }; Q_DECLARE_TYPEINFO(FunctionDef, Q_RELOCATABLE_TYPE); -@@ -135,6 +141,10 @@ +@@ -134,6 +140,10 @@ qsizetype location = -1; // token index, used for error reporting QJsonObject toJson() const; @@ -87,7 +87,7 @@ class Moc : public Parser { public: -@@ -305,6 +316,7 @@ +@@ -306,6 +317,7 @@ void checkListSizes(const ClassDef &def); }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc_patches/outputrevision.h.patch new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc_patches/outputrevision.h.patch --- old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/moc_patches/outputrevision.h.patch 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/moc_patches/outputrevision.h.patch 2025-10-02 00:59:41.000000000 +0200 @@ -1,5 +1,5 @@ --- .upstream/outputrevision.h 2024-11-15 07:24:09.762842614 +0100 -+++ outputrevision.h 2024-11-29 14:25:52.887280117 +0100 ++++ outputrevision.h 2025-08-05 11:30:27.598092358 +0200 @@ -4,7 +4,13 @@ #ifndef OUTPUTREVISION_H #define OUTPUTREVISION_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/scxmlcppdumper.cpp new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/scxmlcppdumper.cpp --- old/qtscxml-everywhere-src-6.9.2/tools/qscxmlc/scxmlcppdumper.cpp 2025-08-18 01:36:25.000000000 +0200 +++ new/qtscxml-everywhere-src-6.10.0/tools/qscxmlc/scxmlcppdumper.cpp 2025-10-02 00:59:41.000000000 +0200 @@ -746,7 +746,6 @@ arg.type.rawName = arg.type.name; arg.normalizedType = arg.type.name; arg.name = "parent"; - arg.typeNameForCast = arg.type.name + "*"; constructor.arguments.append(arg); classDef.constructorList.append(constructor); @@ -774,7 +773,6 @@ arg.type.rawName = arg.type.name; arg.normalizedType = arg.type.name; arg.name = "active"; - arg.typeNameForCast = arg.type.name + "*"; signal.arguments << arg; classDef.signalList << signal;
