forked from qt-creator/qt-creator
MesonProcess: Remove unused methods, signals and fields
Change-Id: Ic1a25e3800b6938fc3cea23a02f582f1e73c058f Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -36,9 +36,7 @@ bool MesonProcess::run(const Command &command,
|
||||
{
|
||||
if (!sanityCheck(command))
|
||||
return false;
|
||||
m_currentCommand = command;
|
||||
m_stdo.clear();
|
||||
m_processWasCanceled = false;
|
||||
m_future = decltype(m_future){};
|
||||
ProjectExplorer::TaskHub::clearTasks(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM);
|
||||
setupProcess(command, env, captureStdo);
|
||||
@@ -47,7 +45,6 @@ bool MesonProcess::run(const Command &command,
|
||||
Tr::tr("Configuring \"%1\".").arg(projectName),
|
||||
"Meson.Configure",
|
||||
10);
|
||||
emit started();
|
||||
m_elapsed.start();
|
||||
m_process->start();
|
||||
m_cancelTimer.start(500);
|
||||
@@ -55,26 +52,6 @@ bool MesonProcess::run(const Command &command,
|
||||
return true;
|
||||
}
|
||||
|
||||
QProcess::ProcessState MesonProcess::state() const
|
||||
{
|
||||
return m_process->state();
|
||||
}
|
||||
|
||||
void MesonProcess::reportCanceled()
|
||||
{
|
||||
m_future.reportCanceled();
|
||||
}
|
||||
|
||||
void MesonProcess::reportFinished()
|
||||
{
|
||||
m_future.reportFinished();
|
||||
}
|
||||
|
||||
void MesonProcess::setProgressValue(int p)
|
||||
{
|
||||
m_future.setProgressValue(p);
|
||||
}
|
||||
|
||||
void MesonProcess::handleProcessDone()
|
||||
{
|
||||
if (m_process->result() != ProcessResult::FinishedWithSuccess) {
|
||||
@@ -100,7 +77,6 @@ void MesonProcess::checkForCancelled()
|
||||
{
|
||||
if (m_future.isCanceled()) {
|
||||
m_cancelTimer.stop();
|
||||
m_processWasCanceled = true;
|
||||
m_process->close();
|
||||
}
|
||||
}
|
||||
|
@@ -29,17 +29,9 @@ public:
|
||||
const QString &projectName,
|
||||
bool captureStdo = false);
|
||||
|
||||
QProcess::ProcessState state() const;
|
||||
|
||||
// Update progress information:
|
||||
void reportCanceled();
|
||||
void reportFinished();
|
||||
void setProgressValue(int p);
|
||||
|
||||
const QByteArray &stdOut() const { return m_stdo; }
|
||||
const QByteArray &stdErr() const { return m_stderr; }
|
||||
signals:
|
||||
void started();
|
||||
void finished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void readyReadStandardOutput(const QByteArray &data);
|
||||
|
||||
@@ -55,12 +47,10 @@ private:
|
||||
|
||||
std::unique_ptr<Utils::QtcProcess> m_process;
|
||||
QFutureInterface<void> m_future;
|
||||
bool m_processWasCanceled = false;
|
||||
QTimer m_cancelTimer;
|
||||
QElapsedTimer m_elapsed;
|
||||
QByteArray m_stdo;
|
||||
QByteArray m_stderr;
|
||||
Command m_currentCommand;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
Reference in New Issue
Block a user