UI: Avoid using newlines in error messages

Some errors include HTML links directing users to e.g. driver updates
or further information. Using a raw newline instead of <br> causes Qt to
skip parsing the HTML, resulting in an ugly mess of HTML displayed to
the user instead of the intended links.
This commit is contained in:
Richard Stanway
2023-09-12 17:54:42 -07:00
committed by Lain
parent 839461dc9b
commit c71bbcf4d9
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -420,7 +420,7 @@ Output.ConnectFail.Disconnected="Disconnected from server."
# output streaming-related messages
Output.StreamEncodeError.Title="Encoding error"
Output.StreamEncodeError.Msg="An encoder error occurred while streaming."
Output.StreamEncodeError.Msg.LastError="An encoder error occurred while streaming:\n\n%1"
Output.StreamEncodeError.Msg.LastError="An encoder error occurred while streaming:<br><br>%1"
# output recording-related messages
Output.RecordFail.Title="Failed to start recording"
@@ -430,7 +430,7 @@ Output.RecordNoSpace.Msg="There is not sufficient disk space to continue recordi
Output.RecordError.Title="Recording error"
Output.RecordError.Msg="An unspecified error occurred while recording."
Output.RecordError.EncodeErrorMsg="An encoder error occurred while recording."
Output.RecordError.EncodeErrorMsg.LastError="An encoder error occurred while recording:\n\n%1"
Output.RecordError.EncodeErrorMsg.LastError="An encoder error occurred while recording:<br><br>%1"
# output recording messages
Output.BadPath.Title="Bad File Path"
+2 -2
View File
@@ -7730,8 +7730,8 @@ void OBSBasic::RecordingStop(int code, QString last_error)
errorDescription = Str("Output.RecordError.Msg");
if (use_last_error && !last_error.isEmpty())
dstr_printf(errorMessage, "%s\n\n%s", errorDescription,
QT_TO_UTF8(last_error));
dstr_printf(errorMessage, "%s<br><br>%s",
errorDescription, QT_TO_UTF8(last_error));
else
dstr_copy(errorMessage, errorDescription);