diff options
author | Jedi18 <targetakhil@gmail.com> | 2021-01-22 10:46:31 +0530 |
---|---|---|
committer | Jedi18 <targetakhil@gmail.com> | 2021-01-22 11:47:19 +0530 |
commit | d7bdff27b03fbc94c81bbad29088a572727cff4f (patch) | |
tree | 15dbf2aac1fea5dd1c98c3e5c1bf6a3b81320bb9 | |
parent | Translated using Weblate (Finnish) (diff) | |
download | nheko-d7bdff27b03fbc94c81bbad29088a572727cff4f.tar.xz |
Fix assert failure due to calling versionOk on a different thread
-rw-r--r-- | src/LoginPage.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/LoginPage.cpp b/src/LoginPage.cpp index dba5ba51..ec9b856f 100644 --- a/src/LoginPage.cpp +++ b/src/LoginPage.cpp @@ -174,8 +174,9 @@ LoginPage::LoginPage(QWidget *parent) setLayout(top_layout_); - connect(this, &LoginPage::versionOkCb, this, &LoginPage::versionOk); - connect(this, &LoginPage::versionErrorCb, this, &LoginPage::versionError); + connect(this, &LoginPage::versionOkCb, this, &LoginPage::versionOk, Qt::QueuedConnection); + connect( + this, &LoginPage::versionErrorCb, this, &LoginPage::versionError, Qt::QueuedConnection); connect(back_button_, SIGNAL(clicked()), this, SLOT(onBackButtonClicked())); connect(login_button_, SIGNAL(clicked()), this, SLOT(onLoginButtonClicked())); @@ -322,7 +323,7 @@ LoginPage::checkHomeserverVersion() break; } } - emit versionOk(loginMethod_); + emit versionOkCb(loginMethod_); }); }); } |