UI: Use QT_TO_UTF8 with name dialog
Could potentially use the wrong locale otherwise.
This commit is contained in:
parent
b787c796cd
commit
bd9706c8ac
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user