From 57e21ddbd98d3de1a1f15adc396563953a25819e Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Sun, 1 Dec 2024 17:49:43 +0200 Subject: [PATCH] Fix Windows build --- src/panda_qt/config_window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panda_qt/config_window.cpp b/src/panda_qt/config_window.cpp index 2220e25af..066855b36 100644 --- a/src/panda_qt/config_window.cpp +++ b/src/panda_qt/config_window.cpp @@ -120,7 +120,7 @@ ConfigWindow::ConfigWindow(Emulator* emu, QWidget* parent) : QDialog(parent), em genLayout->setVerticalSpacing(10); QLineEdit *defaultRomPath = new QLineEdit; - defaultRomPath->setText(config.defaultRomPath.c_str()); + defaultRomPath->setText(QString::fromStdU16String(config.defaultRomPath.u16string())); connect(defaultRomPath, &QLineEdit::textChanged, this, [&](const QString &text) { config.defaultRomPath = text.toStdString(); config.save(); @@ -129,7 +129,7 @@ ConfigWindow::ConfigWindow(Emulator* emu, QWidget* parent) : QDialog(parent), em browseRomPath->setAutoDefault(false); connect(browseRomPath, &QPushButton::pressed, this, [&, defaultRomPath]() { QString newPath = QFileDialog::getExistingDirectory( - this, tr("Select Directory"), config.defaultRomPath.c_str(), + this, tr("Select Directory"), QString::fromStdU16String(config.defaultRomPath.u16string()), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks ); if (!newPath.isEmpty()) {