aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-05-29 00:34:42 -0400
committerLioncash <mathew1800@gmail.com>2019-05-29 00:56:41 -0400
commit802dd3cc95aee9e7ba3a5005e291beb65612b52b (patch)
treeba5e21e90404819ef075e4ac6860be77c098a952 /src/yuzu/main.cpp
parent139301c5a12b769d5a13dec55589ed7fb5dc7bdf (diff)
profile_select: Remove unnecessary GetStatus() member function
This behavior is already provided by the built-in exec() function. We just need to check the return value of it.
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r--src/yuzu/main.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 1e24b90284..cb07b64b88 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -238,9 +238,7 @@ void GMainWindow::ProfileSelectorSelectProfile() {
dialog.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint |
Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint);
dialog.setWindowModality(Qt::WindowModal);
- dialog.exec();
-
- if (!dialog.GetStatus()) {
+ if (dialog.exec() == QDialog::Rejected) {
emit ProfileSelectorFinishedSelection(std::nullopt);
return;
}
@@ -901,11 +899,12 @@ void GMainWindow::SelectAndSetCurrentUser() {
dialog.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint |
Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint);
dialog.setWindowModality(Qt::WindowModal);
- dialog.exec();
- if (dialog.GetStatus()) {
- Settings::values.current_user = dialog.GetIndex();
+ if (dialog.exec() == QDialog::Rejected) {
+ return;
}
+
+ Settings::values.current_user = dialog.GetIndex();
}
void GMainWindow::BootGame(const QString& filename) {
@@ -1060,9 +1059,8 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target
dialog.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint |
Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint);
dialog.setWindowModality(Qt::WindowModal);
- dialog.exec();
- if (!dialog.GetStatus()) {
+ if (dialog.exec() == QDialog::Rejected) {
return -1;
}