summaryrefslogtreecommitdiffstats
path: root/installerbuilder
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@nokia.com>2011-10-19 15:20:01 +0200
committerKarsten Heimrich <karsten.heimrich@nokia.com>2011-10-20 15:50:15 +0200
commit22487b69009d9529e269e47bed76ce769f017da8 (patch)
tree5846061fcf77fd4d49e02e15982bb5f290e9afce /installerbuilder
parent5b24a2a206051846c260637032a250a51312ad4a (diff)
Implement QTIFW-3.
Change-Id: I8a959d9913f3baac79f70c63a483bdd0e3cd0fe7 Reviewed-by: Niels Weber <niels.2.weber@nokia.com> Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
Diffstat (limited to 'installerbuilder')
-rw-r--r--installerbuilder/libinstaller/downloadarchivesjob.cpp5
-rw-r--r--installerbuilder/libinstaller/downloadarchivesjob.h1
-rw-r--r--installerbuilder/libinstaller/packagemanagercore.cpp3
-rw-r--r--installerbuilder/libinstaller/performinstallationform.cpp7
-rw-r--r--installerbuilder/libinstaller/performinstallationform.h1
-rw-r--r--installerbuilder/libinstaller/progresscoordinator.cpp5
-rw-r--r--installerbuilder/libinstaller/progresscoordinator.h3
7 files changed, 24 insertions, 1 deletions
diff --git a/installerbuilder/libinstaller/downloadarchivesjob.cpp b/installerbuilder/libinstaller/downloadarchivesjob.cpp
index c110ce839..8c202d550 100644
--- a/installerbuilder/libinstaller/downloadarchivesjob.cpp
+++ b/installerbuilder/libinstaller/downloadarchivesjob.cpp
@@ -146,7 +146,8 @@ void DownloadArchivesJob::fetchNextArchiveHash()
connect(m_downloader, SIGNAL(downloadAborted(QString)), this, SLOT(downloadFailed(QString)),
Qt::QueuedConnection);
//hashes are not registered as files - so we can't handle this as a normal progress
- //connect(downloader, SIGNAL(downloadProgress(double)), this, SLOT(emitDownloadProgress(double)));
+ connect(m_downloader, SIGNAL(downloadStatus(QString)), this, SIGNAL(downloadStatusChanged(QString)));
+
m_downloader->setUrl(url);
m_downloader->setAutoRemoveDownloadedFile(false);
@@ -217,6 +218,8 @@ void DownloadArchivesJob::fetchNextArchive()
connect(m_downloader, SIGNAL(downloadAborted(QString)), this, SLOT(downloadFailed(QString)),
Qt::QueuedConnection);
connect(m_downloader, SIGNAL(downloadProgress(double)), this, SLOT(emitDownloadProgress(double)));
+ connect(m_downloader, SIGNAL(downloadStatus(QString)), this, SIGNAL(downloadStatusChanged(QString)));
+
m_downloader->setUrl(url);
m_downloader->setAutoRemoveDownloadedFile(false);
diff --git a/installerbuilder/libinstaller/downloadarchivesjob.h b/installerbuilder/libinstaller/downloadarchivesjob.h
index 555c4b933..8ff83a241 100644
--- a/installerbuilder/libinstaller/downloadarchivesjob.h
+++ b/installerbuilder/libinstaller/downloadarchivesjob.h
@@ -57,6 +57,7 @@ public:
Q_SIGNALS:
void progressChanged(double progress);
void outputTextChanged(const QString &progress);
+ void downloadStatusChanged(const QString &status);
protected:
void doStart();
diff --git a/installerbuilder/libinstaller/packagemanagercore.cpp b/installerbuilder/libinstaller/packagemanagercore.cpp
index f1aa210fc..cbffde95d 100644
--- a/installerbuilder/libinstaller/packagemanagercore.cpp
+++ b/installerbuilder/libinstaller/packagemanagercore.cpp
@@ -370,6 +370,8 @@ int PackageManagerCore::downloadNeededArchives(double partProgressSize)
connect(this, SIGNAL(installationInterrupted()), archivesJob, SLOT(cancel()));
connect(archivesJob, SIGNAL(outputTextChanged(QString)), ProgressCoordinator::instance(),
SLOT(emitLabelAndDetailTextChanged(QString)));
+ connect(archivesJob, SIGNAL(downloadStatusChanged(QString)), ProgressCoordinator::instance(),
+ SIGNAL(downloadStatusChanged(QString)));
ProgressCoordinator::instance()->registerPartProgress(archivesJob, SIGNAL(progressChanged(double)),
partProgressSize);
@@ -384,6 +386,7 @@ int PackageManagerCore::downloadNeededArchives(double partProgressSize)
if (d->statusCanceledOrFailed())
throw Error(tr("Installation canceled by user"));
+ ProgressCoordinator::instance()->emitDownloadStatus(tr("All downloads finished."));
return archivesToDownload.count();
}
diff --git a/installerbuilder/libinstaller/performinstallationform.cpp b/installerbuilder/libinstaller/performinstallationform.cpp
index c1ba65a93..d4a2d050a 100644
--- a/installerbuilder/libinstaller/performinstallationform.cpp
+++ b/installerbuilder/libinstaller/performinstallationform.cpp
@@ -81,6 +81,13 @@ void PerformInstallationForm::setupUi(QWidget *widget)
m_progressLabel->setObjectName(QLatin1String("ProgressLabel"));
topLayout->addWidget(m_progressLabel);
+ m_downloadStatus = new QLabel(widget);
+ m_downloadStatus->setObjectName(QLatin1String("DownloadStatus"));
+ m_downloadStatus->setWordWrap(true);
+ topLayout->addWidget(m_downloadStatus);
+ connect(ProgressCoordinator::instance(), SIGNAL(downloadStatusChanged(QString)), m_downloadStatus,
+ SLOT(setText(QString)));
+
m_detailsButton = new QPushButton(tr("&Show Details"), widget);
m_detailsButton->setObjectName(QLatin1String("DetailsButton"));
m_detailsButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
diff --git a/installerbuilder/libinstaller/performinstallationform.h b/installerbuilder/libinstaller/performinstallationform.h
index b2a2e9465..f7ca0ed73 100644
--- a/installerbuilder/libinstaller/performinstallationform.h
+++ b/installerbuilder/libinstaller/performinstallationform.h
@@ -69,6 +69,7 @@ public slots:
private:
QProgressBar *m_progressBar;
QLabel *m_progressLabel;
+ QLabel *m_downloadStatus;
QPushButton *m_detailsButton;
LazyPlainTextEdit *m_detailsBrowser;
QTimer *m_updateTimer;
diff --git a/installerbuilder/libinstaller/progresscoordinator.cpp b/installerbuilder/libinstaller/progresscoordinator.cpp
index 902012e63..c633cc707 100644
--- a/installerbuilder/libinstaller/progresscoordinator.cpp
+++ b/installerbuilder/libinstaller/progresscoordinator.cpp
@@ -270,3 +270,8 @@ double ProgressCoordinator::allPendingCalculatedPartPercentages(QObject *exclude
}
return result;
}
+
+void ProgressCoordinator::emitDownloadStatus(const QString &status)
+{
+ emit downloadStatusChanged(status);
+}
diff --git a/installerbuilder/libinstaller/progresscoordinator.h b/installerbuilder/libinstaller/progresscoordinator.h
index 31989b35f..781551d8f 100644
--- a/installerbuilder/libinstaller/progresscoordinator.h
+++ b/installerbuilder/libinstaller/progresscoordinator.h
@@ -58,9 +58,12 @@ public slots:
void emitDetailTextChanged(const QString &text);
void emitLabelAndDetailTextChanged(const QString &text);
+ void emitDownloadStatus(const QString &status);
+
signals:
void detailTextChanged(const QString &text);
void detailTextResetNeeded();
+ void downloadStatusChanged(const QString &status);
protected:
explicit ProgressCoordinator(QObject *parent);