mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-24 03:57:50 -05:00
qt: implement RequestExit for applets
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user