ProjectExplorer: Add some ToolRunner convenience functions

Replicate parts of RunControl's read-only interface for
simpler user code.

Change-Id: Ic0f2efc0a7a0b96d26c5817f7fbc18b0c91a013b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-05-04 08:44:28 +02:00
parent 5d8d3fbdc7
commit 20cacb4a8a
2 changed files with 14 additions and 0 deletions

View File

@@ -1305,6 +1305,16 @@ IDevice::ConstPtr ToolRunner::device() const
return m_runControl->device(); return m_runControl->device();
} }
const Runnable &ToolRunner::runnable() const
{
return m_runControl->runnable();
}
const Connection &ToolRunner::connection() const
{
return m_runControl->connection();
}
void ToolRunner::prepare() void ToolRunner::prepare()
{ {
reportPrepared(); reportPrepared();

View File

@@ -499,8 +499,12 @@ public:
explicit ToolRunner(RunControl *runControl); explicit ToolRunner(RunControl *runControl);
RunControl *runControl() const; RunControl *runControl() const;
// Part of read-only interface of RunControl for convenience.
void appendMessage(const QString &msg, Utils::OutputFormat format); void appendMessage(const QString &msg, Utils::OutputFormat format);
IDevice::ConstPtr device() const; IDevice::ConstPtr device() const;
const Runnable &runnable() const;
const Connection &connection() const;
// Preparation phase. // Preparation phase.
virtual void prepare(); // Initiates preparation, needs to report success or failure. virtual void prepare(); // Initiates preparation, needs to report success or failure.