forked from qt-creator/qt-creator
QmlDesigner: Fix connection editor functions
Fix the connection editor not picking up all the slots of a model node due to setting a wrong expression in the QmlJS::Document. Change-Id: I2d28e1e779c5293991397ebc2a061c35234d9cae Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
5d75f1900b
commit
1996c4c8c8
@@ -226,9 +226,12 @@ void ActionEditor::prepareConnections()
|
||||
}
|
||||
|
||||
for (const auto &slotName : modelNode.metaInfo().slotNames()) {
|
||||
if (slotName.startsWith("q_") || slotName.startsWith("_q_"))
|
||||
continue;
|
||||
|
||||
QmlJS::Document::MutablePtr newDoc = QmlJS::Document::create(
|
||||
QLatin1String("<expression>"), QmlJS::Dialect::JavaScript);
|
||||
newDoc->setSource(QLatin1String(slotName));
|
||||
newDoc->setSource(modelNode.id() + "." + QLatin1String(slotName));
|
||||
newDoc->parseExpression();
|
||||
|
||||
QmlJS::AST::ExpressionNode *expression = newDoc->expression();
|
||||
|
||||
Reference in New Issue
Block a user