mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Add missed signalId check
This commit is contained in:
parent
b335741f99
commit
22d23c8be1
2 changed files with 10 additions and 6 deletions
|
@ -411,6 +411,9 @@ bool GtkIntegration::showOpenWithDialog(const QString &filepath) const {
|
|||
const auto context = Glib::MainContext::create();
|
||||
const auto loop = Glib::MainLoop::create(context);
|
||||
g_main_context_push_thread_default(context->gobj());
|
||||
const auto contextGuard = gsl::finally([&] {
|
||||
g_main_context_pop_thread_default(context->gobj());
|
||||
});
|
||||
bool result = false;
|
||||
|
||||
const auto signalId = _private->dbusConnection->signal_subscribe(
|
||||
|
@ -442,11 +445,12 @@ bool GtkIntegration::showOpenWithDialog(const QString &filepath) const {
|
|||
}
|
||||
});
|
||||
|
||||
QWindow window;
|
||||
QGuiApplicationPrivate::showModalWindow(&window);
|
||||
loop->run();
|
||||
g_main_context_pop_thread_default(context->gobj());
|
||||
QGuiApplicationPrivate::hideModalWindow(&window);
|
||||
if (signalId != 0) {
|
||||
QWindow window;
|
||||
QGuiApplicationPrivate::showModalWindow(&window);
|
||||
loop->run();
|
||||
QGuiApplicationPrivate::hideModalWindow(&window);
|
||||
}
|
||||
|
||||
return result;
|
||||
} catch (...) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit e7caab807b0b81dd0f138f59798d9fd3544261dc
|
||||
Subproject commit c56e77c9013f6749b8e7e5fa4c13dfe7002e7c6e
|
Loading…
Add table
Reference in a new issue