forked from len0rd/rockbox
Use the new progressbar value slot instead of wrapping around it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17685 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fa5bd07f6b
commit
9ea6bc06da
6 changed files with 10 additions and 35 deletions
|
|
@ -136,7 +136,7 @@ void Install::accept()
|
|||
|
||||
//! create 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(m_backupName,settings->mountpoint() + "/.rockbox") == Zip::Ok)
|
||||
{
|
||||
logger->addItem(tr("Backup successfull"),LOGOK);
|
||||
|
|
@ -178,13 +178,6 @@ void Install::changeBackupPath()
|
|||
}
|
||||
}
|
||||
|
||||
void Install::updateDataReadProgress(int read, int total)
|
||||
{
|
||||
logger->setProgressMax(total);
|
||||
logger->setProgressValue(read);
|
||||
//qDebug() << "progress:" << read << "/" << total;
|
||||
|
||||
}
|
||||
|
||||
// Zip installer has finished
|
||||
void Install::done(bool error)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ class Install : public QDialog
|
|||
void setDetailsStable(bool);
|
||||
void setDetailsArchived(bool);
|
||||
void done(bool);
|
||||
void updateDataReadProgress(int read, int total);
|
||||
void changeBackupPath();
|
||||
void backupCheckboxChanged(int state);
|
||||
|
||||
|
|
|
|||
|
|
@ -182,13 +182,6 @@ void BootloaderInstaller::downloadDone(bool error)
|
|||
|
||||
}
|
||||
|
||||
void BootloaderInstaller::updateDataReadProgress(int read, int total)
|
||||
{
|
||||
m_dp->setProgressMax(total);
|
||||
m_dp->setProgressValue(read);
|
||||
qDebug() << "progress:" << read << "/" << total;
|
||||
}
|
||||
|
||||
|
||||
void BootloaderInstaller::installEnded(bool error)
|
||||
{
|
||||
|
|
@ -323,7 +316,7 @@ void BootloaderInstaller::gigabeatPrepare()
|
|||
getter->setFile(&downloadFile);
|
||||
// connect signals from HttpGet
|
||||
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), m_dp, SLOT(setProgress(int, int)));
|
||||
connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
|
||||
|
||||
getter->getFile(QUrl(url));
|
||||
|
|
@ -469,7 +462,7 @@ void BootloaderInstaller::iaudioPrepare()
|
|||
getter->getFile(QUrl(url));
|
||||
// connect signals from HttpGet
|
||||
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), m_dp, SLOT(setProgress(int, int)));
|
||||
connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
|
||||
}
|
||||
|
||||
|
|
@ -525,7 +518,7 @@ void BootloaderInstaller::h10Prepare()
|
|||
getter->setFile(&downloadFile);
|
||||
// connect signals from HttpGet
|
||||
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), m_dp, SLOT(setProgress(int, int)));
|
||||
connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
|
||||
|
||||
getter->getFile(QUrl(url));
|
||||
|
|
@ -684,7 +677,7 @@ void BootloaderInstaller::mrobe100Prepare()
|
|||
|
||||
// connect signals from HttpGet
|
||||
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), m_dp, SLOT(setProgress(int, int)));
|
||||
connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
|
||||
|
||||
getter->getFile(QUrl(url));
|
||||
|
|
@ -854,7 +847,7 @@ void BootloaderInstaller::ipodPrepare()
|
|||
|
||||
// connect signals from HttpGet
|
||||
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), m_dp, SLOT(setProgress(int, int)));
|
||||
connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
|
||||
|
||||
getter->getFile(QUrl(url));
|
||||
|
|
@ -1098,7 +1091,7 @@ void BootloaderInstaller::sansaPrepare()
|
|||
|
||||
// connect signals from HttpGet
|
||||
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), m_dp, SLOT(setProgress(int, int)));
|
||||
connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
|
||||
|
||||
getter->getFile(QUrl(url));
|
||||
|
|
@ -1288,7 +1281,7 @@ void BootloaderInstaller::iriverPrepare()
|
|||
|
||||
// connect signals from HttpGet
|
||||
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), m_dp, SLOT(setProgress(int, int)));
|
||||
connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
|
||||
|
||||
getter->getFile(QUrl(url));
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ private slots:
|
|||
void createInstallLog(); // adds the bootloader entry to the log
|
||||
void removeInstallLog(); // removes the bootloader entry from the log
|
||||
|
||||
void updateDataReadProgress(int, int);
|
||||
void downloadDone(bool);
|
||||
void downloadRequestFinished(int, bool);
|
||||
void infoDownloadDone(bool);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ void ZipInstaller::installStart()
|
|||
getter->setFile(downloadFile);
|
||||
|
||||
connect(getter, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
|
||||
connect(getter, SIGNAL(dataReadProgress(int, int)), m_dp, SLOT(setProgress(int, int)));
|
||||
connect(m_dp, SIGNAL(aborted()), getter, SLOT(abort()));
|
||||
|
||||
getter->getFile(QUrl(m_url));
|
||||
|
|
@ -135,7 +135,7 @@ void ZipInstaller::downloadDone(bool error)
|
|||
qDebug() << "file to unzip: " << m_file;
|
||||
UnZip::ErrorCode ec;
|
||||
RbUnZip uz;
|
||||
connect(&uz, SIGNAL(unzipProgress(int, int)), this, SLOT(updateDataReadProgress(int, int)));
|
||||
connect(&uz, SIGNAL(unzipProgress(int, int)), m_dp, SLOT(setProgress(int, int)));
|
||||
connect(m_dp, SIGNAL(aborted()), &uz, SLOT(abortUnzip()));
|
||||
ec = uz.openArchive(m_file);
|
||||
if(ec != UnZip::Ok) {
|
||||
|
|
@ -200,12 +200,4 @@ void ZipInstaller::downloadDone(bool error)
|
|||
emit cont();
|
||||
}
|
||||
|
||||
void ZipInstaller::updateDataReadProgress(int read, int total)
|
||||
{
|
||||
m_dp->setProgressMax(total);
|
||||
m_dp->setProgressValue(read);
|
||||
//qDebug() << "progress:" << read << "/" << total;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ signals:
|
|||
void cont();
|
||||
|
||||
private slots:
|
||||
void updateDataReadProgress(int, int);
|
||||
void downloadDone(bool);
|
||||
void installStart(void);
|
||||
void installContinue(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue