Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.0 Beta3
-
-
8cbb30a65 (dev), 22e00e414 (6.4), 56c652f00 (6.5), 039848612 (tqtc/lts-6.2)
Description
#include <QObject> #include <QQmlEngine> class DummyObjekt : public QObject { Q_OBJECT QML_ELEMENT QML_SINGLETON // This causes the crash public: enum Test { TestA = 1, TestB }; Q_ENUM(Test) public: explicit DummyObjekt(QObject *parent); };
import QtQuick 2.15 import QtQuick.Controls.Material 2.0 import QtQuick.Layouts 1.3 import com.test ApplicationWindow { id: window width: 640 height: 480 visible: true title: qsTr("Test") Button { id: btn text: "Click me" onClicked: { console.log("Dummy: " + DummyObjekt.TestA); // Crash } } }
Attachments
For Gerrit Dashboard: QTBUG-109816 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
463006,6 | QtQml: Always throw when requesting an enum from an invalid singleton | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
463685,3 | QtQml: Always throw when requesting an enum from an invalid singleton | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
463686,3 | QtQml: Always throw when requesting an enum from an invalid singleton | 6.4 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
463695,3 | QtQml: Always throw when requesting an enum from an invalid singleton | tqtc/lts-6.2 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |