diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2016-05-02 16:04:45 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2017-08-02 11:18:52 +0000 |
commit | ef2f2804a1062d72d10a7456afd394557e334c9e (patch) | |
tree | 1d61dd76d4a29b982e1b2e592f7e9b29176fb9b7 /src/plugins/projectexplorer/target.cpp | |
parent | 90e40f932d89af9d9e59951d5320da4656db2600 (diff) |
ProjectConfiguration: Add isActive() method
Returns true if the ProjectConfiguration element is currently active
and false otherwise.
Just a convenience method.
Change-Id: If75809ae7e78149d264deaaf6adc4ca8a8be43c2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/target.cpp')
-rw-r--r-- | src/plugins/projectexplorer/target.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/target.cpp b/src/plugins/projectexplorer/target.cpp index d27b894bcc..419545bda5 100644 --- a/src/plugins/projectexplorer/target.cpp +++ b/src/plugins/projectexplorer/target.cpp @@ -209,6 +209,11 @@ void Target::handleKitRemoval(Kit *k) project()->removeTarget(this); } +bool Target::isActive() const +{ + return project()->activeTarget() == this; +} + Project *Target::project() const { return static_cast<Project *>(parent()); |