Compare commits

..

2 Commits

Author SHA1 Message Date
061c57ef51 set verion to 1.5.6 2024-11-22 12:59:13 +01:00
e82417dde7 MainWindow::MainWindow():
Add status timer, to show proceeding update, so user does not exit
	application / restart machine.
2024-11-22 12:55:27 +01:00
3 changed files with 22 additions and 1 deletions

View File

@ -146,7 +146,8 @@ DEFINES += QT_DEPRECATED_WARNINGS
# syncCustomerRepositoryAndFS().
# 1.5.5 : Call into binary ptuPackageVersion to get installed package
# versions.
VERSION="1.5.5"
# 1.5.6 : Show additional update progress info in status bar.
VERSION="1.5.6"
# PLANNED TODOS:
# 1: Das Repository wird repariert bwz. neu geklont. Unabhaengig vom WAIT.
# 2: Wenn der WAIT-Button aktiv ist, dann wird ein Repository repariert (neu

View File

@ -59,6 +59,24 @@ MainWindow::MainWindow(Worker *worker, QWidget *parent)
m_exitTimer->setSingleShot(true);
m_exitTimer->start(1800 * 1000);
m_statusTimer = new QTimer(this);
if (m_statusTimer) {
connect(m_statusTimer, &QTimer::timeout, [this]() {
static QString p(".");
QTime const &t = QDateTime::currentDateTime().time();
QString s = t.toString(Qt::ISODate);
s += ": Update might take several minutes " + p;
if (p.length() >= 5) {
p = ".";
} else {
p += ".";
}
this->statusBar()->showMessage(s);
});
m_statusTimer->setSingleShot(false);
m_statusTimer->start(1000);
}
connect(ui->exit, SIGNAL(clicked()),this,SLOT(onQuit()));
connect(m_worker, SIGNAL(disableExit()),this,SLOT(onDisableExit()));
connect(m_worker, SIGNAL(enableExit()),this,SLOT(onEnableExit()));
@ -76,6 +94,7 @@ MainWindow::MainWindow(Worker *worker, QWidget *parent)
MainWindow::~MainWindow() {
delete m_startTimer;
delete m_exitTimer;
delete m_statusTimer;
delete ui;
}

View File

@ -73,5 +73,6 @@ private:
bool m_progressRunning;
//int m_progressValue;
UpdateDcEvent::UpdateStep m_updateStep;
QTimer *m_statusTimer;
};
#endif // MAINWINDOW_H