diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-03-29 09:11:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-29 09:11:34 -0400 |
commit | 8bdc51b620f0778f53d76ad9368da97a9213d631 (patch) | |
tree | 2a71c944643cda0ab019c22d1d46d58552f002ff /src/yuzu/applets/qt_profile_select.cpp | |
parent | 9c96d40586d89fd39b1bc80455542a1e54d10dee (diff) | |
parent | 50a59487eb49baa229d553dd9a3c00aef20f799f (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.cpp | 11 |
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); + } } |