summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp53
-rw-r--r--rbutil/rbutilqt/rbutilqt.h1
2 files changed, 13 insertions, 41 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index f06669d5c5..0f6a856bd2 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -319,44 +319,8 @@ void RbUtilQt::completeInstall()
logger = new ProgressLoggerGui(this);
logger->show();
- QString mountpoint = userSettings->value("mountpoint").toString();
- // show dialog with error if mount point is wrong
- if(!QFileInfo(mountpoint).isDir()) {
- logger->addItem(tr("Mount point is wrong!"),LOGERROR);
- logger->abort();
+ if(smallInstallInner())
return;
- }
- // Bootloader
- devices->beginGroup(userSettings->value("platform").toString());
- if(devices->value("needsbootloader", "") == "yes") {
- m_error = false;
- m_installed = false;
- if(!installBootloaderAuto())
- return;
- else
- {
- // wait for boot loader installation finished
- while(!m_installed)
- QApplication::processEvents();
- }
- if(m_error) return;
- logger->undoAbort();
- }
- devices->endGroup();
-
- // Rockbox
- m_error = false;
- m_installed = false;
- if(!installAuto())
- return;
- else
- {
- // wait for installation finished
- while(!m_installed)
- QApplication::processEvents();
- }
- if(m_error) return;
- logger->undoAbort();
// Fonts
m_error = false;
@@ -406,12 +370,17 @@ void RbUtilQt::smallInstall()
logger = new ProgressLoggerGui(this);
logger->show();
+ smallInstallInner();
+}
+
+bool RbUtilQt::smallInstallInner()
+{
QString mountpoint = userSettings->value("mountpoint").toString();
// show dialog with error if mount point is wrong
if(!QFileInfo(mountpoint).isDir()) {
logger->addItem(tr("Mount point is wrong!"),LOGERROR);
logger->abort();
- return;
+ return true;
}
// Bootloader
devices->beginGroup(userSettings->value("platform").toString());
@@ -419,14 +388,14 @@ void RbUtilQt::smallInstall()
m_error = false;
m_installed = false;
if(!installBootloaderAuto())
- return;
+ return true;
else
{
// wait for boot loader installation finished
while(!m_installed)
QApplication::processEvents();
}
- if(m_error) return;
+ if(m_error) return true;
logger->undoAbort();
}
devices->endGroup();
@@ -435,13 +404,15 @@ void RbUtilQt::smallInstall()
m_error = false;
m_installed = false;
if(!installAuto())
- return;
+ return true;
else
{
// wait for installation finished
while(!m_installed)
QApplication::processEvents();
}
+
+ return false;
}
void RbUtilQt::installdone(bool error)
diff --git a/rbutil/rbutilqt/rbutilqt.h b/rbutil/rbutilqt/rbutilqt.h
index 087152db3c..cdabd6c571 100644
--- a/rbutil/rbutilqt/rbutilqt.h
+++ b/rbutil/rbutilqt/rbutilqt.h
@@ -69,6 +69,7 @@ class RbUtilQt : public QMainWindow
void completeInstall(void);
void smallInstall(void);
+ bool smallInstallInner(void);
void installdone(bool error);
void installBtn(void);