From c7e884a9692aa452152a70ba23a7ada85f944c6f Mon Sep 17 00:00:00 2001 From: ann0see <20726856+ann0see@users.noreply.github.com> Date: Sat, 26 Jun 2021 21:36:41 +0200 Subject: [PATCH] Fix Ampersand not being shown correctly If a server-name contained '&' this was interpreted as keyboard shortcut in the mixer board. Replacing & by && allows us to show server-names correctly. Fixes: https://github.com/jamulussoftware/jamulus/issues/1886 --- src/audiomixerboard.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index 9a2083efff..58a652e3bc 100644 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -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() ); }