mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Keep logger open after user aborted bootloader reinstall during automated install. Do some code police.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19475 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cd5f753f5e
commit
3e1168fa8a
1 changed files with 35 additions and 24 deletions
|
@ -520,7 +520,8 @@ bool RbUtilQt::installAuto()
|
|||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes)
|
||||
{
|
||||
logger->addItem(tr("Starting backup..."),LOGINFO);
|
||||
QString backupName = settings->mountpoint() + "/.backup/rockbox-backup-"+rbVersion+".zip";
|
||||
QString backupName = settings->mountpoint()
|
||||
+ "/.backup/rockbox-backup-" + rbVersion + ".zip";
|
||||
|
||||
//! create dir, if it doesnt exist
|
||||
QFileInfo backupFile(backupName);
|
||||
|
@ -652,8 +653,15 @@ void RbUtilQt::installBootloader()
|
|||
if(QMessageBox::question(this, tr("Bootloader detected"),
|
||||
tr("Bootloader already installed. Do you want to reinstall the bootloader?"),
|
||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) {
|
||||
if(m_auto) {
|
||||
// keep logger open for auto installs.
|
||||
// don't consider abort as error in auto-mode.
|
||||
installBootloaderPost(false);
|
||||
}
|
||||
else {
|
||||
logger->close();
|
||||
m_error = true;
|
||||
installBootloaderPost(true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -802,7 +810,8 @@ void RbUtilQt::installVoice()
|
|||
if(m_gotInfo == false)
|
||||
{
|
||||
QMessageBox::warning(this, tr("Warning"),
|
||||
tr("The Application is still downloading Information about new Builds. Please try again shortly."));
|
||||
tr("The Application is still downloading Information about new Builds."
|
||||
" Please try again shortly."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -836,7 +845,8 @@ void RbUtilQt::installDoomBtn()
|
|||
{
|
||||
if(chkConfig(true)) return;
|
||||
if(!hasDoom()){
|
||||
QMessageBox::critical(this, tr("Error"), tr("Your device doesn't have a doom plugin. Aborting."));
|
||||
QMessageBox::critical(this, tr("Error"),
|
||||
tr("Your device doesn't have a doom plugin. Aborting."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1047,13 +1057,15 @@ void RbUtilQt::installPortable(void)
|
|||
QFile::remove(settings->mountpoint() + "/RockboxUtility.exe");
|
||||
QFile::remove(settings->mountpoint() + "/RockboxUtility.ini");
|
||||
// copy currently running binary and currently used settings file
|
||||
if(!QFile::copy(qApp->applicationFilePath(), settings->mountpoint() + "/RockboxUtility.exe")) {
|
||||
if(!QFile::copy(qApp->applicationFilePath(), settings->mountpoint()
|
||||
+ "/RockboxUtility.exe")) {
|
||||
logger->addItem(tr("Error installing Rockbox Utility"), LOGERROR);
|
||||
logger->abort();
|
||||
return;
|
||||
}
|
||||
logger->addItem(tr("Installing user configuration"), LOGINFO);
|
||||
if(!QFile::copy(settings->userSettingFilename(), settings->mountpoint() + "/RockboxUtility.ini")) {
|
||||
if(!QFile::copy(settings->userSettingFilename(), settings->mountpoint()
|
||||
+ "/RockboxUtility.ini")) {
|
||||
logger->addItem(tr("Error installing user configuration"), LOGERROR);
|
||||
logger->abort();
|
||||
return;
|
||||
|
@ -1070,7 +1082,8 @@ void RbUtilQt::updateInfo()
|
|||
{
|
||||
qDebug() << "RbUtilQt::updateInfo()";
|
||||
|
||||
QSettings log(settings->mountpoint() + "/.rockbox/rbutil.log", QSettings::IniFormat, this);
|
||||
QSettings log(settings->mountpoint() + "/.rockbox/rbutil.log",
|
||||
QSettings::IniFormat, this);
|
||||
QStringList groups = log.childGroups();
|
||||
QList<QTreeWidgetItem *> items;
|
||||
QTreeWidgetItem *w, *w2;
|
||||
|
@ -1134,9 +1147,7 @@ QUrl RbUtilQt::proxy()
|
|||
if(settings->proxyType() == "manual")
|
||||
return QUrl(settings->proxy());
|
||||
else if(settings->proxy() == "system")
|
||||
{
|
||||
return Detect::systemProxy();
|
||||
}
|
||||
return QUrl("");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue