rbutil: Rework player configuration.

Rename config entries and remove now unnecessary default value handling.

Change-Id: I5c60ef9769fc01f45f45290dafffb80c1962e674
This commit is contained in:
Dominik Riebeling 2020-11-14 16:33:48 +01:00
parent 2509def164
commit be1be797b2
14 changed files with 84 additions and 88 deletions

View file

@ -108,7 +108,7 @@ void Autodetection::detectUsb()
LOG_WARNING() << "[USB] detected problem with player" << d.device; LOG_WARNING() << "[USB] detected problem with player" << d.device;
} }
QString idstring = QString("%1").arg(attached.at(i), 8, 16, QChar('0')); QString idstring = QString("%1").arg(attached.at(i), 8, 16, QChar('0'));
if(!SystemInfo::platformValue(SystemInfo::CurName, idstring).toString().isEmpty()) { if(!SystemInfo::platformValue(SystemInfo::Name, idstring).toString().isEmpty()) {
struct Detected d; struct Detected d;
d.status = PlayerIncompatible; d.status = PlayerIncompatible;
d.device = idstring; d.device = idstring;

View file

@ -409,7 +409,7 @@ BootloaderInstallBase::BootloaderType BootloaderInstallS5l::installed(void)
+ "/.rockbox/rbutil.log"; + "/.rockbox/rbutil.log";
QSettings s(logfile, QSettings::IniFormat, this); QSettings s(logfile, QSettings::IniFormat, this);
QString section = SystemInfo::platformValue( QString section = SystemInfo::platformValue(
SystemInfo::CurBootloaderName).toString().section('/', -1); SystemInfo::BootloaderName).toString().section('/', -1);
rbblInstalled = s.contains("Bootloader/" + section); rbblInstalled = s.contains("Bootloader/" + section);
if (rbblInstalled) { if (rbblInstalled) {

View file

@ -194,7 +194,7 @@ QString RbSettings::constructSettingPath(QString path, QString substitute)
} }
else { else {
path.replace(":tts:", userSettings->value("tts").toString()); path.replace(":tts:", userSettings->value("tts").toString());
path.replace(":encoder:", SystemInfo::platformValue(SystemInfo::CurEncoder, platform).toString()); path.replace(":encoder:", SystemInfo::platformValue(SystemInfo::Encoder, platform).toString());
} }
path.replace(":platform:", platform); path.replace(":platform:", platform);
} }

View file

@ -136,9 +136,9 @@ void ServerInfo::readBuildInfo(QString file)
QString manualZipUrl = manualBaseUrl; QString manualZipUrl = manualBaseUrl;
QString buildservermodel = SystemInfo::platformValue( QString buildservermodel = SystemInfo::platformValue(
SystemInfo::CurBuildserverModel, platforms.at(i)).toString(); SystemInfo::BuildserverModel, platforms.at(i)).toString();
QString modelman = SystemInfo::platformValue( QString modelman = SystemInfo::platformValue(
SystemInfo::CurManual, platforms.at(i)).toString(); SystemInfo::Manual, platforms.at(i)).toString();
QString manualBaseName = "rockbox-"; QString manualBaseName = "rockbox-";
if(modelman.isEmpty()) manualBaseName += buildservermodel; if(modelman.isEmpty()) manualBaseName += buildservermodel;

View file

@ -49,8 +49,6 @@ class ServerInfo : public QObject
static QVariant platformValue(enum ServerInfos setting, QString platform = ""); static QVariant platformValue(enum ServerInfos setting, QString platform = "");
private: private:
//! set a server info value
static void setValue(enum ServerInfos setting, QVariant value);
//! set a value for a server info for a named platform. //! set a value for a server info for a named platform.
static void setPlatformValue(enum ServerInfos setting, QString platform, QVariant value); static void setPlatformValue(enum ServerInfos setting, QString platform, QVariant value);
//! you shouldnt call this, its a fully static class //! you shouldnt call this, its a fully static class

View file

@ -26,29 +26,28 @@
const static struct { const static struct {
SystemInfo::SystemInfos info; SystemInfo::SystemInfos info;
const char* name; const char* name;
const char* def;
} SystemInfosList[] = { } SystemInfosList[] = {
{ SystemInfo::ManualUrl, "manual_url", "" }, { SystemInfo::ManualUrl, "manual_url" },
{ SystemInfo::BleedingUrl, "bleeding_url", "" }, { SystemInfo::BleedingUrl, "bleeding_url" },
{ SystemInfo::BootloaderUrl, "bootloader_url", "" }, { SystemInfo::BootloaderUrl, "bootloader_url" },
{ SystemInfo::BootloaderInfoUrl, "bootloader_info_url", "" }, { SystemInfo::BootloaderInfoUrl, "bootloader_info_url" },
{ SystemInfo::ReleaseFontUrl, "release_font_url", "" }, { SystemInfo::ReleaseFontUrl, "release_font_url" },
{ SystemInfo::DailyFontUrl, "daily_font_url", "" }, { SystemInfo::DailyFontUrl, "daily_font_url" },
{ SystemInfo::DailyVoiceUrl, "daily_voice_url", "" }, { SystemInfo::DailyVoiceUrl, "daily_voice_url" },
{ SystemInfo::ReleaseVoiceUrl, "release_voice_url", "" }, { SystemInfo::ReleaseVoiceUrl, "release_voice_url" },
{ SystemInfo::DoomUrl, "doom_url", "" }, { SystemInfo::DoomUrl, "doom_url" },
{ SystemInfo::Duke3DUrl, "duke3d_url", "" }, { SystemInfo::Duke3DUrl, "duke3d_url" },
{ SystemInfo::PuzzFontsUrl, "puzzfonts_url", "" }, { SystemInfo::PuzzFontsUrl, "puzzfonts_url" },
{ SystemInfo::QuakeUrl, "quake_url", "" }, { SystemInfo::QuakeUrl, "quake_url" },
{ SystemInfo::Wolf3DUrl, "wolf3d_url", "" }, { SystemInfo::Wolf3DUrl, "wolf3d_url" },
{ SystemInfo::XWorldUrl, "xworld_url", "" }, { SystemInfo::XWorldUrl, "xworld_url" },
{ SystemInfo::ReleaseUrl, "release_url", "" }, { SystemInfo::ReleaseUrl, "release_url" },
{ SystemInfo::DailyUrl, "daily_url", "" }, { SystemInfo::DailyUrl, "daily_url" },
{ SystemInfo::BuildInfoUrl, "build_info_url", "" }, { SystemInfo::BuildInfoUrl, "build_info_url" },
{ SystemInfo::GenlangUrl, "genlang_url", "" }, { SystemInfo::GenlangUrl, "genlang_url" },
{ SystemInfo::ThemesUrl, "themes_url", "" }, { SystemInfo::ThemesUrl, "themes_url" },
{ SystemInfo::ThemesInfoUrl, "themes_info_url", "" }, { SystemInfo::ThemesInfoUrl, "themes_info_url" },
{ SystemInfo::RbutilUrl, "rbutil_url", "" }, { SystemInfo::RbutilUrl, "rbutil_url" },
}; };
const static struct { const static struct {
@ -56,18 +55,18 @@ const static struct {
const char* name; const char* name;
const char* def; const char* def;
} PlatformInfosList[] = { } PlatformInfosList[] = {
{ SystemInfo::CurPlatformName, ":platform:/name", "" }, { SystemInfo::PlatformName, ":platform:/name", "" },
{ SystemInfo::CurManual, ":platform:/manualname","rockbox-:platform:" }, { SystemInfo::Manual, ":platform:/manualname","rockbox-:platform:" },
{ SystemInfo::CurBootloaderMethod, ":platform:/bootloadermethod", "none" }, { SystemInfo::BootloaderMethod, ":platform:/bootloadermethod", "none" },
{ SystemInfo::CurBootloaderName, ":platform:/bootloadername", "" }, { SystemInfo::BootloaderName, ":platform:/bootloadername", "" },
{ SystemInfo::CurBootloaderFile, ":platform:/bootloaderfile", "" }, { SystemInfo::BootloaderFile, ":platform:/bootloaderfile", "" },
{ SystemInfo::CurBootloaderFilter, ":platform:/bootloaderfilter", "" }, { SystemInfo::BootloaderFilter, ":platform:/bootloaderfilter", "" },
{ SystemInfo::CurEncoder, ":platform:/encoder", "" }, { SystemInfo::Encoder, ":platform:/encoder", "" },
{ SystemInfo::CurBrand, ":platform:/brand", "" }, { SystemInfo::Brand, ":platform:/brand", "" },
{ SystemInfo::CurName, ":platform:/name", "" }, { SystemInfo::Name, ":platform:/name", "" },
{ SystemInfo::CurBuildserverModel, ":platform:/buildserver_modelname", "" }, { SystemInfo::BuildserverModel, ":platform:/buildserver_modelname", "" },
{ SystemInfo::CurConfigureModel, ":platform:/configure_modelname", "" }, { SystemInfo::ConfigureModel, ":platform:/configure_modelname", "" },
{ SystemInfo::CurPlayerPicture, ":platform:/playerpic", "" }, { SystemInfo::PlayerPicture, ":platform:/playerpic", "" },
}; };
//! pointer to setting object to NULL //! pointer to setting object to NULL
@ -93,9 +92,8 @@ QVariant SystemInfo::value(enum SystemInfos info)
while(SystemInfosList[i].info != info) while(SystemInfosList[i].info != info)
i++; i++;
QString s = SystemInfosList[i].name; QString s = SystemInfosList[i].name;
QString d = SystemInfosList[i].def; LOG_INFO() << "GET:" << s << systemInfos->value(s).toString();
LOG_INFO() << "GET:" << s << systemInfos->value(s, d).toString(); return systemInfos->value(s);
return systemInfos->value(s, d);
} }
QVariant SystemInfo::platformValue(enum PlatformInfo info, QString platform) QVariant SystemInfo::platformValue(enum PlatformInfo info, QString platform)

View file

@ -60,18 +60,18 @@ class SystemInfo : public QObject
}; };
enum PlatformInfo { enum PlatformInfo {
CurPlatformName, PlatformName,
CurManual, Manual,
CurBootloaderMethod, BootloaderMethod,
CurBootloaderName, BootloaderName,
CurBootloaderFile, BootloaderFile,
CurBootloaderFilter, BootloaderFilter,
CurEncoder, Encoder,
CurBrand, Brand,
CurName, Name,
CurBuildserverModel, BuildserverModel,
CurConfigureModel, ConfigureModel,
CurPlayerPicture, PlayerPicture,
}; };
enum PlatformType { enum PlatformType {

View file

@ -57,7 +57,7 @@ TalkGenerator::Status TalkGenerator::process(QList<TalkEntry>* list,int wavtrimt
// Encoder // Encoder
emit logItem(tr("Starting Encoder Engine"),LOGINFO); emit logItem(tr("Starting Encoder Engine"),LOGINFO);
m_enc = EncoderBase::getEncoder( m_enc = EncoderBase::getEncoder(
this, SystemInfo::platformValue(SystemInfo::CurEncoder).toString()); this, SystemInfo::platformValue(SystemInfo::Encoder).toString());
if(!m_enc->start()) if(!m_enc->start())
{ {
emit logItem(tr("Init of Encoder engine failed"),LOGERROR); emit logItem(tr("Init of Encoder engine failed"),LOGERROR);

View file

@ -381,12 +381,12 @@ QString Utils::checkEnvironment(bool permission)
RockboxInfo rbinfo(RbSettings::value(RbSettings::Mountpoint).toString()); RockboxInfo rbinfo(RbSettings::value(RbSettings::Mountpoint).toString());
QString installed = rbinfo.target(); QString installed = rbinfo.target();
if(!installed.isEmpty() && installed != if(!installed.isEmpty() && installed !=
SystemInfo::platformValue(SystemInfo::CurConfigureModel).toString()) SystemInfo::platformValue(SystemInfo::ConfigureModel).toString())
{ {
text += tr("<li>Target mismatch detected.<br/>" text += tr("<li>Target mismatch detected.<br/>"
"Installed target: %1<br/>Selected target: %2.</li>") "Installed target: %1<br/>Selected target: %2.</li>")
.arg(SystemInfo::platformValue(SystemInfo::CurPlatformName, installed).toString(), .arg(SystemInfo::platformValue(SystemInfo::PlatformName, installed).toString(),
SystemInfo::platformValue(SystemInfo::CurPlatformName).toString()); SystemInfo::platformValue(SystemInfo::PlatformName).toString());
} }
if(!text.isEmpty()) if(!text.isEmpty())

View file

@ -356,7 +356,7 @@ void Config::setDevices()
for(int it = 0; it < platformList.size(); it++) for(int it = 0; it < platformList.size(); it++)
{ {
QString curbrand = SystemInfo::platformValue( QString curbrand = SystemInfo::platformValue(
SystemInfo::CurBrand, platformList.at(it)).toString(); SystemInfo::Brand, platformList.at(it)).toString();
manuf.insert(curbrand, platformList.at(it)); manuf.insert(curbrand, platformList.at(it));
} }
@ -385,7 +385,7 @@ void Config::setDevices()
continue; continue;
// construct display name // construct display name
QString curname = SystemInfo::platformValue( QString curname = SystemInfo::platformValue(
SystemInfo::CurName, platformList.at(it)).toString() + SystemInfo::Name, platformList.at(it)).toString() +
" (" +ServerInfo::platformValue( " (" +ServerInfo::platformValue(
ServerInfo::CurStatus, platformList.at(it)).toString() +")"; ServerInfo::CurStatus, platformList.at(it)).toString() +")";
LOG_INFO() << "add supported device:" << brands.at(c) << curname; LOG_INFO() << "add supported device:" << brands.at(c) << curname;
@ -472,9 +472,9 @@ void Config::updateEncState()
QString devname = ui.treeDevices->selectedItems().at(0)->data(0, Qt::UserRole).toString(); QString devname = ui.treeDevices->selectedItems().at(0)->data(0, Qt::UserRole).toString();
QString encoder = SystemInfo::platformValue( QString encoder = SystemInfo::platformValue(
SystemInfo::CurEncoder, devname).toString(); SystemInfo::Encoder, devname).toString();
ui.encoderName->setText(EncoderBase::getEncoderName(SystemInfo::platformValue( ui.encoderName->setText(EncoderBase::getEncoderName(SystemInfo::platformValue(
SystemInfo::CurEncoder, devname).toString())); SystemInfo::Encoder, devname).toString()));
EncoderBase* enc = EncoderBase::getEncoder(this,encoder); EncoderBase* enc = EncoderBase::getEncoder(this,encoder);
@ -743,7 +743,7 @@ void Config::autodetect()
} }
msg += QString("<li>%1</li>").arg(tr("%1 at %2").arg( msg += QString("<li>%1</li>").arg(tr("%1 at %2").arg(
SystemInfo::platformValue( SystemInfo::platformValue(
SystemInfo::CurPlatformName, detected.at(i).device).toString(), SystemInfo::PlatformName, detected.at(i).device).toString(),
QDir::toNativeSeparators(mp))); QDir::toNativeSeparators(mp)));
} }
msg += "</ul>"; msg += "</ul>";
@ -769,21 +769,21 @@ void Config::autodetect()
msg += tr("Detected an unsupported player:\n%1\n" msg += tr("Detected an unsupported player:\n%1\n"
"Sorry, Rockbox doesn't run on your player.") "Sorry, Rockbox doesn't run on your player.")
.arg(SystemInfo::platformValue( .arg(SystemInfo::platformValue(
SystemInfo::CurName, detected.at(0).device).toString()); SystemInfo::Name, detected.at(0).device).toString());
break; break;
case Autodetection::PlayerMtpMode: case Autodetection::PlayerMtpMode:
msg = tr("%1 in MTP mode found!\n" msg = tr("%1 in MTP mode found!\n"
"You need to change your player to MSC mode for installation. ") "You need to change your player to MSC mode for installation. ")
.arg(SystemInfo::platformValue( .arg(SystemInfo::platformValue(
SystemInfo::CurName, detected.at(0).device).toString()); SystemInfo::Name, detected.at(0).device).toString());
break; break;
case Autodetection::PlayerWrongFilesystem: case Autodetection::PlayerWrongFilesystem:
if(SystemInfo::platformValue( if(SystemInfo::platformValue(
SystemInfo::CurBootloaderMethod, detected.at(0).device) == "ipod") { SystemInfo::BootloaderMethod, detected.at(0).device) == "ipod") {
msg = tr("%1 \"MacPod\" found!\n" msg = tr("%1 \"MacPod\" found!\n"
"Rockbox needs a FAT formatted Ipod (so-called \"WinPod\") " "Rockbox needs a FAT formatted Ipod (so-called \"WinPod\") "
"to run. ").arg(SystemInfo::platformValue( "to run. ").arg(SystemInfo::platformValue(
SystemInfo::CurName, detected.at(0).device).toString()); SystemInfo::Name, detected.at(0).device).toString());
} }
else { else {
msg = tr("The player contains an incompatible filesystem.\n" msg = tr("The player contains an incompatible filesystem.\n"
@ -963,9 +963,9 @@ void Config::configEnc()
QString devname = ui.treeDevices->selectedItems().at(0)->data(0, Qt::UserRole).toString(); QString devname = ui.treeDevices->selectedItems().at(0)->data(0, Qt::UserRole).toString();
QString encoder = SystemInfo::platformValue( QString encoder = SystemInfo::platformValue(
SystemInfo::CurEncoder, devname).toString(); SystemInfo::Encoder, devname).toString();
ui.encoderName->setText(EncoderBase::getEncoderName(SystemInfo::platformValue( ui.encoderName->setText(EncoderBase::getEncoderName(SystemInfo::platformValue(
SystemInfo::CurEncoder, devname).toString())); SystemInfo::Encoder, devname).toString()));
EncoderBase* enc = EncoderBase::getEncoder(this,encoder); EncoderBase* enc = EncoderBase::getEncoder(this,encoder);

View file

@ -65,9 +65,9 @@ void ManualWidget::downloadManual(void)
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) { QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
return; return;
} }
QString manual = SystemInfo::platformValue(SystemInfo::CurManual).toString(); QString manual = SystemInfo::platformValue(SystemInfo::Manual).toString();
if(manual.isEmpty()) { if(manual.isEmpty()) {
manual = "rockbox-" + SystemInfo::platformValue(SystemInfo::CurBuildserverModel).toString(); manual = "rockbox-" + SystemInfo::platformValue(SystemInfo::BuildserverModel).toString();
} }
ProgressLoggerGui* logger = new ProgressLoggerGui(this); ProgressLoggerGui* logger = new ProgressLoggerGui(this);

View file

@ -82,7 +82,7 @@ void SelectiveInstallWidget::updateVersion(void)
m_mountpoint = RbSettings::value(RbSettings::Mountpoint).toString(); m_mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
m_target = RbSettings::value(RbSettings::CurrentPlatform).toString(); m_target = RbSettings::value(RbSettings::CurrentPlatform).toString();
m_blmethod = SystemInfo::platformValue( m_blmethod = SystemInfo::platformValue(
SystemInfo::CurBootloaderMethod, m_target).toString(); SystemInfo::BootloaderMethod, m_target).toString();
if(m_logger != NULL) { if(m_logger != NULL) {
delete m_logger; delete m_logger;
@ -237,7 +237,7 @@ void SelectiveInstallWidget::installBootloader(void)
// create installer // create installer
BootloaderInstallBase *bl = BootloaderInstallBase *bl =
BootloaderInstallHelper::createBootloaderInstaller(this, BootloaderInstallHelper::createBootloaderInstaller(this,
SystemInfo::platformValue(SystemInfo::CurBootloaderMethod).toString()); SystemInfo::platformValue(SystemInfo::BootloaderMethod).toString());
if(bl == NULL) { if(bl == NULL) {
m_logger->addItem(tr("No install method known."), LOGERROR); m_logger->addItem(tr("No install method known."), LOGERROR);
m_logger->setFinished(); m_logger->setFinished();
@ -254,7 +254,7 @@ void SelectiveInstallWidget::installBootloader(void)
connect(m_logger, SIGNAL(aborted()), bl, SLOT(progressAborted())); connect(m_logger, SIGNAL(aborted()), bl, SLOT(progressAborted()));
// set bootloader filename. Do this now as installed() needs it. // set bootloader filename. Do this now as installed() needs it.
QStringList blfile = SystemInfo::platformValue(SystemInfo::CurBootloaderFile).toStringList(); QStringList blfile = SystemInfo::platformValue(SystemInfo::BootloaderFile).toStringList();
QStringList blfilepath; QStringList blfilepath;
for(int a = 0; a < blfile.size(); a++) { for(int a = 0; a < blfile.size(); a++) {
blfilepath.append(RbSettings::value(RbSettings::Mountpoint).toString() blfilepath.append(RbSettings::value(RbSettings::Mountpoint).toString()
@ -262,7 +262,7 @@ void SelectiveInstallWidget::installBootloader(void)
} }
bl->setBlFile(blfilepath); bl->setBlFile(blfilepath);
QUrl url(SystemInfo::value(SystemInfo::BootloaderUrl).toString() QUrl url(SystemInfo::value(SystemInfo::BootloaderUrl).toString()
+ SystemInfo::platformValue(SystemInfo::CurBootloaderName).toString()); + SystemInfo::platformValue(SystemInfo::BootloaderName).toString());
bl->setBlUrl(url); bl->setBlUrl(url);
bl->setLogfile(RbSettings::value(RbSettings::Mountpoint).toString() bl->setLogfile(RbSettings::value(RbSettings::Mountpoint).toString()
+ "/.rockbox/rbutil.log"); + "/.rockbox/rbutil.log");
@ -282,7 +282,7 @@ void SelectiveInstallWidget::installBootloader(void)
else if(bl->installed() == BootloaderInstallBase::BootloaderOther else if(bl->installed() == BootloaderInstallBase::BootloaderOther
&& bl->capabilities() & BootloaderInstallBase::Backup) && bl->capabilities() & BootloaderInstallBase::Backup)
{ {
QString targetFolder = SystemInfo::platformValue(SystemInfo::CurPlatformName).toString() QString targetFolder = SystemInfo::platformValue(SystemInfo::PlatformName).toString()
+ " Firmware Backup"; + " Firmware Backup";
// remove invalid character(s) // remove invalid character(s)
targetFolder.remove(QRegExp("[:/]")); targetFolder.remove(QRegExp("[:/]"));
@ -319,7 +319,7 @@ void SelectiveInstallWidget::installBootloader(void)
// open dialog to browse to of file // open dialog to browse to of file
QString offile; QString offile;
QString filter QString filter
= SystemInfo::platformValue(SystemInfo::CurBootloaderFilter).toString(); = SystemInfo::platformValue(SystemInfo::BootloaderFilter).toString();
if(!filter.isEmpty()) { if(!filter.isEmpty()) {
filter = tr("Bootloader files (%1)").arg(filter) + ";;"; filter = tr("Bootloader files (%1)").arg(filter) + ";;";
} }

View file

@ -390,11 +390,11 @@ void RbUtilQt::updateDevice()
/* Enable bootloader installation, if possible */ /* Enable bootloader installation, if possible */
bool bootloaderInstallable = bool bootloaderInstallable =
SystemInfo::platformValue(SystemInfo::CurBootloaderMethod) != "none"; SystemInfo::platformValue(SystemInfo::BootloaderMethod) != "none";
/* Enable bootloader uninstallation, if possible */ /* Enable bootloader uninstallation, if possible */
bool bootloaderUninstallable = bootloaderInstallable && bool bootloaderUninstallable = bootloaderInstallable &&
SystemInfo::platformValue(SystemInfo::CurBootloaderMethod) != "fwpatcher"; SystemInfo::platformValue(SystemInfo::BootloaderMethod) != "fwpatcher";
ui.labelRemoveBootloader->setEnabled(bootloaderUninstallable); ui.labelRemoveBootloader->setEnabled(bootloaderUninstallable);
ui.buttonRemoveBootloader->setEnabled(bootloaderUninstallable); ui.buttonRemoveBootloader->setEnabled(bootloaderUninstallable);
ui.actionRemove_bootloader->setEnabled(bootloaderUninstallable); ui.actionRemove_bootloader->setEnabled(bootloaderUninstallable);
@ -405,9 +405,9 @@ void RbUtilQt::updateDevice()
ui.menuA_ctions->setEnabled(configurationValid); ui.menuA_ctions->setEnabled(configurationValid);
// displayed device info // displayed device info
QString brand = SystemInfo::platformValue(SystemInfo::CurBrand).toString(); QString brand = SystemInfo::platformValue(SystemInfo::Brand).toString();
QString name QString name
= QString("%1 (%2)").arg(SystemInfo::platformValue(SystemInfo::CurName).toString(), = QString("%1 (%2)").arg(SystemInfo::platformValue(SystemInfo::Name).toString(),
ServerInfo::platformValue(ServerInfo::CurStatus).toString()); ServerInfo::platformValue(ServerInfo::CurStatus).toString());
ui.labelDevice->setText(QString("<b>%1 %2</b>").arg(brand, name)); ui.labelDevice->setText(QString("<b>%1 %2</b>").arg(brand, name));
@ -423,7 +423,7 @@ void RbUtilQt::updateDevice()
} }
QPixmap pm; QPixmap pm;
QString m = SystemInfo::platformValue(SystemInfo::CurPlayerPicture).toString(); QString m = SystemInfo::platformValue(SystemInfo::PlayerPicture).toString();
pm.load(":/icons/players/" + m + "-small.png"); pm.load(":/icons/players/" + m + "-small.png");
pm = pm.scaledToHeight(QFontMetrics(QApplication::font()).height() * 3); pm = pm.scaledToHeight(QFontMetrics(QApplication::font()).height() * 3);
ui.labelPlayerPic->setPixmap(pm); ui.labelPlayerPic->setPixmap(pm);
@ -491,7 +491,7 @@ void RbUtilQt::installVoice()
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes)
return; return;
QString model = SystemInfo::platformValue(SystemInfo::CurBuildserverModel).toString(); QString model = SystemInfo::platformValue(SystemInfo::BuildserverModel).toString();
// replace placeholder in voice url // replace placeholder in voice url
voiceurl.replace("%MODEL%", model); voiceurl.replace("%MODEL%", model);
voiceurl.replace("%RELVERSION%", relversion); voiceurl.replace("%RELVERSION%", relversion);
@ -560,14 +560,14 @@ void RbUtilQt::uninstallBootloader(void)
// create installer // create installer
BootloaderInstallBase *bl BootloaderInstallBase *bl
= BootloaderInstallHelper::createBootloaderInstaller(this, = BootloaderInstallHelper::createBootloaderInstaller(this,
SystemInfo::platformValue(SystemInfo::CurBootloaderMethod).toString()); SystemInfo::platformValue(SystemInfo::BootloaderMethod).toString());
if(bl == NULL) { if(bl == NULL) {
logger->addItem(tr("No uninstall method for this target known."), LOGERROR); logger->addItem(tr("No uninstall method for this target known."), LOGERROR);
logger->setFinished(); logger->setFinished();
return; return;
} }
QStringList blfile = SystemInfo::platformValue(SystemInfo::CurBootloaderFile).toStringList(); QStringList blfile = SystemInfo::platformValue(SystemInfo::BootloaderFile).toStringList();
QStringList blfilepath; QStringList blfilepath;
for(int a = 0; a < blfile.size(); a++) { for(int a = 0; a < blfile.size(); a++) {
blfilepath.append(RbSettings::value(RbSettings::Mountpoint).toString() blfilepath.append(RbSettings::value(RbSettings::Mountpoint).toString()

View file

@ -86,7 +86,7 @@ void ThemesInstallWindow::downloadInfo()
QString infoUrl = SystemInfo::value(SystemInfo::ThemesInfoUrl).toString(); QString infoUrl = SystemInfo::value(SystemInfo::ThemesInfoUrl).toString();
infoUrl.replace("%TARGET%", infoUrl.replace("%TARGET%",
SystemInfo::platformValue(SystemInfo::CurConfigureModel).toString()); SystemInfo::platformValue(SystemInfo::ConfigureModel).toString());
infoUrl.replace("%REVISION%", installInfo.revision()); infoUrl.replace("%REVISION%", installInfo.revision());
infoUrl.replace("%RELEASE%", installInfo.release()); infoUrl.replace("%RELEASE%", installInfo.release());
infoUrl.replace("%RBUTILVER%", VERSION); infoUrl.replace("%RBUTILVER%", VERSION);