summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2008-06-03 20:08:25 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2008-06-03 20:08:25 +0000
commit9ea6bc06da5902aa5e0fff77a1764ca9befd115b (patch)
tree6421e8ab80f37c68ef288f72739344fbeb9e7854 /rbutil
parentfa5bd07f6bc233f04c60cf79ed86d0111712c23f (diff)
downloadrockbox-9ea6bc06da5902aa5e0fff77a1764ca9befd115b.tar.gz
rockbox-9ea6bc06da5902aa5e0fff77a1764ca9befd115b.tar.bz2
rockbox-9ea6bc06da5902aa5e0fff77a1764ca9befd115b.zip
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
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/install.cpp9
-rw-r--r--rbutil/rbutilqt/install.h1
-rw-r--r--rbutil/rbutilqt/installbootloader.cpp21
-rw-r--r--rbutil/rbutilqt/installbootloader.h1
-rw-r--r--rbutil/rbutilqt/installzip.cpp12
-rw-r--r--rbutil/rbutilqt/installzip.h1
6 files changed, 10 insertions, 35 deletions
diff --git a/rbutil/rbutilqt/install.cpp b/rbutil/rbutilqt/install.cpp
index 30c054be9c..dbdd2d4820 100644
--- a/rbutil/rbutilqt/install.cpp
+++ b/rbutil/rbutilqt/install.cpp
@@ -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)
diff --git a/rbutil/rbutilqt/install.h b/rbutil/rbutilqt/install.h
index 37fac4f8b7..6a5dae6544 100644
--- a/rbutil/rbutilqt/install.h
+++ b/rbutil/rbutilqt/install.h
@@ -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);
diff --git a/rbutil/rbutilqt/installbootloader.cpp b/rbutil/rbutilqt/installbootloader.cpp
index 10f6a9f678..dae82b6fd2 100644
--- a/rbutil/rbutilqt/installbootloader.cpp
+++ b/rbutil/rbutilqt/installbootloader.cpp
@@ -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));
diff --git a/rbutil/rbutilqt/installbootloader.h b/rbutil/rbutilqt/installbootloader.h
index 727b8bfbe7..cb283b5c85 100644
--- a/rbutil/rbutilqt/installbootloader.h
+++ b/rbutil/rbutilqt/installbootloader.h
@@ -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);
diff --git a/rbutil/rbutilqt/installzip.cpp b/rbutil/rbutilqt/installzip.cpp
index 6514c6d13d..5842e00d3f 100644
--- a/rbutil/rbutilqt/installzip.cpp
+++ b/rbutil/rbutilqt/installzip.cpp
@@ -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;
-
-}
-
diff --git a/rbutil/rbutilqt/installzip.h b/rbutil/rbutilqt/installzip.h
index 63de08e2c9..3b3dd79602 100644
--- a/rbutil/rbutilqt/installzip.h
+++ b/rbutil/rbutilqt/installzip.h
@@ -54,7 +54,6 @@ signals:
void cont();
private slots:
- void updateDataReadProgress(int, int);
void downloadDone(bool);
void installStart(void);
void installContinue(void);