aboutsummaryrefslogtreecommitdiff
path: root/src/charselect.cpp
diff options
context:
space:
mode:
authorSalanto <62221668+Salanto@users.noreply.github.com>2021-12-11 00:28:00 +0100
committerSalanto <62221668+Salanto@users.noreply.github.com>2021-12-11 02:09:27 +0100
commitbc49b3e976e4df01e983a9c9daea28287b9bee75 (patch)
tree9aa25ae92b58d6484c729a1a250121d54e431dfa /src/charselect.cpp
parentb8572f8afcba737182ceb243d14e82a544fb34ee (diff)
Update slots/signals to Qt5 connection style and eliminate some clazy warnings
Diffstat (limited to 'src/charselect.cpp')
-rw-r--r--src/charselect.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/charselect.cpp b/src/charselect.cpp
index 4d5edbcd..8928f446 100644
--- a/src/charselect.cpp
+++ b/src/charselect.cpp
@@ -52,25 +52,25 @@ void Courtroom::construct_char_select()
ui_char_taken->setText(tr("Taken"));
ui_char_taken->setObjectName("ui_char_taken");
- connect(ui_char_list, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)),
- this, SLOT(on_char_list_double_clicked(QTreeWidgetItem *, int)));
+ connect(ui_char_list, &QTreeWidget::itemDoubleClicked,
+ this, &Courtroom::on_char_list_double_clicked);
- connect(ui_back_to_lobby, SIGNAL(clicked()), this,
- SLOT(on_back_to_lobby_clicked()));
+ connect(ui_back_to_lobby, &AOButton::clicked, this,
+ &Courtroom::on_back_to_lobby_clicked);
- connect(ui_char_select_left, SIGNAL(clicked()), this,
- SLOT(on_char_select_left_clicked()));
- connect(ui_char_select_right, SIGNAL(clicked()), this,
- SLOT(on_char_select_right_clicked()));
+ connect(ui_char_select_left, &AOButton::clicked, this,
+ &Courtroom::on_char_select_left_clicked);
+ connect(ui_char_select_right, &AOButton::clicked, this,
+ &Courtroom::on_char_select_right_clicked);
- connect(ui_spectator, SIGNAL(clicked()), this, SLOT(on_spectator_clicked()));
+ connect(ui_spectator, &AOButton::clicked, this, &Courtroom::on_spectator_clicked);
- connect(ui_char_search, SIGNAL(textEdited(const QString &)), this,
- SLOT(on_char_search_changed()));
- connect(ui_char_passworded, SIGNAL(stateChanged(int)), this,
- SLOT(on_char_passworded_clicked()));
- connect(ui_char_taken, SIGNAL(stateChanged(int)), this,
- SLOT(on_char_taken_clicked()));
+ connect(ui_char_search, &QLineEdit::textEdited,this,
+ &Courtroom::on_char_search_changed);
+ connect(ui_char_passworded, &QCheckBox::stateChanged, this,
+ &Courtroom::on_char_passworded_clicked);
+ connect(ui_char_taken, &QCheckBox::stateChanged, this,
+ &Courtroom::on_char_taken_clicked);
}
@@ -116,7 +116,7 @@ void Courtroom::set_char_select_page()
ui_char_select_left->hide();
ui_char_select_right->hide();
- for (AOCharButton *i_button : ui_char_button_list) {
+ for (AOCharButton *i_button : qAsConst(ui_char_button_list)) {
i_button->reset();
i_button->hide();
i_button->move(0, 0);
@@ -298,9 +298,9 @@ void Courtroom::character_loading_finished()
100);
ao_app->w_lobby->set_loading_value(loading_value);
ao_app->w_lobby->set_loading_text(
- tr("Generating chars:\n%1/%2")
- .arg(QString::number(ao_app->generated_chars))
- .arg(QString::number(ao_app->char_list_size)));
+ tr("Generating chars:\n%1/%2").arg(
+ QString::number(ao_app->generated_chars),
+ QString::number(ao_app->char_list_size)));
}
}
ui_char_list->expandAll();