Fix lupdate issues

Change-Id: Ib0cbb96a1a4857db5724f9d1e316b97bf2827dbd
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Eike Ziller
2019-11-01 12:21:53 +01:00
parent 7d14132c8c
commit 34e8f58c47
13 changed files with 53 additions and 40 deletions

View File

@@ -57,29 +57,26 @@ static CommandLine flashAndRunCommand(Target *target)
});
}
class FlashAndRunConfiguration : public ProjectExplorer::RunConfiguration
FlashAndRunConfiguration::FlashAndRunConfiguration(Target *target, Core::Id id)
: RunConfiguration(target, id)
{
public:
FlashAndRunConfiguration(Target *target, Core::Id id)
: RunConfiguration(target, id)
{
auto effectiveFlashAndRunCall = addAspect<BaseStringAspect>();
effectiveFlashAndRunCall->setLabelText(tr("Effective flash and run call:"));
effectiveFlashAndRunCall->setDisplayStyle(BaseStringAspect::TextEditDisplay);
effectiveFlashAndRunCall->setReadOnly(true);
auto effectiveFlashAndRunCall = addAspect<BaseStringAspect>();
effectiveFlashAndRunCall->setLabelText(tr("Effective flash and run call:"));
effectiveFlashAndRunCall->setDisplayStyle(BaseStringAspect::TextEditDisplay);
effectiveFlashAndRunCall->setReadOnly(true);
auto updateConfiguration = [target, effectiveFlashAndRunCall] {
effectiveFlashAndRunCall->setValue(flashAndRunCommand(target).toUserOutput());
};
auto updateConfiguration = [target, effectiveFlashAndRunCall] {
effectiveFlashAndRunCall->setValue(flashAndRunCommand(target).toUserOutput());
};
updateConfiguration();
updateConfiguration();
connect(target->activeBuildConfiguration(), &BuildConfiguration::buildDirectoryChanged,
this, updateConfiguration);
connect(target->project(), &Project::displayNameChanged,
this, updateConfiguration);
}
};
connect(target->activeBuildConfiguration(),
&BuildConfiguration::buildDirectoryChanged,
this,
updateConfiguration);
connect(target->project(), &Project::displayNameChanged, this, updateConfiguration);
}
class FlashAndRunWorker : public SimpleTargetRunner
{