aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/applets/qt_profile_select.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-03-29 09:11:34 -0400
committerGitHub <noreply@github.com>2023-03-29 09:11:34 -0400
commit3b139a811e0321bbe0d5cbff2bf0c95128a7c68f (patch)
tree2a71c944643cda0ab019c22d1d46d58552f002ff /src/yuzu/applets/qt_profile_select.cpp
parentda0b368e12a66db9da70f77ba5651134af916338 (diff)
parenteb8abae7eb3e760e85aae09e59b9bd9a3572cd83 (diff)
Merge pull request #9505 from liamwhite/request-exit
applets: implement RequestExit
Diffstat (limited to 'src/yuzu/applets/qt_profile_select.cpp')
-rw-r--r--src/yuzu/applets/qt_profile_select.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/yuzu/applets/qt_profile_select.cpp b/src/yuzu/applets/qt_profile_select.cpp
index 4145c52998..c0a1d5ab73 100644
--- a/src/yuzu/applets/qt_profile_select.cpp
+++ b/src/yuzu/applets/qt_profile_select.cpp
@@ -157,17 +157,26 @@ void QtProfileSelectionDialog::SelectUser(const QModelIndex& index) {
QtProfileSelector::QtProfileSelector(GMainWindow& parent) {
connect(this, &QtProfileSelector::MainWindowSelectProfile, &parent,
&GMainWindow::ProfileSelectorSelectProfile, Qt::QueuedConnection);
+ connect(this, &QtProfileSelector::MainWindowRequestExit, &parent,
+ &GMainWindow::ProfileSelectorRequestExit, Qt::QueuedConnection);
connect(&parent, &GMainWindow::ProfileSelectorFinishedSelection, this,
&QtProfileSelector::MainWindowFinishedSelection, Qt::DirectConnection);
}
QtProfileSelector::~QtProfileSelector() = default;
+void QtProfileSelector::Close() const {
+ callback = {};
+ emit MainWindowRequestExit();
+}
+
void QtProfileSelector::SelectProfile(SelectProfileCallback callback_) const {
callback = std::move(callback_);
emit MainWindowSelectProfile();
}
void QtProfileSelector::MainWindowFinishedSelection(std::optional<Common::UUID> uuid) {
- callback(uuid);
+ if (callback) {
+ callback(uuid);
+ }
}