-
-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup: replace obsoleted QTime::elapsed() with QElapsedTimer::elaps…
…ed() (#4400) The latter has been present since Qt 4.7 and even on some Windows OSes where it may be a 32-Bit value that can overflow after nearly 50 days when the lower quality TickCounter clock is used as a fallback instead of the PerformanceCounter one this is a better bet than the QTime based one that will overflow (wrap) after 24 hours and will be affected by Summer-Time changes and user/system adjustment of the system clock. Also: * rename three elements related to timing the network latency, their original names were somewhat ambiguous: * (QLineEdit*) TConsole::networkLatency ==> TConsole::mpLineEdit_networkLatency * (double) cTelnet::networkLatency ==> cTelnet::networkLatencyTime * (QTime) cTelnet::networkLatencyTime ==> (QElapsedTimer) cTelnet::networkLatencyTimer * rename some other elements in a comparable way: * (QTime) cTelnet::timeOffset ==> (QElapsedTimer) cTelnet::mRecordingChunkTimer * (QTime) cTelnet::mConnectionTime ==> (QElapsedTimer) cTelnet::mConnectionTimer * (int) cTelnet::lastTimeOffset ==> (int) cTelnet::mRecordLastChunkMSecTimeOffset * simplify a C string array access - there is no need to use the address operator AND an index when referring to the start of a C array, i.e. for char buffer[datalen]: '&buffer[0]' is simply 'buffer' ! * the display of the network latency (if available) and the system processing time is a UI feature but it was not being put through the translation system, this commit now allows for that to happen. This should remove 12 warnings (on my Linux Qt 5.14.2 system). Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
- Loading branch information
Showing
6 changed files
with
62 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters