forked from qt-creator/qt-creator
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:
@@ -25,19 +25,8 @@
|
|||||||
|
|
||||||
#include "callgrindcontroller.h"
|
#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 <utils/temporaryfile.h>
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QDir>
|
|
||||||
#include <QEventLoop>
|
|
||||||
|
|
||||||
#define CALLGRIND_CONTROL_DEBUG 0
|
#define CALLGRIND_CONTROL_DEBUG 0
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
@@ -189,17 +178,6 @@ void CallgrindController::getLocalDataFile()
|
|||||||
m_hostOutputFile = FilePath::fromString(dataFile.fileName());
|
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) {
|
const auto afterCopy = [this](bool res) {
|
||||||
QTC_CHECK(res);
|
QTC_CHECK(res);
|
||||||
emit localParseDataAvailable(m_hostOutputFile);
|
emit localParseDataAvailable(m_hostOutputFile);
|
||||||
@@ -207,21 +185,6 @@ void CallgrindController::getLocalDataFile()
|
|||||||
m_valgrindOutputFile.asyncCopyFile(afterCopy, m_hostOutputFile);
|
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()
|
void CallgrindController::cleanupTempFile()
|
||||||
{
|
{
|
||||||
if (!m_hostOutputFile.isEmpty() && m_hostOutputFile.exists())
|
if (!m_hostOutputFile.isEmpty() && m_hostOutputFile.exists())
|
||||||
|
@@ -25,9 +25,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <ssh/sftpdefs.h>
|
|
||||||
#include <ssh/sshremoteprocess.h>
|
|
||||||
|
|
||||||
#include <projectexplorer/runcontrol.h>
|
#include <projectexplorer/runcontrol.h>
|
||||||
|
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
@@ -72,12 +69,9 @@ signals:
|
|||||||
private:
|
private:
|
||||||
void handleControllerProcessError(QProcess::ProcessError);
|
void handleControllerProcessError(QProcess::ProcessError);
|
||||||
|
|
||||||
void sftpInitialized();
|
|
||||||
void sftpJobFinished(QSsh::SftpJobId job, const QString &error);
|
|
||||||
void cleanupTempFile();
|
void cleanupTempFile();
|
||||||
|
|
||||||
void controllerProcessFinished();
|
void controllerProcessFinished();
|
||||||
void controllerProcessError(QProcess::ProcessError);
|
|
||||||
|
|
||||||
ProjectExplorer::ApplicationLauncher *m_controllerProcess = nullptr;
|
ProjectExplorer::ApplicationLauncher *m_controllerProcess = nullptr;
|
||||||
ProjectExplorer::Runnable m_valgrindRunnable;
|
ProjectExplorer::Runnable m_valgrindRunnable;
|
||||||
@@ -88,8 +82,6 @@ private:
|
|||||||
// remote callgrind support
|
// remote callgrind support
|
||||||
Utils::FilePath m_valgrindOutputFile; // On the device that runs valgrind
|
Utils::FilePath m_valgrindOutputFile; // On the device that runs valgrind
|
||||||
Utils::FilePath m_hostOutputFile; // On the device that runs creator
|
Utils::FilePath m_hostOutputFile; // On the device that runs creator
|
||||||
QSsh::SftpSessionPtr m_sftp;
|
|
||||||
QSsh::SftpJobId m_downloadJob = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Callgrind
|
} // namespace Callgrind
|
||||||
|
@@ -75,6 +75,7 @@
|
|||||||
|
|
||||||
#include <utils/fancymainwindow.h>
|
#include <utils/fancymainwindow.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
#include <utils/qtcprocess.h>
|
||||||
#include <utils/styledbar.h>
|
#include <utils/styledbar.h>
|
||||||
#include <utils/utilsicons.h>
|
#include <utils/utilsicons.h>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user