Skip to content

Commit

Permalink
support a check for updates (#370) -> client GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
corrados committed Aug 30, 2020
1 parent 00ac4c6 commit bcdb11a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
4 changes: 3 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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



Expand Down
10 changes: 6 additions & 4 deletions src/clientdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ( "<font color=""red""><b>" + QString ( APP_NAME ) + " " +
tr ( "software upgrade available" ) + "</b></font>" );
lblUpdateCheck->hide();


// Connect on startup ------------------------------------------------------
if ( !strConnOnStartupAddress.isEmpty() )
Expand Down Expand Up @@ -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

Expand Down
9 changes: 8 additions & 1 deletion src/clientdlgbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>345</width>
<width>425</width>
<height>490</height>
</rect>
</property>
Expand Down Expand Up @@ -568,6 +568,13 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblUpdateCheck">
<property name="text">
<string>Update check</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
Expand Down

0 comments on commit bcdb11a

Please sign in to comment.