diff options
author | hjk <hjk@qt.io> | 2017-08-10 14:13:18 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2017-08-10 13:13:57 +0000 |
commit | a9d2e645179e6a94741c6be792de6ee9088d1aed (patch) | |
tree | 52e24d4b4b446803f473601384ef5acd604ae0aa /src/plugins/qmlprofiler/qmlprofilertool.cpp | |
parent | 51dd89fc3408c2790f47cf0125744d62efc7f240 (diff) | |
download | qt-creator-a9d2e645179e6a94741c6be792de6ee9088d1aed.tar.gz |
QmlProfiler: Move TCP connection initialization to runworker's start()
That makes the high level sequence of operation the same as for the
local socket case.
Change-Id: Ib8af2a7826a482e98b75fe00f3c0e672b98886c5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertool.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertool.cpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index afd2c189dc..3c1a562bc4 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -352,16 +352,6 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker) updateRunActions(); runWorker->registerProfilerStateManager(d->m_profilerState); - QmlProfilerClientManager *clientManager = d->m_profilerConnections; - - // FIXME: Check that there's something sensible in sp.connParams - auto serverUrl = runWorker->serverUrl(); - clientManager->setServerUrl(serverUrl); - if (!serverUrl.path().isEmpty()) { - // That's the local socket case. - // We open the server and the application connects to it, so let's do that right away. - clientManager->startLocalServer(); - } // // Initialize m_projectFinder @@ -370,37 +360,6 @@ void QmlProfilerTool::finalizeRunControl(QmlProfilerRunner *runWorker) if (runConfiguration) { d->m_profilerModelManager->populateFileFinder(runConfiguration); } - - connect(clientManager, &QmlProfilerClientManager::connectionFailed, - runWorker, [this, clientManager, runWorker]() { - QMessageBox *infoBox = new QMessageBox(ICore::mainWindow()); - infoBox->setIcon(QMessageBox::Critical); - infoBox->setWindowTitle(tr("Qt Creator")); - infoBox->setText(tr("Could not connect to the in-process QML profiler.\n" - "Do you want to retry?")); - infoBox->setStandardButtons(QMessageBox::Retry | QMessageBox::Cancel | QMessageBox::Help); - infoBox->setDefaultButton(QMessageBox::Retry); - infoBox->setModal(true); - - connect(infoBox, &QDialog::finished, runWorker, [clientManager, runWorker](int result) { - switch (result) { - case QMessageBox::Retry: - clientManager->retryConnect(); - break; - case QMessageBox::Help: - HelpManager::handleHelpRequest( - "qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html"); - Q_FALLTHROUGH(); - case QMessageBox::Cancel: - // The actual error message has already been logged. - logState(tr("Failed to connect.")); - runWorker->cancelProcess(); - break; - } - }); - - infoBox->show(); - }); } void QmlProfilerTool::recordingButtonChanged(bool recording) |