summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbutilqt.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-07-01 12:33:06 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-07-01 12:34:59 +0200
commitd0f7a8181bb761ce627b10b002c5906129664804 (patch)
treeac2b306226891802a6fcea59db754d8a619c693e /rbutil/rbutilqt/rbutilqt.cpp
parentbf1c491c2b510648a3c1efc2c381e30635248d18 (diff)
downloadrockbox-d0f7a8181bb761ce627b10b002c5906129664804.tar.gz
rockbox-d0f7a8181bb761ce627b10b002c5906129664804.tar.bz2
rockbox-d0f7a8181bb761ce627b10b002c5906129664804.zip
Be more specific on bootloader uninstallation errors.
When Rockbox Utility can't figure if the installed bootloader is a Rockbox bootloader don't tell the user that it can't uninstall the bootloader but be more specific stating that no Rockbox bootloader has been found. Change-Id: I8e1eae4bdba30da87d10d2dc11fb9d48e176de2a
Diffstat (limited to 'rbutil/rbutilqt/rbutilqt.cpp')
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index b1065936f7..76c8497a5b 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -521,16 +521,20 @@ void RbUtilQt::uninstallBootloader(void)
bl->setBlFile(blfilepath);
BootloaderInstallBase::BootloaderType currentbl = bl->installed();
- if((bl->capabilities() & BootloaderInstallBase::Uninstall) == 0
- || currentbl == BootloaderInstallBase::BootloaderUnknown
- || currentbl == BootloaderInstallBase::BootloaderOther)
- {
+ if((bl->capabilities() & BootloaderInstallBase::Uninstall) == 0) {
logger->addItem(tr("Rockbox Utility can not uninstall the bootloader on this target. "
"Try a normal firmware update to remove the booloader."), LOGERROR);
logger->setFinished();
delete bl;
return;
}
+ if(currentbl == BootloaderInstallBase::BootloaderUnknown
+ || currentbl == BootloaderInstallBase::BootloaderOther) {
+ logger->addItem(tr("No Rockbox bootloader found."), LOGERROR);
+ logger->setFinished();
+ delete bl;
+ return;
+ }
connect(bl, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
connect(bl, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int)));