aboutsummaryrefslogtreecommitdiff
path: root/src/charselect.cpp
diff options
context:
space:
mode:
authoroldmud0 <oldmud0@users.noreply.github.com>2021-12-18 22:34:04 -0600
committeroldmud0 <oldmud0@users.noreply.github.com>2021-12-18 22:34:04 -0600
commitb0e9f8dbe57df5e688d9583987d7e378eebd72b4 (patch)
tree18824b6a05fddfa71e4c1240023fc916d8ef4790 /src/charselect.cpp
parentcf12168ebd426d7658d7f7021c47be519caa215a (diff)
parent641cca65044e41e49e5a871f0d60138b61c1bab3 (diff)
Merge branch 'master' into feature/http-ms
Diffstat (limited to 'src/charselect.cpp')
-rw-r--r--src/charselect.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/charselect.cpp b/src/charselect.cpp
index 53269b54..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);
@@ -147,7 +147,7 @@ void Courtroom::set_char_select_page()
void Courtroom::on_char_list_double_clicked(QTreeWidgetItem *p_item, int column)
{
- UNUSED(column);
+ Q_UNUSED(column);
int cid = p_item->text(1).toInt();
if (cid == -1 && !p_item->isExpanded()) {
p_item->setExpanded(true);
@@ -164,8 +164,8 @@ void Courtroom::char_clicked(int n_char)
{
if (n_char != -1)
{
- QString char_ini_path =
- ao_app->get_character_path(char_list.at(n_char).name, "char.ini");
+ QString char_ini_path = ao_app->get_real_path(
+ ao_app->get_character_path(char_list.at(n_char).name, "char.ini"));
qDebug() << "char_ini_path" << char_ini_path;
@@ -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();