Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.11
-
None
-
b2c71d6518143b3d2a9bd3aef1d72ee5929891fc
Description
Minimal example:
main.cpp
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QDebug> class Test : public QObject { Q_OBJECT Q_PROPERTY(int foo READ foo CONSTANT FINAL) public: int foo() const { return 1; } Test() {} }; int main(int argc, char *argv[]) { #if defined(Q_OS_WIN) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif QGuiApplication app(argc, argv); QQmlApplicationEngine engine; qmlRegisterType<Test>("App", 1, 0, "Test"); engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); if (engine.rootObjects().isEmpty()) return -1; return app.exec(); } #include "main.moc"
main.qml
import QtQuick 2.9 import QtQuick.Window 2.0 import App 1.0 Window { width: 600 height: 600 title: qsTr("Hello World") visible: true Test { objectName: foo ? "bar" : "baz" } }
Stack trace before the warning is printed:
1 QQmlPropertyCapture::captureProperty qqmljavascriptexpression.cpp 306 0x7ffff765b7f7 2 QQmlPropertyCapture::registerQmlDependencies qqmljavascriptexpression.cpp 388 0x7ffff765c3b7 3 QQmlJavaScriptExpression::evaluate qqmljavascriptexpression.cpp 234 0x7ffff765c9d2 4 QQmlJavaScriptExpression::evaluate qqmljavascriptexpression.cpp 190 0x7ffff765d0fd 5 QQmlNonbindingBinding::doUpdate qqmlbinding.cpp 206 0x7ffff76695a3 6 QQmlBinding::update qqmlbinding.cpp 168 0x7ffff76669cc 7 QQmlBinding::setEnabled qqmlbinding.cpp 503 0x7ffff7666ec8 8 QQmlObjectCreator::finalize qqmlobjectcreator.cpp 1306 0x7ffff7677cdc 9 QQmlComponentPrivate::complete qqmlcomponent.cpp 921 0x7ffff75d855d 10 QQmlComponentPrivate::completeCreate qqmlcomponent.cpp 957 0x7ffff75d8681 11 QQmlComponent::completeCreate qqmlcomponent.cpp 950 0x7ffff75d872f 12 QQmlComponent::create qqmlcomponent.cpp 776 0x7ffff75d84b2 13 QQmlApplicationEnginePrivate::finishLoad qqmlapplicationengine.cpp 134 0x7ffff766b904 14 QQmlApplicationEnginePrivate::startLoad qqmlapplicationengine.cpp 118 0x7ffff766bb07 15 QQmlApplicationEngine::load qqmlapplicationengine.cpp 259 0x7ffff766bbce 16 main main.cpp 28 0x401d07
Attachments
For Gerrit Dashboard: QTBUG-66361 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
220403,10 | Fix "Expression depends on non-NOTIFYable properties" regression | 5.11 | qt/qtdeclarative | Status: MERGED | -2 | 0 |