diff --git a/ChangeLog.txt b/ChangeLog.txt index 7a9ba9e9e..17f7ed26c 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -8,6 +8,7 @@ Default Qt Client - Updated Qt to 6.10.1 on Windows - Option to disable sound device detection notifications in statusbar events - Ukranian translation +- Speak Client Statistics now refreshes ping on Ctrl+T - Fixed bug where the value of the Show chat history as list view instead of text edit setting was sometimes deleted - Fixed bug where only first resolved IP-address was used for connection attempt Android Client diff --git a/Client/qtTeamTalk/mainwindow.cpp b/Client/qtTeamTalk/mainwindow.cpp index 7bef4af8b..72655dff2 100644 --- a/Client/qtTeamTalk/mainwindow.cpp +++ b/Client/qtTeamTalk/mainwindow.cpp @@ -1158,6 +1158,9 @@ void MainWindow::clienteventCmdProcessing(int cmdid, bool complete) case CMD_COMPLETE_LOGIN: cmdCompleteLoggedIn(TT_GetMyUserID(ttInst)); break; + case CMD_COMPLETE_PING: + speakClientStats(); + break; case CMD_COMPLETE_JOINCHANNEL: break; case CMD_COMPLETE_LIST_CHANNELBANS: @@ -8044,6 +8047,20 @@ void MainWindow::closeEvent(QCloseEvent *event) } void MainWindow::slotSpeakClientStats(bool /*checked = false*/) +{ + if (TT_GetFlags(ttInst) & CLIENT_CONNECTED) + { + int cmdid = TT_DoPing(ttInst); + if (cmdid > 0) + { + m_commands.insert(cmdid, CMD_COMPLETE_PING); + return; + } + } + speakClientStats(); +} + +void MainWindow::speakClientStats() { ClientStatistics stats = {}; TT_GetClientStatistics(ttInst, &stats); diff --git a/Client/qtTeamTalk/mainwindow.h b/Client/qtTeamTalk/mainwindow.h index 18a8dee4d..0adb30a06 100644 --- a/Client/qtTeamTalk/mainwindow.h +++ b/Client/qtTeamTalk/mainwindow.h @@ -53,7 +53,8 @@ enum CommandComplete CMD_COMPLETE_SUBSCRIBE, CMD_COMPLETE_UNSUBSCRIBE, - CMD_COMPLETE_SAVECONFIG + CMD_COMPLETE_SAVECONFIG, + CMD_COMPLETE_PING }; enum TimerEvent @@ -246,6 +247,7 @@ class MainWindow : public QMainWindow /* 'mode' is mask of 'AudioStorageMode' */ void updateAudioStorage(bool enable, AudioStorageMode mode); void updateAudioConfig(); + void speakClientStats(); bool sendDesktopWindow(); void restartSendDesktopWindowTimer(); void sendDesktopCursor();