mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-29 13:15:42 -04:00
AchievementLoginDialog: Pass QStrings to emulation thread
This commit is contained in:
parent
704c160c35
commit
52934aa563
@ -14,8 +14,8 @@ AchievementLoginDialog::~AchievementLoginDialog() = default;
|
|||||||
|
|
||||||
void AchievementLoginDialog::loginClicked()
|
void AchievementLoginDialog::loginClicked()
|
||||||
{
|
{
|
||||||
const std::string username(m_ui.userName->text().toStdString());
|
const QString username(m_ui.userName->text());
|
||||||
const std::string password(m_ui.password->text().toStdString());
|
const QString password(m_ui.password->text());
|
||||||
|
|
||||||
// TODO: Make cancellable.
|
// TODO: Make cancellable.
|
||||||
m_ui.status->setText(tr("Logging in..."));
|
m_ui.status->setText(tr("Logging in..."));
|
||||||
@ -24,7 +24,10 @@ void AchievementLoginDialog::loginClicked()
|
|||||||
|
|
||||||
bool result;
|
bool result;
|
||||||
QtHostInterface::GetInstance()->executeOnEmulationThread(
|
QtHostInterface::GetInstance()->executeOnEmulationThread(
|
||||||
[&username, &password, &result]() { result = Cheevos::Login(username.c_str(), password.c_str()); }, true);
|
[username, password, &result]() {
|
||||||
|
result = Cheevos::Login(username.toStdString().c_str(), password.toStdString().c_str());
|
||||||
|
},
|
||||||
|
true);
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user