diff --git a/src/plugins/boot2qt/qdbrunconfiguration.cpp b/src/plugins/boot2qt/qdbrunconfiguration.cpp index 97aa4a01e57..dbeb9e9e156 100644 --- a/src/plugins/boot2qt/qdbrunconfiguration.cpp +++ b/src/plugins/boot2qt/qdbrunconfiguration.cpp @@ -44,27 +44,46 @@ namespace Internal { // FullCommandLineAspect -FullCommandLineAspect::FullCommandLineAspect(RunConfiguration *rc) +class FullCommandLineAspect : public BaseStringAspect { - setLabelText(QdbRunConfiguration::tr("Full command line:")); + Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbRunConfiguration); - auto exeAspect = rc->aspect(); - auto argumentsAspect = rc->aspect(); +public: + explicit FullCommandLineAspect(RunConfiguration *rc) + { + setLabelText(tr("Full command line:")); - auto updateCommandLine = [this, rc, exeAspect, argumentsAspect] { - const QString usedExecutable = exeAspect->executable().toString(); - const QString args = argumentsAspect->arguments(rc->macroExpander()); - setValue(QString(Constants::AppcontrollerFilepath) - + ' ' + usedExecutable + ' ' + args); - }; + auto exeAspect = rc->aspect(); + auto argumentsAspect = rc->aspect(); + + auto updateCommandLine = [this, rc, exeAspect, argumentsAspect] { + const QString usedExecutable = exeAspect->executable().toString(); + const QString args = argumentsAspect->arguments(rc->macroExpander()); + setValue(QString(Constants::AppcontrollerFilepath) + + ' ' + usedExecutable + ' ' + args); + }; + + connect(argumentsAspect, &ArgumentsAspect::argumentsChanged, this, updateCommandLine); + connect(exeAspect, &ExecutableAspect::changed, this, updateCommandLine); + updateCommandLine(); + } +}; - connect(argumentsAspect, &ArgumentsAspect::argumentsChanged, this, updateCommandLine); - connect(exeAspect, &ExecutableAspect::changed, this, updateCommandLine); - updateCommandLine(); -} // QdbRunConfiguration +class QdbRunConfiguration : public RunConfiguration +{ + Q_DECLARE_TR_FUNCTIONS(Qdb::Internal::QdbRunConfiguration); + +public: + QdbRunConfiguration(Target *target, Core::Id id); + +private: + Tasks checkForIssues() const override; + QString defaultDisplayName() const; +}; + QdbRunConfiguration::QdbRunConfiguration(Target *target, Core::Id id) : RunConfiguration(target, id) { diff --git a/src/plugins/boot2qt/qdbrunconfiguration.h b/src/plugins/boot2qt/qdbrunconfiguration.h index 0804d269eda..a9a81c3c1d5 100644 --- a/src/plugins/boot2qt/qdbrunconfiguration.h +++ b/src/plugins/boot2qt/qdbrunconfiguration.h @@ -30,26 +30,6 @@ namespace Qdb { namespace Internal { -class FullCommandLineAspect : public ProjectExplorer::BaseStringAspect -{ - Q_OBJECT - -public: - explicit FullCommandLineAspect(ProjectExplorer::RunConfiguration *rc); -}; - -class QdbRunConfiguration : public ProjectExplorer::RunConfiguration -{ - Q_OBJECT - -public: - QdbRunConfiguration(ProjectExplorer::Target *target, Core::Id id); - -private: - ProjectExplorer::Tasks checkForIssues() const override; - QString defaultDisplayName() const; -}; - class QdbRunConfigurationFactory : public ProjectExplorer::RunConfigurationFactory { public: