-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor UpdateDisplay() to call UpdateUploadRate() #3369
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1063,25 +1063,31 @@ void CClientSettingsDlg::OnSndCrdBufferDelayButtonGroupClicked ( QAbstractButton | |
UpdateDisplay(); | ||
} | ||
|
||
/// @method | ||
/// @brief Sets upstream rate label to current upload rate if the client is connected, else resets label | ||
void CClientSettingsDlg::UpdateUploadRate() | ||
{ | ||
// update upstream rate information label | ||
lblUpstreamValue->setText ( QString().setNum ( pClient->GetUploadRateKbps() ) ); | ||
lblUpstreamUnit->setText ( "kbps" ); | ||
// update upstream rate information label if needed | ||
if ( pClient->IsConnected() ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. That's from https://github.com/jamulussoftware/jamulus/pull/2550/files#diff-d5cde46c72d0c085d1d2c0ca59957407b17931c2f194a33268b3535169006629R1042 A potential semantic change. Probably worth reverting to IsRunning() unless proven to be incorrect. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd like to hear a second OK/not OK from someone nevertheless. |
||
{ | ||
lblUpstreamValue->setText ( QString().setNum ( pClient->GetUploadRateKbps() ) ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is
So it makes far more sense to check the But really, it's down to the audio settings, nothing to do with whether a sound card is connected or a server is connected: |
||
lblUpstreamUnit->setText ( "kbps" ); | ||
} | ||
else | ||
{ | ||
// clear text labels with client parameters | ||
lblUpstreamValue->setText ( "---" ); | ||
lblUpstreamUnit->setText ( "" ); | ||
} | ||
} | ||
|
||
/// @method | ||
/// @brief Updates slider controls (settings might have been changed) and upstream rate information label | ||
void CClientSettingsDlg::UpdateDisplay() | ||
{ | ||
// update slider controls (settings might have been changed) | ||
UpdateJitterBufferFrame(); | ||
UpdateSoundCardFrame(); | ||
|
||
if ( !pClient->IsRunning() ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is
|
||
{ | ||
// clear text labels with client parameters | ||
lblUpstreamValue->setText ( "---" ); | ||
lblUpstreamUnit->setText ( "" ); | ||
} | ||
UpdateUploadRate(); | ||
} | ||
|
||
void CClientSettingsDlg::UpdateDirectoryComboBox() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably no need to add @ method here.