mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 16:25:45 +00:00
yuzu/configuration/configure_web: Specify string conversions explicitly
Allows the web config code to compile with implicit string conversions disabled. We can also deduplicate the calls to create the pixmap.
This commit is contained in:
parent
e587f53654
commit
a6309ae255
1 changed files with 16 additions and 8 deletions
|
@ -78,12 +78,16 @@ void ConfigureWeb::RefreshTelemetryID() {
|
||||||
void ConfigureWeb::OnLoginChanged() {
|
void ConfigureWeb::OnLoginChanged() {
|
||||||
if (ui->edit_username->text().isEmpty() && ui->edit_token->text().isEmpty()) {
|
if (ui->edit_username->text().isEmpty() && ui->edit_token->text().isEmpty()) {
|
||||||
user_verified = true;
|
user_verified = true;
|
||||||
ui->label_username_verified->setPixmap(QIcon::fromTheme("checked").pixmap(16));
|
|
||||||
ui->label_token_verified->setPixmap(QIcon::fromTheme("checked").pixmap(16));
|
const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("checked")).pixmap(16);
|
||||||
|
ui->label_username_verified->setPixmap(pixmap);
|
||||||
|
ui->label_token_verified->setPixmap(pixmap);
|
||||||
} else {
|
} else {
|
||||||
user_verified = false;
|
user_verified = false;
|
||||||
ui->label_username_verified->setPixmap(QIcon::fromTheme("failed").pixmap(16));
|
|
||||||
ui->label_token_verified->setPixmap(QIcon::fromTheme("failed").pixmap(16));
|
const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("failed")).pixmap(16);
|
||||||
|
ui->label_username_verified->setPixmap(pixmap);
|
||||||
|
ui->label_token_verified->setPixmap(pixmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,11 +105,15 @@ void ConfigureWeb::OnLoginVerified() {
|
||||||
ui->button_verify_login->setText(tr("Verify"));
|
ui->button_verify_login->setText(tr("Verify"));
|
||||||
if (verify_watcher.result()) {
|
if (verify_watcher.result()) {
|
||||||
user_verified = true;
|
user_verified = true;
|
||||||
ui->label_username_verified->setPixmap(QIcon::fromTheme("checked").pixmap(16));
|
|
||||||
ui->label_token_verified->setPixmap(QIcon::fromTheme("checked").pixmap(16));
|
const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("checked")).pixmap(16);
|
||||||
|
ui->label_username_verified->setPixmap(pixmap);
|
||||||
|
ui->label_token_verified->setPixmap(pixmap);
|
||||||
} else {
|
} else {
|
||||||
ui->label_username_verified->setPixmap(QIcon::fromTheme("failed").pixmap(16));
|
const QPixmap pixmap = QIcon::fromTheme(QStringLiteral("failed")).pixmap(16);
|
||||||
ui->label_token_verified->setPixmap(QIcon::fromTheme("failed").pixmap(16));
|
ui->label_username_verified->setPixmap(pixmap);
|
||||||
|
ui->label_token_verified->setPixmap(pixmap);
|
||||||
|
|
||||||
QMessageBox::critical(
|
QMessageBox::critical(
|
||||||
this, tr("Verification failed"),
|
this, tr("Verification failed"),
|
||||||
tr("Verification failed. Check that you have entered your username and token "
|
tr("Verification failed. Check that you have entered your username and token "
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue