diff options
author | hjk <hjk@qt.io> | 2019-11-25 18:40:12 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-11-27 08:06:51 +0000 |
commit | 300a022bcdf761a331e59853509587a119d1596e (patch) | |
tree | 90040a7633b5ae7d0f78e20214586623a134c65c /src/plugins/boot2qt | |
parent | 6b4a0ed47d121f2cb58966c1e05d989097a1d4fc (diff) |
Qdb: use new runconfiguration aspect update mechanism
Change-Id: Ib8822ac62d364bbbe8b9fd61b238c841dc39a777
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/boot2qt')
-rw-r--r-- | src/plugins/boot2qt/qdbrunconfiguration.cpp | 25 | ||||
-rw-r--r-- | src/plugins/boot2qt/qdbrunconfiguration.h | 1 |
2 files changed, 11 insertions, 15 deletions
diff --git a/src/plugins/boot2qt/qdbrunconfiguration.cpp b/src/plugins/boot2qt/qdbrunconfiguration.cpp index 05c63fd4249..f7b19f19872 100644 --- a/src/plugins/boot2qt/qdbrunconfiguration.cpp +++ b/src/plugins/boot2qt/qdbrunconfiguration.cpp @@ -86,10 +86,17 @@ QdbRunConfiguration::QdbRunConfiguration(Target *target, Core::Id id) addAspect<WorkingDirectoryAspect>(); addAspect<FullCommandLineAspect>(this); - connect(target, &Target::kitChanged, - this, &QdbRunConfiguration::updateTargetInformation); - connect(target, &Target::buildSystemUpdated, - this, &QdbRunConfiguration::updateTargetInformation); + setUpdater([this, target, exeAspect, symbolsAspect] { + const BuildTargetInfo bti = buildTargetInfo(); + const FilePath localExecutable = bti.targetFilePath; + const DeployableFile depFile = target->deploymentData().deployableForLocalFile(localExecutable); + + exeAspect->setExecutable(FilePath::fromString(depFile.remoteFilePath())); + symbolsAspect->setFilePath(localExecutable); + }); + + connect(target, &Target::kitChanged, this, &RunConfiguration::update); + connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update); setDefaultDisplayName(tr("Run on Boot2Qt Device")); } @@ -107,16 +114,6 @@ ProjectExplorer::RunConfiguration::ConfigurationState QdbRunConfiguration::ensur return Configured; } -void QdbRunConfiguration::updateTargetInformation() -{ - const BuildTargetInfo bti = buildTargetInfo(); - const FilePath localExecutable = bti.targetFilePath; - const DeployableFile depFile = target()->deploymentData().deployableForLocalFile(localExecutable); - - aspect<ExecutableAspect>()->setExecutable(FilePath::fromString(depFile.remoteFilePath())); - aspect<SymbolFileAspect>()->setFilePath(localExecutable); -} - QString QdbRunConfiguration::defaultDisplayName() const { return RunConfigurationFactory::decoratedTargetName(buildKey(), target()); diff --git a/src/plugins/boot2qt/qdbrunconfiguration.h b/src/plugins/boot2qt/qdbrunconfiguration.h index 0099c63b5ea..9d31669f654 100644 --- a/src/plugins/boot2qt/qdbrunconfiguration.h +++ b/src/plugins/boot2qt/qdbrunconfiguration.h @@ -48,7 +48,6 @@ public: ConfigurationState ensureConfigured(QString *errorMessage) override; private: - void updateTargetInformation(); QString defaultDisplayName() const; }; |