blob: fc1ed1313573bc0bf3a9492803efcff5f22d67bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include "buildstep.h"
#include <QProcess>
namespace Utils {
class CommandLine;
enum class ProcessResult;
class Process;
}
namespace Tasking { class Group; }
namespace ProjectExplorer {
class ProcessParameters;
// Documentation inside.
class PROJECTEXPLORER_EXPORT AbstractProcessStep : public BuildStep
{
Q_OBJECT
public:
ProcessParameters *processParameters();
bool setupProcessParameters(ProcessParameters *params) const;
bool ignoreReturnValue() const;
void setIgnoreReturnValue(bool b);
void setCommandLineProvider(const std::function<Utils::CommandLine()> &provider);
void setWorkingDirectoryProvider(const std::function<Utils::FilePath()> &provider);
void setEnvironmentModifier(const std::function<void(Utils::Environment &)> &modifier);
void setUseEnglishOutput();
void emitFaultyConfigurationMessage();
protected:
AbstractProcessStep(BuildStepList *bsl, Utils::Id id);
~AbstractProcessStep() override;
bool init() override;
void setupOutputFormatter(Utils::OutputFormatter *formatter) override;
void doRun() override;
void doCancel() override;
void setLowPriority();
void setDisplayedParameters(ProcessParameters *params);
bool isSuccess(Utils::ProcessResult result) const;
virtual void finish(Utils::ProcessResult result);
bool checkWorkingDirectory();
void setupProcess(Utils::Process *process);
void runTaskTree(const Tasking::Group &recipe);
ProcessParameters *displayedParameters() const;
private:
void setupStreams();
void processStartupFailed();
void handleProcessDone();
class Private;
Private *d;
};
} // namespace ProjectExplorer
|