From 75a48db1459d4c386b867ae6536ff481adf34f1f Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Thu, 6 Apr 2023 15:57:55 -0400 Subject: Move call to get status HTML info into ListItem This makes the code less of a mess and will allow moving more of the code that renders HTML status info into the ListItem class. --- src/mainwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index b08fd14..d635ae8 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -73,9 +73,9 @@ void MainWindow::on_actionAbout_triggered(bool checked) { } void MainWindow::on_listWidget_itemActivated(QListWidgetItem *item) { - ListItem* casted = dynamic_cast(item); - if (casted != nullptr) { - QString status_info = data_archive->get_html_status_info(casted->get_status_index(), ui->statusInfoText->width(), casted->get_status_type(), &locale_context); + ListItem* status = dynamic_cast(item); + if (status != nullptr) { + QString status_info = status->get_info_html(ui->statusInfoText->width(), &locale_context); ui->statusInfoText->setHtml(status_info); } } -- cgit v1.2.3-54-g00ecf