Skip to content

Commit

Permalink
Fix ampersand not being shown correctly
Browse files Browse the repository at this point in the history
If a server-name contained '&' this was interpreted as keyboard shortcut.
Replacing & by && allows us to show server-names correctly.
Fixes: jamulussoftware#1886
  • Loading branch information
ann0see committed Jun 26, 2021
1 parent 1796a98 commit a149af2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/audiomixerboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,14 @@ void CAudioMixerBoard::UpdateTitle()
strTitlePrefix = "[" + tr ( "RECORDING ACTIVE" ) + "] ";
}

setTitle ( strTitlePrefix + tr ( "Personal Mix at: " ) + strServerName );
// replace & signs with && (See Qt documentation for QLabel)
// if strServerName includes an "&" sign, this is interpreted as keyboard shortcut (#1886)
// it might be possible to find a more elegant solution here?

QString strEscServerName = strServerName;
strEscServerName.replace ( "&", "&&" );

setTitle ( strTitlePrefix + tr ( "Personal Mix at: " ) + strEscServerName );
setAccessibleName ( title() );
}

Expand Down

0 comments on commit a149af2

Please sign in to comment.