Add parsing for alwaysDownloadConfig and alwaysDownloadDC.
This commit is contained in:
parent
5ee1308c9d
commit
c15cebf503
@ -45,6 +45,14 @@ CommandLineParser::CommandLineParser()
|
|||||||
QCommandLineOption(
|
QCommandLineOption(
|
||||||
"no-psa-hardware-update",
|
"no-psa-hardware-update",
|
||||||
QCoreApplication::translate("main", "Do not update the PSA firmware (json, device-controller).")))
|
QCoreApplication::translate("main", "Do not update the PSA firmware (json, device-controller).")))
|
||||||
|
, m_alwaysDownloadConfigOption(
|
||||||
|
QCommandLineOption(
|
||||||
|
"always-download-config",
|
||||||
|
QCoreApplication::translate("main", "Always download the (json-)configs to DC).")))
|
||||||
|
, m_alwaysDownloadDCOption(
|
||||||
|
QCommandLineOption(
|
||||||
|
"always-download-dc",
|
||||||
|
QCoreApplication::translate("main", "Always download the dc-bin-file to DC).")))
|
||||||
, m_workingDirectoryOption(
|
, m_workingDirectoryOption(
|
||||||
QCommandLineOption(
|
QCommandLineOption(
|
||||||
QStringList() << "working-directory" << "working-directory",
|
QStringList() << "working-directory" << "working-directory",
|
||||||
@ -129,6 +137,12 @@ void CommandLineParser::readSettings() {
|
|||||||
if (key.contains("no-psa-hardware-update")) {
|
if (key.contains("no-psa-hardware-update")) {
|
||||||
m_noUpdatePsaHardware = (v.toBool() ? "true" : "false");
|
m_noUpdatePsaHardware = (v.toBool() ? "true" : "false");
|
||||||
} else
|
} else
|
||||||
|
if (key.contains("always-download-config")) {
|
||||||
|
m_alwaysDownloadConfig = (v.toBool() ? "true" : "false");
|
||||||
|
} else
|
||||||
|
if (key.contains("always-download-dc")) {
|
||||||
|
m_alwaysDownloadDC = (v.toBool() ? "true" : "false");
|
||||||
|
} else
|
||||||
if (key.contains("yocto-install")) {
|
if (key.contains("yocto-install")) {
|
||||||
m_showYoctoInstallStatus = (v.toBool() ? "true" : "false");
|
m_showYoctoInstallStatus = (v.toBool() ? "true" : "false");
|
||||||
} else
|
} else
|
||||||
@ -205,3 +219,17 @@ bool CommandLineParser::extendedVersion() {
|
|||||||
}
|
}
|
||||||
return m_showExtendedVersion == "false" ? false : true;
|
return m_showExtendedVersion == "false" ? false : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CommandLineParser::alwaysDownloadConfig() {
|
||||||
|
if (m_parser.isSet(m_alwaysDownloadConfigOption)) {
|
||||||
|
m_alwaysDownloadConfig = m_parser.value(m_alwaysDownloadConfigOption);
|
||||||
|
}
|
||||||
|
return m_alwaysDownloadConfig == "false" ? false : true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CommandLineParser::alwaysDownloadDC() {
|
||||||
|
if (m_parser.isSet(m_alwaysDownloadDCOption)) {
|
||||||
|
m_alwaysDownloadDC = m_parser.value(m_alwaysDownloadDCOption);
|
||||||
|
}
|
||||||
|
return m_alwaysDownloadDC == "false" ? false : true;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user