summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbutilqt.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-05-01 10:09:14 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-05-01 10:49:48 +0200
commit92ef7bd3289a5c4d15bd0de6fb8950af4036891b (patch)
tree70cd94f5908325da884d7093488002206941ba5e /rbutil/rbutilqt/rbutilqt.cpp
parent0dd200b33a624131190b0cffffb00a1cf4f7fd41 (diff)
downloadrockbox-92ef7bd3289a5c4d15bd0de6fb8950af4036891b.tar.gz
rockbox-92ef7bd3289a5c4d15bd0de6fb8950af4036891b.tar.bz2
rockbox-92ef7bd3289a5c4d15bd0de6fb8950af4036891b.zip
Move bootloader class initialiation into helper.
Create a BootloaderInstallHelper class for handling post installation hints and creating the installation instance depending on the player model. This removes the base class handling its derived classes which always has been weird, and removes the need to change the base class when adding a new installation method, since the base shouldn't be affected. Change-Id: I2a156d70fd1cff6c48bdd46d10c33d75c953ea90
Diffstat (limited to 'rbutil/rbutilqt/rbutilqt.cpp')
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 4836cf567d..683f17c0af 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -44,7 +44,7 @@
#include "progressloggerinterface.h"
#include "bootloaderinstallbase.h"
-#include "bootloaderinstallmpio.h"
+#include "bootloaderinstallhelper.h"
#if defined(Q_OS_LINUX)
#include <stdio.h>
@@ -673,8 +673,9 @@ void RbUtilQt::installBootloader()
m_error = false;
// create installer
- BootloaderInstallBase *bl = BootloaderInstallBase::createBootloaderInstaller(this,
- SystemInfo::value(SystemInfo::CurBootloaderMethod).toString());
+ BootloaderInstallBase *bl =
+ BootloaderInstallHelper::createBootloaderInstaller(this,
+ SystemInfo::value(SystemInfo::CurBootloaderMethod).toString());
if(bl == NULL) {
logger->addItem(tr("No install method known."), LOGERROR);
logger->setFinished();
@@ -806,7 +807,7 @@ void RbUtilQt::installBootloaderPost(bool error)
if(m_auto)
return;
- QString msg = BootloaderInstallBase::postinstallHints(
+ QString msg = BootloaderInstallHelper::postinstallHints(
RbSettings::value(RbSettings::Platform).toString());
if(!msg.isEmpty()) {
QMessageBox::information(this, tr("Manual steps required"), msg);
@@ -1048,10 +1049,11 @@ void RbUtilQt::uninstallBootloader(void)
QString platform = RbSettings::value(RbSettings::Platform).toString();
// create installer
- BootloaderInstallBase *bl = BootloaderInstallBase::createBootloaderInstaller(this,
- SystemInfo::value(SystemInfo::CurBootloaderMethod).toString());
+ BootloaderInstallBase *bl
+ = BootloaderInstallHelper::createBootloaderInstaller(this,
+ SystemInfo::value(SystemInfo::CurBootloaderMethod).toString());
- if(bl == NULL ) {
+ if(bl == NULL) {
logger->addItem(tr("No uninstall method for this target known."), LOGERROR);
logger->setFinished();
return;