From bcdb11ae97fe32f65f2065691ab53d00b06d9a91 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sun, 30 Aug 2020 11:45:25 +0200 Subject: [PATCH] support a check for updates (#370) -> client GUI --- ChangeLog | 4 +++- src/clientdlg.cpp | 10 ++++++---- src/clientdlgbase.ui | 9 ++++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index a89020dfee..ca3b94cd3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ 3.5.10git <- NOTE: the release version number will be 3.5.11 +- support a check for updates (#370) + - added an optional server list whitelist filter (#413) - added a command line argument to enable multithreading in the server @@ -19,7 +21,7 @@ - bug fix: Alt+h shortcut to open the Chat dialog did not work, use Alt+c instead - +TODO implement "support a check for updates" for the server GUI, too diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 3c2f9a8d21..bd84be89fa 100755 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -225,6 +225,11 @@ CClientDlg::CClientDlg ( CClient* pNCliP, lblGlobalInfoLabel->setStyleSheet ( ".QLabel { background: red; }" ); lblGlobalInfoLabel->hide(); + // prepare update check info label (invisible by default) + lblUpdateCheck->setText ( "" + QString ( APP_NAME ) + " " + + tr ( "software upgrade available" ) + "" ); + lblUpdateCheck->hide(); + // Connect on startup ------------------------------------------------------ if ( !strConnOnStartupAddress.isEmpty() ) @@ -749,10 +754,7 @@ void CClientDlg::OnCLVersionAndOSReceived ( CHostAddress InetAddr, #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) if ( QVersionNumber::compare ( QVersionNumber::fromString ( strVersion ), QVersionNumber::fromString ( VERSION ) ) > 0 ) { - -// TODO set update check label -qDebug() << "newer version detected, my version: " << VERSION << " central server version: " << strVersion; - + lblUpdateCheck->show(); } #endif diff --git a/src/clientdlgbase.ui b/src/clientdlgbase.ui index 063416452f..30f359d8f1 100755 --- a/src/clientdlgbase.ui +++ b/src/clientdlgbase.ui @@ -6,7 +6,7 @@ 0 0 - 345 + 425 490 @@ -568,6 +568,13 @@ + + + + Update check + + +