forked from qt-creator/qt-creator
Re-inline some of the RunConfiguration::setUpdater()
... after the latest 4.11 -> master merge Change-Id: I04352c6bd83edc8853598b69570844714d1bb60a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -86,7 +86,15 @@ QdbRunConfiguration::QdbRunConfiguration(Target *target, Core::Id id)
|
|||||||
addAspect<WorkingDirectoryAspect>();
|
addAspect<WorkingDirectoryAspect>();
|
||||||
addAspect<FullCommandLineAspect>(this);
|
addAspect<FullCommandLineAspect>(this);
|
||||||
|
|
||||||
setUpdater([this] { 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::buildSystemUpdated, this, &RunConfiguration::update);
|
connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
|
||||||
|
|
||||||
setDefaultDisplayName(tr("Run on Boot2Qt Device"));
|
setDefaultDisplayName(tr("Run on Boot2Qt Device"));
|
||||||
@@ -102,16 +110,6 @@ Tasks QdbRunConfiguration::checkForIssues() const
|
|||||||
return tasks;
|
return tasks;
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
QString QdbRunConfiguration::defaultDisplayName() const
|
||||||
{
|
{
|
||||||
return RunConfigurationFactory::decoratedTargetName(buildKey(), target());
|
return RunConfigurationFactory::decoratedTargetName(buildKey(), target());
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ProjectExplorer::Tasks checkForIssues() const override;
|
ProjectExplorer::Tasks checkForIssues() const override;
|
||||||
void updateTargetInformation();
|
|
||||||
QString defaultDisplayName() const;
|
QString defaultDisplayName() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,15 @@ QnxRunConfiguration::QnxRunConfiguration(Target *target, Core::Id id)
|
|||||||
libAspect->setLabelText(tr("Path to Qt libraries on device"));
|
libAspect->setLabelText(tr("Path to Qt libraries on device"));
|
||||||
libAspect->setDisplayStyle(BaseStringAspect::LineEditDisplay);
|
libAspect->setDisplayStyle(BaseStringAspect::LineEditDisplay);
|
||||||
|
|
||||||
setUpdater([this] { 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);
|
||||||
|
emit enabledChanged();
|
||||||
|
});
|
||||||
|
|
||||||
connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
|
connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
|
||||||
}
|
}
|
||||||
@@ -88,17 +96,6 @@ Runnable QnxRunConfiguration::runnable() const
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QnxRunConfiguration::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);
|
|
||||||
emit enabledChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
// QnxRunConfigurationFactory
|
// QnxRunConfigurationFactory
|
||||||
|
|
||||||
QnxRunConfigurationFactory::QnxRunConfigurationFactory()
|
QnxRunConfigurationFactory::QnxRunConfigurationFactory()
|
||||||
|
|||||||
@@ -48,8 +48,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ProjectExplorer::Runnable runnable() const override;
|
ProjectExplorer::Runnable runnable() const override;
|
||||||
|
|
||||||
void updateTargetInformation();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class QnxRunConfigurationFactory final : public ProjectExplorer::RunConfigurationFactory
|
class QnxRunConfigurationFactory final : public ProjectExplorer::RunConfigurationFactory
|
||||||
|
|||||||
@@ -69,7 +69,16 @@ RemoteLinuxRunConfiguration::RemoteLinuxRunConfiguration(Target *target, Core::I
|
|||||||
if (HostOsInfo::isAnyUnixHost())
|
if (HostOsInfo::isAnyUnixHost())
|
||||||
addAspect<X11ForwardingAspect>();
|
addAspect<X11ForwardingAspect>();
|
||||||
|
|
||||||
setUpdater([this] { updateTargetInformation(); });
|
setUpdater([this, target, exeAspect, symbolsAspect] {
|
||||||
|
BuildTargetInfo bti = buildTargetInfo();
|
||||||
|
const FilePath localExecutable = bti.targetFilePath;
|
||||||
|
DeployableFile depFile = target->deploymentData().deployableForLocalFile(localExecutable);
|
||||||
|
|
||||||
|
exeAspect->setExecutable(FilePath::fromString(depFile.remoteFilePath()));
|
||||||
|
symbolsAspect->setFilePath(localExecutable);
|
||||||
|
|
||||||
|
emit enabledChanged();
|
||||||
|
});
|
||||||
|
|
||||||
connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
|
connect(target, &Target::buildSystemUpdated, this, &RunConfiguration::update);
|
||||||
connect(target, &Target::kitChanged, this, &RunConfiguration::update);
|
connect(target, &Target::kitChanged, this, &RunConfiguration::update);
|
||||||
@@ -84,18 +93,6 @@ Runnable RemoteLinuxRunConfiguration::runnable() const
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxRunConfiguration::updateTargetInformation()
|
|
||||||
{
|
|
||||||
BuildTargetInfo bti = buildTargetInfo();
|
|
||||||
const FilePath localExecutable = bti.targetFilePath;
|
|
||||||
DeployableFile depFile = target()->deploymentData().deployableForLocalFile(localExecutable);
|
|
||||||
|
|
||||||
aspect<ExecutableAspect>()->setExecutable(FilePath::fromString(depFile.remoteFilePath()));
|
|
||||||
aspect<SymbolFileAspect>()->setFilePath(localExecutable);
|
|
||||||
|
|
||||||
emit enabledChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
// RemoteLinuxRunConfigurationFactory
|
// RemoteLinuxRunConfigurationFactory
|
||||||
|
|
||||||
RemoteLinuxRunConfigurationFactory::RemoteLinuxRunConfigurationFactory()
|
RemoteLinuxRunConfigurationFactory::RemoteLinuxRunConfigurationFactory()
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ProjectExplorer::Runnable runnable() const override;
|
ProjectExplorer::Runnable runnable() const override;
|
||||||
void updateTargetInformation();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RemoteLinuxRunConfigurationFactory final : public ProjectExplorer::RunConfigurationFactory
|
class RemoteLinuxRunConfigurationFactory final : public ProjectExplorer::RunConfigurationFactory
|
||||||
|
|||||||
Reference in New Issue
Block a user