QmlDesigner: Remove Connections Editor action

Task-number: QDS-10606
Change-Id: I0b0d4364e6c80eddee3bb1d8b8491c8c00542593
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Aleksei German
2023-09-15 18:28:39 +02:00
parent 4949c1911e
commit 106bb82d73

View File

@@ -741,19 +741,7 @@ public:
activeSignalHandlerGroup->addMenu(editSlotGroup); activeSignalHandlerGroup->addMenu(editSlotGroup);
} }
ActionTemplate *openEditorAction = new ActionTemplate( //add an action to open Connection Form from here:
(propertyName + "OpenEditorId").toLatin1(),
QString(QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Open Connections Editor")),
[=](const SelectionContext &) {
signalHandler.parentModelNode().view()->executeInTransaction(
"ConnectionsModelNodeActionGroup::"
"openConnectionsEditor",
[signalHandler]() {
ActionEditor::invokeEditor(signalHandler, removeSignal);
});
});
activeSignalHandlerGroup->addAction(openEditorAction);
ActionTemplate *removeSignalHandlerAction = new ActionTemplate( ActionTemplate *removeSignalHandlerAction = new ActionTemplate(
(propertyName + "RemoveSignalHandlerId").toLatin1(), (propertyName + "RemoveSignalHandlerId").toLatin1(),
@@ -822,25 +810,7 @@ public:
} }
} }
ActionTemplate *openEditorAction = new ActionTemplate( //add an action to open Connection Form from here
(signalStr + "OpenEditorId").toLatin1(),
QString(QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Open Connections Editor")),
[=](const SelectionContext &) {
currentNode.view()->executeInTransaction(
"ConnectionsModelNodeActionGroup::"
"openConnectionsEditor",
[=]() {
ModelNode newConnectionNode = createNewConnection(currentNode);
SignalHandlerProperty newHandler = newConnectionNode.signalHandlerProperty(
prependSignal(signalStr).toLatin1());
newHandler.setSource(
QString("console.log(\"%1.%2\")").arg(currentNode.id(), signalStr));
ActionEditor::invokeEditor(newHandler, removeSignal, true);
});
});
newSignal->addAction(openEditorAction);
addConnection->addMenu(newSignal); addConnection->addMenu(newSignal);
} }