From 3ee6ce956fe714899322c6226008bd190441c76a Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Thu, 26 Nov 2020 22:41:51 +0100 Subject: 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 --- rbutil/rbutilqt/base/systeminfo.cpp | 1 - rbutil/rbutilqt/base/systeminfo.h | 1 - rbutil/rbutilqt/base/utils.cpp | 4 ++-- rbutil/rbutilqt/configure.cpp | 2 +- rbutil/rbutilqt/gui/selectiveinstallwidget.cpp | 2 +- 5 files changed, 4 insertions(+), 6 deletions(-) (limited to 'rbutil') diff --git a/rbutil/rbutilqt/base/systeminfo.cpp b/rbutil/rbutilqt/base/systeminfo.cpp index b0837438cb..b9a7602a5b 100644 --- a/rbutil/rbutilqt/base/systeminfo.cpp +++ b/rbutil/rbutilqt/base/systeminfo.cpp @@ -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", "" }, diff --git a/rbutil/rbutilqt/base/systeminfo.h b/rbutil/rbutilqt/base/systeminfo.h index 9bcfe6d253..1aef791975 100644 --- a/rbutil/rbutilqt/base/systeminfo.h +++ b/rbutil/rbutilqt/base/systeminfo.h @@ -64,7 +64,6 @@ class SystemInfo : public QObject }; enum PlatformInfo { - PlatformName, Manual, BootloaderMethod, BootloaderName, diff --git a/rbutil/rbutilqt/base/utils.cpp b/rbutil/rbutilqt/base/utils.cpp index 60b55068e1..83c189b8a2 100644 --- a/rbutil/rbutilqt/base/utils.cpp +++ b/rbutil/rbutilqt/base/utils.cpp @@ -385,8 +385,8 @@ QString Utils::checkEnvironment(bool permission) { text += tr("
  • Target mismatch detected.
    " "Installed target: %1
    Selected target: %2.
  • ") - .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()) diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp index 8115a86abc..b34379641e 100644 --- a/rbutil/rbutilqt/configure.cpp +++ b/rbutil/rbutilqt/configure.cpp @@ -742,7 +742,7 @@ void Config::autodetect() } msg += QString("
  • %1
  • ").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 += ""; diff --git a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp index 902f9861ed..3ac24666df 100644 --- a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp +++ b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp @@ -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("[:/]")); -- cgit v1.2.3