mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Fix freeze after creating file dialog
This commit is contained in:
parent
01b4a24ac7
commit
1261c775d4
1 changed files with 7 additions and 7 deletions
|
@ -569,13 +569,6 @@ int XDPFileDialog::exec() {
|
||||||
setAttribute(Qt::WA_ShowModal, true);
|
setAttribute(Qt::WA_ShowModal, true);
|
||||||
setResult(0);
|
setResult(0);
|
||||||
|
|
||||||
show();
|
|
||||||
if (failedToOpen()) {
|
|
||||||
return result();
|
|
||||||
}
|
|
||||||
|
|
||||||
QPointer<QDialog> guard = this;
|
|
||||||
|
|
||||||
// HACK we have to avoid returning until we emit
|
// HACK we have to avoid returning until we emit
|
||||||
// that the dialog was accepted or rejected
|
// that the dialog was accepted or rejected
|
||||||
const auto context = Glib::MainContext::create();
|
const auto context = Glib::MainContext::create();
|
||||||
|
@ -593,6 +586,13 @@ int XDPFileDialog::exec() {
|
||||||
loop->quit();
|
loop->quit();
|
||||||
}, lifetime);
|
}, lifetime);
|
||||||
|
|
||||||
|
show();
|
||||||
|
if (failedToOpen()) {
|
||||||
|
return result();
|
||||||
|
}
|
||||||
|
|
||||||
|
QPointer<QDialog> guard = this;
|
||||||
|
|
||||||
loop->run();
|
loop->run();
|
||||||
g_main_context_pop_thread_default(context->gobj());
|
g_main_context_pop_thread_default(context->gobj());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue