From 67fdd14dcaca270ca5d84ae2ed7a946e6af113f7 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Wed, 13 Nov 2024 20:27:51 +0000 Subject: [PATCH] Cleanup --- launcher/mainwindow_moc.cpp | 5 --- launcher/mainwindow_moc.h | 1 - launcher/modManager/cmodlistview_moc.cpp | 44 +++++++------------ launcher/modManager/cmodlistview_moc.h | 8 +--- launcher/modManager/modstate.cpp | 2 +- launcher/modManager/modstatecontroller.cpp | 14 +++--- launcher/modManager/modstateitemmodel_moc.cpp | 1 - launcher/modManager/modstateitemmodel_moc.h | 2 +- lib/modding/CModHandler.cpp | 1 + 9 files changed, 27 insertions(+), 51 deletions(-) diff --git a/launcher/mainwindow_moc.cpp b/launcher/mainwindow_moc.cpp index d2752f7d5..6b0b245e5 100644 --- a/launcher/mainwindow_moc.cpp +++ b/launcher/mainwindow_moc.cpp @@ -206,11 +206,6 @@ void MainWindow::on_startEditorButton_clicked() startEditor({}); } -//const CModList & MainWindow::getModList() const -//{ -// return ui->modlistView->getModList(); -//} - CModListView * MainWindow::getModView() { return ui->modlistView; diff --git a/launcher/mainwindow_moc.h b/launcher/mainwindow_moc.h index 038460c6a..9c0dc8d7d 100644 --- a/launcher/mainwindow_moc.h +++ b/launcher/mainwindow_moc.h @@ -46,7 +46,6 @@ public: explicit MainWindow(QWidget * parent = nullptr); ~MainWindow() override; -// const CModList & getModList() const; CModListView * getModView(); void updateTranslation(); diff --git a/launcher/modManager/cmodlistview_moc.cpp b/launcher/modManager/cmodlistview_moc.cpp index 570df8072..a8fed0a8f 100644 --- a/launcher/modManager/cmodlistview_moc.cpp +++ b/launcher/modManager/cmodlistview_moc.cpp @@ -176,7 +176,7 @@ void CModListView::loadRepositories() if (settings["launcher"]["extraRepositoryEnabled"].Bool()) repositories.push_back(QString::fromStdString(settings["launcher"]["extraRepositoryURL"].String())); - for(auto entry : repositories) + for(const auto & entry : repositories) { if (entry.isEmpty()) continue; @@ -218,7 +218,7 @@ static QString replaceIfNotEmpty(QStringList value, QString pattern) return ""; } -QString CModListView::genChangelogText(ModState & mod) +QString CModListView::genChangelogText(const ModState & mod) { QString headerTemplate = "

%1:

"; QString entryBegin = "