Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.0
-
45537009a8a3f8e855c1adf0208084849b6dc9c4 (qt/qtdeclarative/dev)
Description
Actual version is dev branch (e25bd7a3b76107eb3da3e1eb4e8667ce99b4d20a)
qmllint -U crashes on code like this:
Connections { target: FirstRunDialog onSignInResponse: { animationProgress.stopAnimation() if (err) { errorText.text = err errorMsg.visible = true errTimer.running = true } else { textPageStr.text = qsTr("Welcome") textPageBut.text = qsTr("Continue") welcomePage.index = 2 } } }
where firstRunDialog is registered like this:
engine.rootContext()->setContextProperty("FirstRunDialog", firstRunDialog);
qmllint crashes qtdeclarative/tools/qmllint/findunqualified.cpp:714:
auto targetScope = m_qmlid2scope[outstandingConnection.targetName]; if (outstandingConnection.scope) outstandingConnection.scope->addMethods(targetScope->methods());
because of targetScope is nullptr,
outstandingConnection.targetName: "FirstRunDialog".
I can fix this bug with:
- if (outstandingConnection.scope) + if (outstandingConnection.scope && targetScope)