diff options
Diffstat (limited to 'src/yuzu')
-rw-r--r-- | src/yuzu/debugger/wait_tree.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/main.cpp | 14 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index 3b23d0bbe..d0926d723 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp @@ -316,7 +316,7 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeEvent::GetChildren() const { list.push_back(std::make_unique<WaitTreeText>( tr("reset type = %1") - .arg(GetResetTypeQString(static_cast<const Kernel::Event&>(object).reset_type)))); + .arg(GetResetTypeQString(static_cast<const Kernel::Event&>(object).GetResetType())))); return list; } diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e28679cd1..d0415a7dc 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -654,9 +654,8 @@ void GMainWindow::OnMenuRecentFile() { QAction* action = qobject_cast<QAction*>(sender()); assert(action); - QString filename = action->data().toString(); - QFileInfo file_info(filename); - if (file_info.exists()) { + const QString filename = action->data().toString(); + if (QFileInfo::exists(filename)) { BootGame(filename); } else { // Display an error message and remove the file from the list. @@ -947,15 +946,14 @@ void GMainWindow::UpdateUITheme() { QStringList theme_paths(default_theme_paths); if (UISettings::values.theme != UISettings::themes[0].second && !UISettings::values.theme.isEmpty()) { - QString theme_uri(":" + UISettings::values.theme + "/style.qss"); + const QString theme_uri(":" + UISettings::values.theme + "/style.qss"); QFile f(theme_uri); - if (!f.exists()) { - LOG_ERROR(Frontend, "Unable to set style, stylesheet file not found"); - } else { - f.open(QFile::ReadOnly | QFile::Text); + if (f.open(QFile::ReadOnly | QFile::Text)) { QTextStream ts(&f); qApp->setStyleSheet(ts.readAll()); GMainWindow::setStyleSheet(ts.readAll()); + } else { + LOG_ERROR(Frontend, "Unable to set style, stylesheet file not found"); } theme_paths.append(QStringList{":/icons/default", ":/icons/" + UISettings::values.theme}); QIcon::setThemeName(":/icons/" + UISettings::values.theme); |