rbutil: Remove duplicated enum entry.

SystemInfo::PlatformName and Name actually retrieve the same value.
That's not usefule, so remove one of both.

Change-Id: I8ee429f099588e0e1e8129302542cd0f6f836203
This commit is contained in:
Dominik Riebeling 2020-11-26 22:41:51 +01:00
parent 185dfb42c2
commit 3ee6ce956f
5 changed files with 4 additions and 6 deletions

View file

@ -51,7 +51,6 @@ const static struct {
const char* name;
const char* def;
} PlatformInfosList[] = {
{ SystemInfo::PlatformName, ":platform:/name", "" },
{ SystemInfo::Manual, ":platform:/manualname", ":platform:" },
{ SystemInfo::BootloaderMethod, ":platform:/bootloadermethod", "none" },
{ SystemInfo::BootloaderName, ":platform:/bootloadername", "" },

View file

@ -64,7 +64,6 @@ class SystemInfo : public QObject
};
enum PlatformInfo {
PlatformName,
Manual,
BootloaderMethod,
BootloaderName,

View file

@ -385,8 +385,8 @@ QString Utils::checkEnvironment(bool permission)
{
text += tr("<li>Target mismatch detected.<br/>"
"Installed target: %1<br/>Selected target: %2.</li>")
.arg(SystemInfo::platformValue(SystemInfo::PlatformName, installed).toString(),
SystemInfo::platformValue(SystemInfo::PlatformName).toString());
.arg(SystemInfo::platformValue(SystemInfo::Name, installed).toString(),
SystemInfo::platformValue(SystemInfo::Name).toString());
}
if(!text.isEmpty())

View file

@ -742,7 +742,7 @@ void Config::autodetect()
}
msg += QString("<li>%1</li>").arg(tr("%1 at %2").arg(
SystemInfo::platformValue(
SystemInfo::PlatformName, detected.at(i).device).toString(),
SystemInfo::Name, detected.at(i).device).toString(),
QDir::toNativeSeparators(mp)));
}
msg += "</ul>";

View file

@ -340,7 +340,7 @@ void SelectiveInstallWidget::installBootloader(void)
else if(bl->installed() == BootloaderInstallBase::BootloaderOther
&& bl->capabilities() & BootloaderInstallBase::Backup)
{
QString targetFolder = SystemInfo::platformValue(SystemInfo::PlatformName).toString()
QString targetFolder = SystemInfo::platformValue(SystemInfo::Name).toString()
+ " Firmware Backup";
// remove invalid character(s)
targetFolder.remove(QRegExp("[:/]"));