From 2509def164ee7f4aecbe6a786df57140f19e35f2 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sat, 14 Nov 2020 16:23:56 +0100 Subject: rbutil: Rework player configuration. - Split internal configuration into player specific and common parts. Always require passing the player for player specific data instead of implicitly assuming the currently selected one; only use the currently selected one if the player name is explicitly passed as empty. - Similarly adjust handling of server info data; prepare for splitting into build type specific values so the naming becomes cleaner. Change-Id: I894e694f83bd9fe2d22ad46b3f8f7df3e2c68033 --- rbutil/rbutilqt/rbutilqt.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'rbutil/rbutilqt/rbutilqt.cpp') diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 1c00ef9a07..6f8bfb37af 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp @@ -390,11 +390,11 @@ void RbUtilQt::updateDevice() /* Enable bootloader installation, if possible */ bool bootloaderInstallable = - SystemInfo::value(SystemInfo::CurBootloaderMethod) != "none"; + SystemInfo::platformValue(SystemInfo::CurBootloaderMethod) != "none"; /* Enable bootloader uninstallation, if possible */ bool bootloaderUninstallable = bootloaderInstallable && - SystemInfo::value(SystemInfo::CurBootloaderMethod) != "fwpatcher"; + SystemInfo::platformValue(SystemInfo::CurBootloaderMethod) != "fwpatcher"; ui.labelRemoveBootloader->setEnabled(bootloaderUninstallable); ui.buttonRemoveBootloader->setEnabled(bootloaderUninstallable); ui.actionRemove_bootloader->setEnabled(bootloaderUninstallable); @@ -405,10 +405,10 @@ void RbUtilQt::updateDevice() ui.menuA_ctions->setEnabled(configurationValid); // displayed device info - QString brand = SystemInfo::value(SystemInfo::CurBrand).toString(); + QString brand = SystemInfo::platformValue(SystemInfo::CurBrand).toString(); QString name - = QString("%1 (%2)").arg(SystemInfo::value(SystemInfo::CurName).toString(), - ServerInfo::value(ServerInfo::CurStatus).toString()); + = QString("%1 (%2)").arg(SystemInfo::platformValue(SystemInfo::CurName).toString(), + ServerInfo::platformValue(ServerInfo::CurStatus).toString()); ui.labelDevice->setText(QString("%1 %2").arg(brand, name)); QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString(); @@ -423,7 +423,7 @@ void RbUtilQt::updateDevice() } QPixmap pm; - QString m = SystemInfo::value(SystemInfo::CurPlayerPicture).toString(); + QString m = SystemInfo::platformValue(SystemInfo::CurPlayerPicture).toString(); pm.load(":/icons/players/" + m + "-small.png"); pm = pm.scaledToHeight(QFontMetrics(QApplication::font()).height() * 3); ui.labelPlayerPic->setPixmap(pm); @@ -491,7 +491,7 @@ void RbUtilQt::installVoice() QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return; - QString model = SystemInfo::value(SystemInfo::CurBuildserverModel).toString(); + QString model = SystemInfo::platformValue(SystemInfo::CurBuildserverModel).toString(); // replace placeholder in voice url voiceurl.replace("%MODEL%", model); voiceurl.replace("%RELVERSION%", relversion); @@ -560,14 +560,14 @@ void RbUtilQt::uninstallBootloader(void) // create installer BootloaderInstallBase *bl = BootloaderInstallHelper::createBootloaderInstaller(this, - SystemInfo::value(SystemInfo::CurBootloaderMethod).toString()); + SystemInfo::platformValue(SystemInfo::CurBootloaderMethod).toString()); if(bl == NULL) { logger->addItem(tr("No uninstall method for this target known."), LOGERROR); logger->setFinished(); return; } - QStringList blfile = SystemInfo::value(SystemInfo::CurBootloaderFile).toStringList(); + QStringList blfile = SystemInfo::platformValue(SystemInfo::CurBootloaderFile).toStringList(); QStringList blfilepath; for(int a = 0; a < blfile.size(); a++) { blfilepath.append(RbSettings::value(RbSettings::Mountpoint).toString() -- cgit v1.2.3