summaryrefslogtreecommitdiffstats
path: root/src/yuzu/applets/qt_profile_select.cpp
diff options
context:
space:
mode:
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 4145c5299..c0a1d5ab7 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);
+ }
}