From bd9706c8ac4765aaf6feeefeb4a5f3055d330a83 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Tue, 20 Jun 2017 18:19:30 -0700 Subject: [PATCH] UI: Use QT_TO_UTF8 with name dialog Could potentially use the wrong locale otherwise. --- UI/window-namedialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UI/window-namedialog.cpp b/UI/window-namedialog.cpp index 38f15dfbf..93193acbf 100644 --- a/UI/window-namedialog.cpp +++ b/UI/window-namedialog.cpp @@ -16,6 +16,7 @@ ******************************************************************************/ #include "window-namedialog.hpp" +#include "qt-wrappers.hpp" #include "ui_NameDialog.h" #include "obs-app.hpp" @@ -46,7 +47,7 @@ bool NameDialog::AskForName(QWidget *parent, const QString &title, bool accepted = (dialog.exec() == DialogCode::Accepted); if (accepted) { - str = dialog.ui->userText->text().toStdString(); + str = QT_TO_UTF8(dialog.ui->userText->text()); while (str.size() && IsWhitespace(str.back())) str.erase(str.end() - 1);