diff options
-rw-r--r-- | wizard/installation.cpp | 6 | ||||
-rw-r--r-- | wizard/installation.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/wizard/installation.cpp b/wizard/installation.cpp index 2d5e342..8e9ceb7 100644 --- a/wizard/installation.cpp +++ b/wizard/installation.cpp @@ -23,6 +23,7 @@ void wpInstallation::initializePage() connect(backend, SIGNAL(receivedCommand(QString,QString)), this, SLOT(receivedCommand(QString,QString))); connect(backend, SIGNAL(finishedCommand(QString)), this, SLOT(finishedCommand(QString))); backend->exec("do_install"); + timer.start(); } void wpInstallation::cleanupPage() @@ -127,6 +128,11 @@ void wpInstallation::finishedCommand(QString command) progressCompleted->setValue(100); progressCurrent->setRange(0,100); progressCurrent->setValue(100); + int elapsed = timer.elapsed()/1000; + QString desc = tr("The installation took %1m%2s.").arg(elapsed/60).arg(elapsed % 60, 2, QLatin1Char('0')); + QListWidgetItem *item = new ListItem(tr("Finished."), desc, "dialog-ok-apply"); + listWidget->addItem(item); + listWidget->scrollToItem(item); setComplete(true); } diff --git a/wizard/installation.h b/wizard/installation.h index 0209007..c783b90 100644 --- a/wizard/installation.h +++ b/wizard/installation.h @@ -1,6 +1,7 @@ #ifndef installation_H #define installation_H +#include <QTime> #include "ui_installation.h" #include "../backend.h" @@ -19,6 +20,7 @@ class wpInstallation : public QWizardPage, Ui::wpInstallation Backend* backend; bool complete; void setComplete(bool c); + QTime timer; private slots: void setProgress(int percent); |