mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 15:15:13 +00:00
Add missed signalId check
This commit is contained in:
@@ -411,6 +411,9 @@ bool GtkIntegration::showOpenWithDialog(const QString &filepath) const {
|
|||||||
const auto context = Glib::MainContext::create();
|
const auto context = Glib::MainContext::create();
|
||||||
const auto loop = Glib::MainLoop::create(context);
|
const auto loop = Glib::MainLoop::create(context);
|
||||||
g_main_context_push_thread_default(context->gobj());
|
g_main_context_push_thread_default(context->gobj());
|
||||||
|
const auto contextGuard = gsl::finally([&] {
|
||||||
|
g_main_context_pop_thread_default(context->gobj());
|
||||||
|
});
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
const auto signalId = _private->dbusConnection->signal_subscribe(
|
const auto signalId = _private->dbusConnection->signal_subscribe(
|
||||||
@@ -442,11 +445,12 @@ bool GtkIntegration::showOpenWithDialog(const QString &filepath) const {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
QWindow window;
|
if (signalId != 0) {
|
||||||
QGuiApplicationPrivate::showModalWindow(&window);
|
QWindow window;
|
||||||
loop->run();
|
QGuiApplicationPrivate::showModalWindow(&window);
|
||||||
g_main_context_pop_thread_default(context->gobj());
|
loop->run();
|
||||||
QGuiApplicationPrivate::hideModalWindow(&window);
|
QGuiApplicationPrivate::hideModalWindow(&window);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
Submodule Telegram/lib_webview updated: e7caab807b...c56e77c901
Reference in New Issue
Block a user