summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/rbutilqt.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-14 16:23:56 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-14 16:42:29 +0100
commit2509def164ee7f4aecbe6a786df57140f19e35f2 (patch)
tree63a7396e1b94482f9f05c3f3abf6c7cd77e10d26 /rbutil/rbutilqt/rbutilqt.cpp
parent440083af872da43c116c5374d8e1511cef65abf2 (diff)
downloadrockbox-2509def164ee7f4aecbe6a786df57140f19e35f2.tar.gz
rockbox-2509def164ee7f4aecbe6a786df57140f19e35f2.zip
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
Diffstat (limited to 'rbutil/rbutilqt/rbutilqt.cpp')
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp18
1 files changed, 9 insertions, 9 deletions
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()
390 390
391 /* Enable bootloader installation, if possible */ 391 /* Enable bootloader installation, if possible */
392 bool bootloaderInstallable = 392 bool bootloaderInstallable =
393 SystemInfo::value(SystemInfo::CurBootloaderMethod) != "none"; 393 SystemInfo::platformValue(SystemInfo::CurBootloaderMethod) != "none";
394 394
395 /* Enable bootloader uninstallation, if possible */ 395 /* Enable bootloader uninstallation, if possible */
396 bool bootloaderUninstallable = bootloaderInstallable && 396 bool bootloaderUninstallable = bootloaderInstallable &&
397 SystemInfo::value(SystemInfo::CurBootloaderMethod) != "fwpatcher"; 397 SystemInfo::platformValue(SystemInfo::CurBootloaderMethod) != "fwpatcher";
398 ui.labelRemoveBootloader->setEnabled(bootloaderUninstallable); 398 ui.labelRemoveBootloader->setEnabled(bootloaderUninstallable);
399 ui.buttonRemoveBootloader->setEnabled(bootloaderUninstallable); 399 ui.buttonRemoveBootloader->setEnabled(bootloaderUninstallable);
400 ui.actionRemove_bootloader->setEnabled(bootloaderUninstallable); 400 ui.actionRemove_bootloader->setEnabled(bootloaderUninstallable);
@@ -405,10 +405,10 @@ void RbUtilQt::updateDevice()
405 ui.menuA_ctions->setEnabled(configurationValid); 405 ui.menuA_ctions->setEnabled(configurationValid);
406 406
407 // displayed device info 407 // displayed device info
408 QString brand = SystemInfo::value(SystemInfo::CurBrand).toString(); 408 QString brand = SystemInfo::platformValue(SystemInfo::CurBrand).toString();
409 QString name 409 QString name
410 = QString("%1 (%2)").arg(SystemInfo::value(SystemInfo::CurName).toString(), 410 = QString("%1 (%2)").arg(SystemInfo::platformValue(SystemInfo::CurName).toString(),
411 ServerInfo::value(ServerInfo::CurStatus).toString()); 411 ServerInfo::platformValue(ServerInfo::CurStatus).toString());
412 ui.labelDevice->setText(QString("<b>%1 %2</b>").arg(brand, name)); 412 ui.labelDevice->setText(QString("<b>%1 %2</b>").arg(brand, name));
413 413
414 QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString(); 414 QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
@@ -423,7 +423,7 @@ void RbUtilQt::updateDevice()
423 } 423 }
424 424
425 QPixmap pm; 425 QPixmap pm;
426 QString m = SystemInfo::value(SystemInfo::CurPlayerPicture).toString(); 426 QString m = SystemInfo::platformValue(SystemInfo::CurPlayerPicture).toString();
427 pm.load(":/icons/players/" + m + "-small.png"); 427 pm.load(":/icons/players/" + m + "-small.png");
428 pm = pm.scaledToHeight(QFontMetrics(QApplication::font()).height() * 3); 428 pm = pm.scaledToHeight(QFontMetrics(QApplication::font()).height() * 3);
429 ui.labelPlayerPic->setPixmap(pm); 429 ui.labelPlayerPic->setPixmap(pm);
@@ -491,7 +491,7 @@ void RbUtilQt::installVoice()
491 QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) 491 QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes)
492 return; 492 return;
493 493
494 QString model = SystemInfo::value(SystemInfo::CurBuildserverModel).toString(); 494 QString model = SystemInfo::platformValue(SystemInfo::CurBuildserverModel).toString();
495 // replace placeholder in voice url 495 // replace placeholder in voice url
496 voiceurl.replace("%MODEL%", model); 496 voiceurl.replace("%MODEL%", model);
497 voiceurl.replace("%RELVERSION%", relversion); 497 voiceurl.replace("%RELVERSION%", relversion);
@@ -560,14 +560,14 @@ void RbUtilQt::uninstallBootloader(void)
560 // create installer 560 // create installer
561 BootloaderInstallBase *bl 561 BootloaderInstallBase *bl
562 = BootloaderInstallHelper::createBootloaderInstaller(this, 562 = BootloaderInstallHelper::createBootloaderInstaller(this,
563 SystemInfo::value(SystemInfo::CurBootloaderMethod).toString()); 563 SystemInfo::platformValue(SystemInfo::CurBootloaderMethod).toString());
564 564
565 if(bl == NULL) { 565 if(bl == NULL) {
566 logger->addItem(tr("No uninstall method for this target known."), LOGERROR); 566 logger->addItem(tr("No uninstall method for this target known."), LOGERROR);
567 logger->setFinished(); 567 logger->setFinished();
568 return; 568 return;
569 } 569 }
570 QStringList blfile = SystemInfo::value(SystemInfo::CurBootloaderFile).toStringList(); 570 QStringList blfile = SystemInfo::platformValue(SystemInfo::CurBootloaderFile).toStringList();
571 QStringList blfilepath; 571 QStringList blfilepath;
572 for(int a = 0; a < blfile.size(); a++) { 572 for(int a = 0; a < blfile.size(); a++) {
573 blfilepath.append(RbSettings::value(RbSettings::Mountpoint).toString() 573 blfilepath.append(RbSettings::value(RbSettings::Mountpoint).toString()