forked from qt-creator/qt-creator
Qdb: De-Q_OBJECT-ify RunConfiguration
Change-Id: Ib632cb135915561682f68c0c37e0c3fefe92c0bb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -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<ExecutableAspect>();
|
||||
auto argumentsAspect = rc->aspect<ArgumentsAspect>();
|
||||
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<ExecutableAspect>();
|
||||
auto argumentsAspect = rc->aspect<ArgumentsAspect>();
|
||||
|
||||
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)
|
||||
{
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user