forked from len0rd/rockbox
connect progress signal directly to the logger.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17811 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7135f2d9f4
commit
9f0ea77d22
2 changed files with 3 additions and 11 deletions
|
|
@ -499,7 +499,7 @@ bool RbUtilQt::installAuto()
|
||||||
tr("Rockbox installation detected. Do you want to backup first?"),
|
tr("Rockbox installation detected. Do you want to backup first?"),
|
||||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes)
|
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes)
|
||||||
{
|
{
|
||||||
logger->addItem(tr("Beginning Backup..."),LOGINFO);
|
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
|
//! create dir, if it doesnt exist
|
||||||
|
|
@ -512,7 +512,7 @@ bool RbUtilQt::installAuto()
|
||||||
|
|
||||||
//! create backup
|
//! create backup
|
||||||
RbZip backup;
|
RbZip backup;
|
||||||
connect(&backup,SIGNAL(zipProgress(int,int)),this,SLOT(updateDataReadProgress(int,int)));
|
connect(&backup,SIGNAL(zipProgress(int,int)),logger, SLOT(setProgress(int,int)));
|
||||||
if(backup.createZip(backupName,settings->mountpoint() + "/.rockbox") == Zip::Ok)
|
if(backup.createZip(backupName,settings->mountpoint() + "/.rockbox") == Zip::Ok)
|
||||||
{
|
{
|
||||||
logger->addItem(tr("Backup successfull"),LOGOK);
|
logger->addItem(tr("Backup successfull"),LOGOK);
|
||||||
|
|
@ -541,13 +541,6 @@ bool RbUtilQt::installAuto()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RbUtilQt::updateDataReadProgress(int read, int total)
|
|
||||||
{
|
|
||||||
logger->setProgressMax(total);
|
|
||||||
logger->setProgressValue(read);
|
|
||||||
//qDebug() << "progress:" << read << "/" << total;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void RbUtilQt::install()
|
void RbUtilQt::install()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -107,8 +107,7 @@ class RbUtilQt : public QMainWindow
|
||||||
void installPortable(void);
|
void installPortable(void);
|
||||||
void updateInfo(void);
|
void updateInfo(void);
|
||||||
void updateTabs(int);
|
void updateTabs(int);
|
||||||
|
|
||||||
void updateDataReadProgress(int read, int total);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue