mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-16 05:20:04 +00:00
d80edd99d7
* 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. * yuzu/main: Move window title updating logic to its own function For similar reasons to the previous change, we move this to a single function, so we don't need to duplicate the conversion logic in several places within main.cpp.
21 lines
809 B
C++
21 lines
809 B
C++
// Copyright 2017 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#include <QIcon>
|
|
#include "aboutdialog.h"
|
|
#include "common/scm_rev.h"
|
|
#include "ui_aboutdialog.h"
|
|
|
|
AboutDialog::AboutDialog(QWidget* parent)
|
|
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowSystemMenuHint),
|
|
ui(new Ui::AboutDialog) {
|
|
ui->setupUi(this);
|
|
ui->labelLogo->setPixmap(QIcon::fromTheme(QStringLiteral("citra")).pixmap(200));
|
|
ui->labelBuildInfo->setText(ui->labelBuildInfo->text().arg(
|
|
QString::fromUtf8(Common::g_build_fullname), QString::fromUtf8(Common::g_scm_branch),
|
|
QString::fromUtf8(Common::g_scm_desc), QString::fromUtf8(Common::g_build_date).left(10)));
|
|
}
|
|
|
|
AboutDialog::~AboutDialog() = default;
|