CallgrindController: Get rid of no-op code

Amends 5830641d0f

Change-Id: I7474cf27de4c779ebe36bf01856b7ce0634dd999
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-03-23 23:13:05 +01:00
parent d7ff76be69
commit 4ced33f4fe
3 changed files with 1 additions and 45 deletions

View File

@@ -25,19 +25,8 @@
#include "callgrindcontroller.h"
#include <ssh/sftpsession.h>
#include <ssh/sshconnectionmanager.h>
#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
#include <utils/temporaryfile.h>
#include <QDebug>
#include <QDir>
#include <QEventLoop>
#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())

View File

@@ -25,9 +25,6 @@
#pragma once
#include <ssh/sftpdefs.h>
#include <ssh/sshremoteprocess.h>
#include <projectexplorer/runcontrol.h>
#include <QProcess>
@@ -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

View File

@@ -75,6 +75,7 @@
#include <utils/fancymainwindow.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
#include <utils/styledbar.h>
#include <utils/utilsicons.h>