diff --git a/src/plugins/qmlprofiler/qmlprofilerattachdialog.cpp b/src/plugins/qmlprofiler/qmlprofilerattachdialog.cpp index 962169434f3..7b1e4fff695 100644 --- a/src/plugins/qmlprofiler/qmlprofilerattachdialog.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerattachdialog.cpp @@ -28,10 +28,11 @@ #include #include -#include #include #include +#include #include +#include using namespace ProjectExplorer; @@ -63,11 +64,20 @@ QmlProfilerAttachDialog::QmlProfilerAttachDialog(QWidget *parent) : buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); buttonBox->button(QDialogButtonBox::Ok)->setDefault(true); + QLabel *hint = new QLabel(this); + hint->setWordWrap(true); + hint->setTextFormat(Qt::RichText); + hint->setText(tr("Select an externally started QML-debug enabled application.

" + "Commonly used command-line arguments are:") + + "

-qmljsdebugger=port:<port>,host:<host>,block,
" + "  services:EngineControl,DebugMessages[,...]

"); + QFormLayout *formLayout = new QFormLayout(); formLayout->addRow(tr("Kit:"), d->kitChooser); formLayout->addRow(tr("&Port:"), d->portSpinBox); QVBoxLayout *verticalLayout = new QVBoxLayout(this); + verticalLayout->addWidget(hint); verticalLayout->addLayout(formLayout); verticalLayout->addWidget(buttonBox); diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 97fc6854cae..bad4c79ee48 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -254,7 +254,7 @@ QmlProfilerTool::QmlProfilerTool(QObject *parent) act = new QAction(tr("QML Profiler"), this); act->setToolTip(description); - menu->addAction(ActionManager::registerAction(act, "QmlProfiler.Local"), + menu->addAction(ActionManager::registerAction(act, "QmlProfiler.Internal"), Debugger::Constants::G_ANALYZER_TOOLS); QObject::connect(act, &QAction::triggered, this, [this] { if (!prepareTool()) @@ -267,11 +267,11 @@ QmlProfilerTool::QmlProfilerTool(QObject *parent) act->setEnabled(d->m_startAction->isEnabled()); }); - act = new QAction(tr("QML Profiler (External)"), this); + act = new QAction(tr("QML Profiler (Attach to Waiting Application)"), this); act->setToolTip(description); - menu->addAction(ActionManager::registerAction(act, "QmlProfiler.Remote"), + menu->addAction(ActionManager::registerAction(act, "QmlProfiler.AttachToWaitingApplication"), Debugger::Constants::G_ANALYZER_REMOTE_TOOLS); - QObject::connect(act, &QAction::triggered, this, &QmlProfilerTool::startRemoteTool); + QObject::connect(act, &QAction::triggered, this, &QmlProfilerTool::attachToWaitingApplication); Utils::ToolbarDescription toolbar; toolbar.addAction(d->m_startAction); @@ -546,7 +546,7 @@ bool QmlProfilerTool::prepareTool() return true; } -void QmlProfilerTool::startRemoteTool() +void QmlProfilerTool::attachToWaitingApplication() { if (!prepareTool()) return; @@ -589,8 +589,8 @@ void QmlProfilerTool::startRemoteTool() RunConfiguration *rc = Debugger::startupRunConfiguration(); auto runControl = new RunControl(rc, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); - runControl->createWorker(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); - runControl->setConnection(UrlConnection(serverUrl)); + auto profiler = new QmlProfilerRunner(runControl); + profiler->setServerUrl(serverUrl); ProjectExplorerPlugin::startRunControl(runControl); } diff --git a/src/plugins/qmlprofiler/qmlprofilertool.h b/src/plugins/qmlprofiler/qmlprofilertool.h index 17ecd0c8061..206c56930cb 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.h +++ b/src/plugins/qmlprofiler/qmlprofilertool.h @@ -53,7 +53,7 @@ public: void finalizeRunControl(QmlProfilerRunner *runWorker); bool prepareTool(); - void startRemoteTool(); + void attachToWaitingApplication(); QString summary(const QVector &typeIds) const; QStringList details(int typeId) const;