From 4ced33f4fe7e460ebe77ae69b15128a45f3a8fe1 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 23 Mar 2022 23:13:05 +0100 Subject: [PATCH] CallgrindController: Get rid of no-op code Amends 5830641d0f233f09001cdc388367b229b868c25f Change-Id: I7474cf27de4c779ebe36bf01856b7ce0634dd999 Reviewed-by: hjk Reviewed-by: --- .../callgrind/callgrindcontroller.cpp | 37 ------------------- .../valgrind/callgrind/callgrindcontroller.h | 8 ---- src/plugins/valgrind/callgrindtool.cpp | 1 + 3 files changed, 1 insertion(+), 45 deletions(-) diff --git a/src/plugins/valgrind/callgrind/callgrindcontroller.cpp b/src/plugins/valgrind/callgrind/callgrindcontroller.cpp index d2c8a3c6155..d2b93001be1 100644 --- a/src/plugins/valgrind/callgrind/callgrindcontroller.cpp +++ b/src/plugins/valgrind/callgrind/callgrindcontroller.cpp @@ -25,19 +25,8 @@ #include "callgrindcontroller.h" -#include -#include - -#include -#include -#include -#include #include -#include -#include -#include - #define CALLGRIND_CONTROL_DEBUG 0 using namespace ProjectExplorer; @@ -189,17 +178,6 @@ void CallgrindController::getLocalDataFile() m_hostOutputFile = FilePath::fromString(dataFile.fileName()); } -// ///TODO: error handling -// emit statusMessage(tr("Downloading remote profile data...")); -// m_ssh = m_valgrindProc->connection(); -// [...] -// m_sftp = m_ssh->createSftpSession(); -// connect(m_sftp.get(), &QSsh::SftpSession::commandFinished, -// this, &CallgrindController::sftpJobFinished); -// connect(m_sftp.get(), &QSsh::SftpSession::started, -// this, &CallgrindController::sftpInitialized); -// m_sftp->start(); - const auto afterCopy = [this](bool res) { QTC_CHECK(res); emit localParseDataAvailable(m_hostOutputFile); @@ -207,21 +185,6 @@ void CallgrindController::getLocalDataFile() m_valgrindOutputFile.asyncCopyFile(afterCopy, m_hostOutputFile); } -void CallgrindController::sftpInitialized() -{ - m_downloadJob = m_sftp->downloadFile(m_valgrindOutputFile.path(), m_hostOutputFile.path()); -} - -void CallgrindController::sftpJobFinished(QSsh::SftpJobId job, const QString &error) -{ - QTC_ASSERT(job == m_downloadJob, return); - - m_sftp->quit(); - - if (error.isEmpty()) - emit localParseDataAvailable(m_hostOutputFile); -} - void CallgrindController::cleanupTempFile() { if (!m_hostOutputFile.isEmpty() && m_hostOutputFile.exists()) diff --git a/src/plugins/valgrind/callgrind/callgrindcontroller.h b/src/plugins/valgrind/callgrind/callgrindcontroller.h index 6f0b7af2716..3c7bc42ffda 100644 --- a/src/plugins/valgrind/callgrind/callgrindcontroller.h +++ b/src/plugins/valgrind/callgrind/callgrindcontroller.h @@ -25,9 +25,6 @@ #pragma once -#include -#include - #include #include @@ -72,12 +69,9 @@ signals: private: void handleControllerProcessError(QProcess::ProcessError); - void sftpInitialized(); - void sftpJobFinished(QSsh::SftpJobId job, const QString &error); void cleanupTempFile(); void controllerProcessFinished(); - void controllerProcessError(QProcess::ProcessError); ProjectExplorer::ApplicationLauncher *m_controllerProcess = nullptr; ProjectExplorer::Runnable m_valgrindRunnable; @@ -88,8 +82,6 @@ private: // remote callgrind support Utils::FilePath m_valgrindOutputFile; // On the device that runs valgrind Utils::FilePath m_hostOutputFile; // On the device that runs creator - QSsh::SftpSessionPtr m_sftp; - QSsh::SftpJobId m_downloadJob = 0; }; } // namespace Callgrind diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp index d8498901d70..692a7f5833f 100644 --- a/src/plugins/valgrind/callgrindtool.cpp +++ b/src/plugins/valgrind/callgrindtool.cpp @@ -75,6 +75,7 @@ #include #include +#include #include #include