Fix assert failure due to calling versionOk on a different thread

This commit is contained in:
Jedi18 2021-01-22 10:46:31 +05:30
parent 1a4b009c7d
commit d7bdff27b0
1 changed files with 4 additions and 3 deletions

View File

@ -174,8 +174,9 @@ LoginPage::LoginPage(QWidget *parent)
setLayout(top_layout_); setLayout(top_layout_);
connect(this, &LoginPage::versionOkCb, this, &LoginPage::versionOk); connect(this, &LoginPage::versionOkCb, this, &LoginPage::versionOk, Qt::QueuedConnection);
connect(this, &LoginPage::versionErrorCb, this, &LoginPage::versionError); connect(
this, &LoginPage::versionErrorCb, this, &LoginPage::versionError, Qt::QueuedConnection);
connect(back_button_, SIGNAL(clicked()), this, SLOT(onBackButtonClicked())); connect(back_button_, SIGNAL(clicked()), this, SLOT(onBackButtonClicked()));
connect(login_button_, SIGNAL(clicked()), this, SLOT(onLoginButtonClicked())); connect(login_button_, SIGNAL(clicked()), this, SLOT(onLoginButtonClicked()));
@ -322,7 +323,7 @@ LoginPage::checkHomeserverVersion()
break; break;
} }
} }
emit versionOk(loginMethod_); emit versionOkCb(loginMethod_);
}); });
}); });
} }