mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
Make Detect::check() return an error string instead of a boolean result and move the handling of an occurred error to the application to make detection Gui-clean. Move detect class to base folder.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18873 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6371460172
commit
b208000c36
5 changed files with 64 additions and 62 deletions
|
|
@ -496,17 +496,22 @@ bool RbUtilQt::installAuto()
|
|||
}
|
||||
|
||||
QString myversion = "r" + versmap.value("bleed_rev");
|
||||
|
||||
// check installed Version and Target
|
||||
QString rbVersion = Detect::installedVersion(settings->mountpoint());
|
||||
|
||||
if(Detect::check(settings,false,settings->curTargetId()) == false)
|
||||
// check installed Version and Target
|
||||
QString rbVersion = Detect::installedVersion(settings->mountpoint());
|
||||
QString warning = Detect::check(settings, false, settings->curTargetId());
|
||||
|
||||
if(!warning.isEmpty())
|
||||
{
|
||||
logger->addItem(tr("Aborted!"),LOGERROR);
|
||||
logger->abort();
|
||||
return false;
|
||||
if(QMessageBox::warning(this, tr("Really continue?"), warning,
|
||||
QMessageBox::Ok | QMessageBox::Abort, QMessageBox::Abort) == QMessageBox::Abort)
|
||||
{
|
||||
logger->addItem(tr("Aborted!"), LOGERROR);
|
||||
logger->abort();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// check version
|
||||
if(rbVersion != "")
|
||||
{
|
||||
|
|
@ -516,7 +521,7 @@ bool RbUtilQt::installAuto()
|
|||
{
|
||||
logger->addItem(tr("Starting backup..."),LOGINFO);
|
||||
QString backupName = settings->mountpoint() + "/.backup/rockbox-backup-"+rbVersion+".zip";
|
||||
|
||||
|
||||
//! create dir, if it doesnt exist
|
||||
QFileInfo backupFile(backupName);
|
||||
if(!QDir(backupFile.path()).exists())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue