summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-05-29 06:52:47 +0200
committerLioncash <mathew1800@gmail.com>2019-05-29 06:56:45 +0200
commitcfc9d92b38bae6d9815ae06bbe5e2d800887f897 (patch)
tree0e29c639d312387b9ec6e32a22fa73d084e3b4f8
parentprofile_select: Remove unnecessary GetStatus() member function (diff)
downloadyuzu-cfc9d92b38bae6d9815ae06bbe5e2d800887f897.tar
yuzu-cfc9d92b38bae6d9815ae06bbe5e2d800887f897.tar.gz
yuzu-cfc9d92b38bae6d9815ae06bbe5e2d800887f897.tar.bz2
yuzu-cfc9d92b38bae6d9815ae06bbe5e2d800887f897.tar.lz
yuzu-cfc9d92b38bae6d9815ae06bbe5e2d800887f897.tar.xz
yuzu-cfc9d92b38bae6d9815ae06bbe5e2d800887f897.tar.zst
yuzu-cfc9d92b38bae6d9815ae06bbe5e2d800887f897.zip
-rw-r--r--src/yuzu/applets/software_keyboard.cpp6
-rw-r--r--src/yuzu/applets/software_keyboard.h2
-rw-r--r--src/yuzu/main.cpp3
3 files changed, 1 insertions, 10 deletions
diff --git a/src/yuzu/applets/software_keyboard.cpp b/src/yuzu/applets/software_keyboard.cpp
index 5223ec977..af36f07c6 100644
--- a/src/yuzu/applets/software_keyboard.cpp
+++ b/src/yuzu/applets/software_keyboard.cpp
@@ -104,13 +104,11 @@ QtSoftwareKeyboardDialog::QtSoftwareKeyboardDialog(
QtSoftwareKeyboardDialog::~QtSoftwareKeyboardDialog() = default;
void QtSoftwareKeyboardDialog::accept() {
- ok = true;
text = line_edit->text().toStdU16String();
QDialog::accept();
}
void QtSoftwareKeyboardDialog::reject() {
- ok = false;
text.clear();
QDialog::reject();
}
@@ -119,10 +117,6 @@ std::u16string QtSoftwareKeyboardDialog::GetText() const {
return text;
}
-bool QtSoftwareKeyboardDialog::GetStatus() const {
- return ok;
-}
-
QtSoftwareKeyboard::QtSoftwareKeyboard(GMainWindow& main_window) {
connect(this, &QtSoftwareKeyboard::MainWindowGetText, &main_window,
&GMainWindow::SoftwareKeyboardGetText, Qt::QueuedConnection);
diff --git a/src/yuzu/applets/software_keyboard.h b/src/yuzu/applets/software_keyboard.h
index 78c5a042b..44bcece75 100644
--- a/src/yuzu/applets/software_keyboard.h
+++ b/src/yuzu/applets/software_keyboard.h
@@ -36,10 +36,8 @@ public:
void reject() override;
std::u16string GetText() const;
- bool GetStatus() const;
private:
- bool ok = false;
std::u16string text;
QDialogButtonBox* buttons;
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index cb07b64b8..92de0097e 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -259,9 +259,8 @@ void GMainWindow::SoftwareKeyboardGetText(
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 SoftwareKeyboardFinishedText(std::nullopt);
return;
}