diff options
author | Christian Kandeler <[email protected]> | 2011-07-25 11:55:00 +0200 |
---|---|---|
committer | Christian Kandeler <[email protected]> | 2011-07-25 12:00:37 +0200 |
commit | 76a5b1953ca230d813340a9d536d636aacd0929b (patch) | |
tree | a166c2747df68719a01d110864f1acdae99a6f9b /src/plugins/remotelinux/remotelinuxdeployconfiguration.h | |
parent | 92d32becfcd7bebd97014835c53f33aa996fb88c (diff) |
RemoteLinux: Move constants and functions to more suitable locations.
Mostly to facilitate splitting up generic Linux und Maemo-specific
things.
Change-Id: I6072ae7deaea013219e8969d6a5254e6c5c96693
Reviewed-on: http://codereview.qt.nokia.com/2098
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/plugins/remotelinux/remotelinuxdeployconfiguration.h')
-rw-r--r-- | src/plugins/remotelinux/remotelinuxdeployconfiguration.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/remotelinux/remotelinuxdeployconfiguration.h b/src/plugins/remotelinux/remotelinuxdeployconfiguration.h index 2a817f68548..4647eadc0a4 100644 --- a/src/plugins/remotelinux/remotelinuxdeployconfiguration.h +++ b/src/plugins/remotelinux/remotelinuxdeployconfiguration.h @@ -35,6 +35,8 @@ #include "linuxdeviceconfiguration.h" #include "remotelinux_export.h" +#include <projectexplorer/buildstep.h> +#include <projectexplorer/buildsteplist.h> #include <projectexplorer/deployconfiguration.h> #include <QtCore/QSharedPointer> @@ -66,6 +68,18 @@ public: QSharedPointer<Internal::TypeSpecificDeviceConfigurationListModel> deviceConfigModel() const; QSharedPointer<const LinuxDeviceConfiguration> deviceConfiguration() const; + template<class T> T *earlierBuildStep(const ProjectExplorer::BuildStep *laterBuildStep) + { + const QList<ProjectExplorer::BuildStep *> &buildSteps = stepList()->steps(); + for (int i = 0; i < buildSteps.count(); ++i) { + if (buildSteps.at(i) == laterBuildStep) + return 0; + if (T * const step = dynamic_cast<T *>(buildSteps.at(i))) + return step; + } + return 0; + } + signals: void deviceConfigurationListChanged(); void currentDeviceConfigurationChanged(); |