summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagergui.cpp
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2017-05-05 10:35:00 +0300
committerKatja Marttila <katja.marttila@qt.io>2017-05-10 07:09:28 +0000
commit41b18d6aa0277ae90bf6c76ee7bbc50696e7be26 (patch)
treec853aef989c1b551584ba2e54f16c562bd23c8c0 /src/libs/installer/packagemanagergui.cpp
parent3fdc5bd4b1a1f75496bd453b12dd01c662782958 (diff)
Add progressbar to indicate unzip job is proceeding
When a big compressed package is unzipped, it seemed that the installer hanged as there was no indication that the job is still ongoing. Added undetermined state to progress bar as unzip job does not inform the progress state. Task-number: QTIFW-967 Change-Id: I21ca394e1856038c51413f9e5011307ae7a9850a Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src/libs/installer/packagemanagergui.cpp')
-rw-r--r--src/libs/installer/packagemanagergui.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index 5e385ac36..ec0407e45 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -1323,6 +1323,7 @@ IntroductionPage::IntroductionPage(PackageManagerCore *core)
core->setCompleteUninstallation(core->isUninstaller());
connect(core, &PackageManagerCore::metaJobProgress, this, &IntroductionPage::onProgressChanged);
+ connect(core, &PackageManagerCore::metaJobTotalProgress, this, &IntroductionPage::setTotalProgress);
connect(core, &PackageManagerCore::metaJobInfoMessage, this, &IntroductionPage::setMessage);
connect(core, &PackageManagerCore::coreNetworkSettingsChanged,
this, &IntroductionPage::onCoreNetworkSettingsChanged);
@@ -1512,11 +1513,19 @@ void IntroductionPage::setMessage(const QString &msg)
*/
void IntroductionPage::onProgressChanged(int progress)
{
- m_progressBar->setRange(0, 100);
m_progressBar->setValue(progress);
}
/*!
+ Sets total \a progress value to progress bar.
+*/
+void IntroductionPage::setTotalProgress(int totalProgress)
+{
+ if (m_progressBar)
+ m_progressBar->setRange(0, totalProgress);
+}
+
+/*!
Displays the error message \a error on the page.
*/
void IntroductionPage::setErrorMessage(const QString &error)