summaryrefslogtreecommitdiff
path: root/src/yuzu/applets
diff options
context:
space:
mode:
authorZach Hilman <DarkLordZach@users.noreply.github.com>2019-06-05 15:30:51 -0400
committerGitHub <noreply@github.com>2019-06-05 15:30:51 -0400
commit1eb979221f6664938456cefdbd5c79b7e59e2b8c (patch)
treecffa349913d1abdd72a5fcc1e3735830f2fd45e2 /src/yuzu/applets
parentdd4fe0dab1c6a5559e416833a89ca4520b69a74c (diff)
parentcfc9d92b38bae6d9815ae06bbe5e2d800887f897 (diff)
Merge pull request #2527 from lioncash/index
yuzu/{profile_select, software_keyboard}: Tidy up interface
Diffstat (limited to 'src/yuzu/applets')
-rw-r--r--src/yuzu/applets/profile_select.cpp8
-rw-r--r--src/yuzu/applets/profile_select.h8
-rw-r--r--src/yuzu/applets/software_keyboard.cpp6
-rw-r--r--src/yuzu/applets/software_keyboard.h2
4 files changed, 4 insertions, 20 deletions
diff --git a/src/yuzu/applets/profile_select.cpp b/src/yuzu/applets/profile_select.cpp
index 42e26b978..6b5c7ba61 100644
--- a/src/yuzu/applets/profile_select.cpp
+++ b/src/yuzu/applets/profile_select.cpp
@@ -122,21 +122,15 @@ QtProfileSelectionDialog::QtProfileSelectionDialog(QWidget* parent)
QtProfileSelectionDialog::~QtProfileSelectionDialog() = default;
void QtProfileSelectionDialog::accept() {
- ok = true;
QDialog::accept();
}
void QtProfileSelectionDialog::reject() {
- ok = false;
user_index = 0;
QDialog::reject();
}
-bool QtProfileSelectionDialog::GetStatus() const {
- return ok;
-}
-
-u32 QtProfileSelectionDialog::GetIndex() const {
+int QtProfileSelectionDialog::GetIndex() const {
return user_index;
}
diff --git a/src/yuzu/applets/profile_select.h b/src/yuzu/applets/profile_select.h
index c5b90a78e..cee886a77 100644
--- a/src/yuzu/applets/profile_select.h
+++ b/src/yuzu/applets/profile_select.h
@@ -30,15 +30,13 @@ public:
void accept() override;
void reject() override;
- bool GetStatus() const;
- u32 GetIndex() const;
+ int GetIndex() const;
private:
- bool ok = false;
- u32 user_index = 0;
-
void SelectUser(const QModelIndex& index);
+ int user_index = 0;
+
QVBoxLayout* layout;
QTreeView* tree_view;
QStandardItemModel* item_model;
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;