forked from qt-creator/qt-creator
Android: Make runconfiguration use aspects
Change-Id: I6d89de901e64b2f29d62073e458eb6cd86c44acd Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
@@ -27,36 +27,53 @@
|
||||
|
||||
#include "android_global.h"
|
||||
|
||||
#include "adbcommandswidget.h"
|
||||
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
#include <projectexplorer/runconfigurationaspects.h>
|
||||
|
||||
namespace Android {
|
||||
|
||||
class BaseStringListAspect : public ProjectExplorer::IRunConfigurationAspect
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BaseStringListAspect(ProjectExplorer::RunConfiguration *rc,
|
||||
const QString &settingsKey = QString(),
|
||||
Core::Id id = Core::Id());
|
||||
~BaseStringListAspect() override;
|
||||
|
||||
void addToConfigurationLayout(QFormLayout *layout) override;
|
||||
|
||||
QStringList value() const;
|
||||
void setValue(const QStringList &val);
|
||||
|
||||
void setLabel(const QString &label);
|
||||
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
|
||||
signals:
|
||||
void changed();
|
||||
|
||||
private:
|
||||
QStringList m_value;
|
||||
QString m_label;
|
||||
QPointer<Android::Internal::AdbCommandsWidget> m_widget; // Owned by RunConfigWidget
|
||||
};
|
||||
|
||||
class ANDROID_EXPORT AndroidRunConfiguration : public ProjectExplorer::RunConfiguration
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AndroidRunConfiguration(ProjectExplorer::Target *target, Core::Id id);
|
||||
|
||||
QString disabledReason() const override;
|
||||
QWidget *createConfigurationWidget() override;
|
||||
|
||||
bool fromMap(const QVariantMap &map) override;
|
||||
QVariantMap toMap() const override;
|
||||
QString disabledReason() const override;
|
||||
|
||||
const QStringList &amStartExtraArgs() const;
|
||||
const QStringList &preStartShellCommands() const;
|
||||
const QStringList &postFinishShellCommands() const;
|
||||
|
||||
private:
|
||||
// FIXME: This appears to miss a copyFrom() implementation.
|
||||
void setPreStartShellCommands(const QStringList &cmdList);
|
||||
void setPostFinishShellCommands(const QStringList &cmdList);
|
||||
void setAmStartExtraArgs(const QStringList &args);
|
||||
void updateTargetInformation();
|
||||
|
||||
QStringList m_amStartExtraArgs;
|
||||
QStringList m_preStartShellCommands;
|
||||
QStringList m_postFinishShellCommands;
|
||||
};
|
||||
|
||||
} // namespace Android
|
||||
|
||||
Reference in New Issue
Block a user