From c59a796a8f7853bc4a359bdcf1a5e713fc362926 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 15 Oct 2015 01:27:21 -0700 Subject: [PATCH] UI: Use byte sequence for non-breaking spaces Use explicit UTF-8 byte sequence for the "no-break space" character. Prevents issues with certain editors, and fixes the following compiler warning on Visual C++: warning C4819: The file contains a character that cannot be represented in the current code page (X). Save the file in Unicode format to prevent data loss --- obs/window-basic-settings.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/obs/window-basic-settings.cpp b/obs/window-basic-settings.cpp index 19e4f99b6..4145efd83 100644 --- a/obs/window-basic-settings.cpp +++ b/obs/window-basic-settings.cpp @@ -1402,6 +1402,8 @@ void OBSBasicSettings::LoadAudioDevices() } } +#define NBSP "\xC2\xA0" + void OBSBasicSettings::LoadAudioSources() { auto layout = new QFormLayout(); @@ -1436,7 +1438,7 @@ void OBSBasicSettings::LoadAudioSources() form->addRow(ptmCB); auto ptmSB = new SilentUpdateSpinBox(); - ptmSB->setSuffix(" ms"); + ptmSB->setSuffix(NBSP "ms"); ptmSB->setRange(0, INT_MAX); ptmSB->setValue(obs_source_get_push_to_mute_delay(source)); form->addRow(ptmDelay, ptmSB); @@ -1447,7 +1449,7 @@ void OBSBasicSettings::LoadAudioSources() form->addRow(pttCB); auto pttSB = new SilentUpdateSpinBox(); - pttSB->setSuffix(" ms"); + pttSB->setSuffix(NBSP "ms"); pttSB->setRange(0, INT_MAX); pttSB->setValue(obs_source_get_push_to_talk_delay(source)); form->addRow(pttDelay, pttSB);