forked from qt-creator/qt-creator
Qnx: Use ActionBuilder for Attach action
Change-Id: Ieb7fb38f1e293e61b7ca0e543e7066018cf32d5e Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
|
||||||
|
using namespace Core;
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
|
||||||
namespace Qnx::Internal {
|
namespace Qnx::Internal {
|
||||||
@@ -94,22 +95,22 @@ class QnxPlugin final : public ExtensionSystem::IPlugin
|
|||||||
|
|
||||||
void extensionsInitialized() final
|
void extensionsInitialized() final
|
||||||
{
|
{
|
||||||
auto attachToQnxApplication = new QAction{Tr::tr("Attach to remote QNX application..."), this};
|
|
||||||
// Attach support
|
|
||||||
connect(attachToQnxApplication, &QAction::triggered, this, &showAttachToProcessDialog);
|
|
||||||
|
|
||||||
const Utils::Id QNX_DEBUGGING_GROUP = "Debugger.Group.Qnx";
|
const Utils::Id QNX_DEBUGGING_GROUP = "Debugger.Group.Qnx";
|
||||||
|
|
||||||
QAction *debugSeparator = nullptr;
|
QAction *debugSeparator = nullptr;
|
||||||
|
QAction *attachToQnxApplication = nullptr;
|
||||||
|
|
||||||
Core::ActionContainer *mstart = Core::ActionManager::actionContainer(ProjectExplorer::Constants::M_DEBUG_STARTDEBUGGING);
|
ActionContainer *mstart = Core::ActionManager::actionContainer(ProjectExplorer::Constants::M_DEBUG_STARTDEBUGGING);
|
||||||
mstart->appendGroup(QNX_DEBUGGING_GROUP);
|
mstart->appendGroup(QNX_DEBUGGING_GROUP);
|
||||||
mstart->addSeparator(Core::Context(Core::Constants::C_GLOBAL), QNX_DEBUGGING_GROUP,
|
mstart->addSeparator(Core::Context(Core::Constants::C_GLOBAL), QNX_DEBUGGING_GROUP,
|
||||||
&debugSeparator);
|
&debugSeparator);
|
||||||
|
|
||||||
Core::Command *cmd = Core::ActionManager::registerAction
|
// Attach support
|
||||||
(attachToQnxApplication, "Debugger.AttachToQnxApplication");
|
ActionBuilder(this, "Debugger.AttachToQnxApplication")
|
||||||
mstart->addAction(cmd, QNX_DEBUGGING_GROUP);
|
.setText(Tr::tr("Attach to remote QNX application..."))
|
||||||
|
.addToContainer(ProjectExplorer::Constants::M_DEBUG_STARTDEBUGGING, QNX_DEBUGGING_GROUP)
|
||||||
|
.bindContextAction(&attachToQnxApplication)
|
||||||
|
.addOnTriggered(this, &showAttachToProcessDialog);
|
||||||
|
|
||||||
connect(KitManager::instance(), &KitManager::kitsChanged, this,
|
connect(KitManager::instance(), &KitManager::kitsChanged, this,
|
||||||
[attachToQnxApplication, debugSeparator] {
|
[attachToQnxApplication, debugSeparator] {
|
||||||
|
Reference in New Issue
Block a user