mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
rbutil: Move bootloader file check to base class.
Avoid constructing the bootloader file path in the caller. Pass filename list and mountpoint separately so it can directly fall back to the mountpoint. Change some functions to use references instead of creating temporary objects. Change-Id: I09c9d755553a32de3d02a42a8ce1fcb94f831b2a
This commit is contained in:
parent
1af92e5ff8
commit
8c55ce62b9
4 changed files with 24 additions and 36 deletions
|
|
@ -308,17 +308,7 @@ void SelectiveInstallWidget::installBootloader(void)
|
|||
// set bootloader filename. Do this now as installed() needs it.
|
||||
QStringList blfile = PlayerBuildInfo::instance()->value(
|
||||
PlayerBuildInfo::BootloaderFile).toStringList();
|
||||
QStringList blfilepath;
|
||||
for(int a = 0; a < blfile.size(); a++) {
|
||||
blfilepath.append(RbSettings::value(RbSettings::Mountpoint).toString()
|
||||
+ blfile.at(a));
|
||||
}
|
||||
// on devices without a bootloader file we use the mointpoint. The
|
||||
// installer will use that to determine the correct device.
|
||||
if(blfile.isEmpty()) {
|
||||
blfilepath.append(RbSettings::value(RbSettings::Mountpoint).toString());
|
||||
}
|
||||
bl->setBlFile(blfilepath);
|
||||
bl->setBlFile(RbSettings::value(RbSettings::Mountpoint).toString(), blfile);
|
||||
QUrl url(PlayerBuildInfo::instance()->value(PlayerBuildInfo::BootloaderUrl).toString()
|
||||
+ PlayerBuildInfo::instance()->value(PlayerBuildInfo::BootloaderName).toString());
|
||||
bl->setBlUrl(url);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue