yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

yuzu/about_dialog: Specify string conversions explicitly

Specifies the conversions explicitly to avoid implicit conversions from
const char* to QString. This makes it easier to disable implicit QString
conversions in the future.

In this case, the implicit conversion was technically wrong as well. The
implicit conversion treats the input strings as ASCII characters. This
would result in an incorrect conversion being performed in the rare case
a branch name was created with a non-ASCII Unicode character, likely
resulting in junk being displayed.
This commit is contained in:
Lioncash 2019-05-09 01:18:28 -04:00
parent 75a8b304d4
commit bf1829a717
1 changed files with 4 additions and 4 deletions

View File

@ -9,10 +9,10 @@
AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDialog) { AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDialog) {
ui->setupUi(this); ui->setupUi(this);
ui->labelLogo->setPixmap(QIcon::fromTheme("yuzu").pixmap(200)); ui->labelLogo->setPixmap(QIcon::fromTheme(QStringLiteral("yuzu")).pixmap(200));
ui->labelBuildInfo->setText( ui->labelBuildInfo->setText(ui->labelBuildInfo->text().arg(
ui->labelBuildInfo->text().arg(Common::g_build_fullname, Common::g_scm_branch, QString::fromUtf8(Common::g_build_fullname), QString::fromUtf8(Common::g_scm_branch),
Common::g_scm_desc, QString(Common::g_build_date).left(10))); QString::fromUtf8(Common::g_scm_desc), QString::fromUtf8(Common::g_build_date).left(10)));
} }
AboutDialog::~AboutDialog() = default; AboutDialog::~AboutDialog() = default;