From 9c10965997d873b0de56deef5d5ec5e768db1d8f Mon Sep 17 00:00:00 2001
From: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date: Thu, 1 Jun 2023 16:39:04 -0700
Subject: refactor: split out setting api headers for downloads

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
---
 launcher/ui/pages/modplatform/ResourceModel.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'launcher/ui/pages/modplatform/ResourceModel.cpp')

diff --git a/launcher/ui/pages/modplatform/ResourceModel.cpp b/launcher/ui/pages/modplatform/ResourceModel.cpp
index 49405a02..3e0c0257 100644
--- a/launcher/ui/pages/modplatform/ResourceModel.cpp
+++ b/launcher/ui/pages/modplatform/ResourceModel.cpp
@@ -17,7 +17,7 @@
 #include "BuildConfig.h"
 #include "Json.h"
 
-#include "net/Download.h"
+#include "net/ApiDownload.h"
 #include "net/NetJob.h"
 
 #include "modplatform/ModIndex.h"
@@ -281,7 +281,7 @@ std::optional<QIcon> ResourceModel::getIcon(QModelIndex& index, const QUrl& url)
     auto cache_entry = APPLICATION->metacache()->resolveEntry(
         metaEntryBase(),
         QString("logos/%1").arg(QString(QCryptographicHash::hash(url.toEncoded(), QCryptographicHash::Algorithm::Sha1).toHex())));
-    auto icon_fetch_action = Net::Download::makeCached(url, cache_entry);
+    auto icon_fetch_action = Net::ApiDownload::makeCached(url, cache_entry);
 
     auto full_file_path = cache_entry->getFullPath();
     connect(icon_fetch_action.get(), &NetAction::succeeded, this, [=] {
-- 
cgit 


From 8d7dcdfc5b2a231a1304878e25929e6f4ff4e338 Mon Sep 17 00:00:00 2001
From: Rachel Powers <508861+Ryex@users.noreply.github.com>
Date: Fri, 30 Jun 2023 23:51:15 -0700
Subject: chore: fix shadowed member and signed/unsigned mismatch

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: supress unused with [[maybe_unused]]

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: unshadow ^&^& static_cast implicit return

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: deshadow and mark unused in parse task

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: mark unused in folder models

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: deshadow and mark unused with instances

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: more deshadow and unused

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: remove uneeded simicolons

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: mark unused

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: prevent shadow

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
---
 launcher/DesktopServices.cpp                       |   2 +-
 launcher/InstanceList.cpp                          | 128 ++++++++++-----------
 launcher/NullInstance.h                            |   2 +-
 launcher/RecursiveFileSystemWatcher.cpp            |   2 +-
 launcher/VersionProxyModel.cpp                     |  36 +++---
 launcher/filelink/FileLink.cpp                     |   2 +-
 launcher/icons/IconUtils.cpp                       |   4 +-
 launcher/meta/BaseEntity.cpp                       |   6 +-
 launcher/minecraft/MinecraftInstance.cpp           |   6 +-
 launcher/minecraft/MojangDownloadInfo.h            |  10 +-
 launcher/minecraft/OneSixVersionFormat.cpp         |   2 +-
 launcher/minecraft/PackProfile.cpp                 |  18 +--
 launcher/minecraft/PackProfile.h                   |   2 +-
 launcher/minecraft/ProfileUtils.cpp                |   2 +-
 launcher/minecraft/World.cpp                       |  12 +-
 launcher/minecraft/WorldList.cpp                   |  11 +-
 launcher/minecraft/auth/AccountData.cpp            |   4 +-
 launcher/minecraft/auth/AccountList.cpp            |   2 +-
 launcher/minecraft/auth/Parsers.cpp                |   8 +-
 launcher/minecraft/auth/steps/EntitlementsStep.cpp |   4 +-
 launcher/minecraft/gameoptions/GameOptions.cpp     |   3 +-
 launcher/minecraft/launch/LauncherPartLaunch.cpp   |   2 +-
 launcher/minecraft/mod/Mod.h                       |   2 +-
 launcher/minecraft/mod/ModDetails.h                |  19 ++-
 launcher/minecraft/mod/ModFolderModel.cpp          |   2 +-
 launcher/minecraft/mod/ResourceFolderModel.cpp     |   6 +-
 launcher/minecraft/mod/ResourceFolderModel.h       |   4 +-
 launcher/minecraft/mod/ResourcePackFolderModel.cpp |   3 +-
 launcher/minecraft/mod/TexturePackFolderModel.cpp  |   2 +-
 .../minecraft/mod/tasks/GetModDependenciesTask.cpp |  20 ++--
 launcher/minecraft/mod/tasks/LocalModParseTask.cpp |  26 ++---
 launcher/minecraft/services/CapeChange.cpp         |   2 +-
 launcher/modplatform/ModIndex.h                    |   2 +-
 launcher/modplatform/ResourceAPI.h                 |   4 +-
 launcher/modplatform/flame/FileResolvingTask.cpp   |   2 +-
 launcher/modplatform/flame/FlameModIndex.cpp       |   7 +-
 .../modplatform/helpers/NetworkResourceAPI.cpp     |   3 +-
 .../modrinth/ModrinthPackExportTask.cpp            |  12 +-
 .../modplatform/modrinth/ModrinthPackIndex.cpp     |   6 +-
 launcher/modplatform/packwiz/Packwiz.cpp           |   5 +-
 .../modplatform/technic/TechnicPackProcessor.cpp   |  16 ++-
 launcher/news/NewsEntry.cpp                        |   7 +-
 launcher/screenshots/ImgurAlbumCreation.cpp        |   2 +-
 launcher/screenshots/ImgurUpload.cpp               |   2 +-
 launcher/tasks/ConcurrentTask.cpp                  |   2 +-
 launcher/tasks/Task.h                              |   7 +-
 launcher/tools/JProfiler.cpp                       |   2 +-
 launcher/tools/JVisualVM.cpp                       |   2 +-
 launcher/translations/POTranslator.cpp             |   2 +-
 launcher/translations/TranslationsModel.cpp        |  12 +-
 launcher/ui/MainWindow.cpp                         |  27 ++---
 launcher/ui/dialogs/CopyInstanceDialog.cpp         |   2 +-
 launcher/ui/dialogs/ExportInstanceDialog.cpp       |   8 +-
 launcher/ui/dialogs/NewInstanceDialog.cpp          |   2 +-
 launcher/ui/dialogs/ProfileSetupDialog.cpp         |  16 +--
 launcher/ui/dialogs/ProgressDialog.cpp             |  20 ++--
 launcher/ui/dialogs/ProgressDialog.h               |   2 +-
 launcher/ui/dialogs/ResourceDownloadDialog.cpp     |   2 +-
 launcher/ui/dialogs/ReviewMessageBox.cpp           |   2 +-
 launcher/ui/dialogs/SkinUploadDialog.cpp           |   6 +-
 launcher/ui/instanceview/InstanceDelegate.cpp      |  22 ++--
 launcher/ui/instanceview/InstanceView.cpp          |  82 ++++++-------
 launcher/ui/instanceview/VisualGroup.cpp           |   6 +-
 launcher/ui/pages/global/AccountListPage.cpp       |   5 +-
 launcher/ui/pages/global/JavaPage.cpp              |   2 +-
 launcher/ui/pages/global/ProxyPage.cpp             |   2 +-
 .../ui/pages/instance/ExternalResourcesPage.cpp    |   2 +-
 .../ui/pages/instance/InstanceSettingsPage.cpp     |   2 +-
 launcher/ui/pages/instance/ModFolderPage.cpp       |   2 +-
 launcher/ui/pages/instance/OtherLogsPage.cpp       |  22 ++--
 launcher/ui/pages/instance/ResourcePackPage.cpp    |   2 +-
 launcher/ui/pages/instance/ServersPage.cpp         |   4 +-
 launcher/ui/pages/instance/TexturePackPage.cpp     |   2 +-
 launcher/ui/pages/instance/VersionPage.cpp         |   4 +-
 launcher/ui/pages/instance/WorldListPage.cpp       |   2 +-
 launcher/ui/pages/modplatform/ImportPage.cpp       |   6 +-
 launcher/ui/pages/modplatform/ResourceModel.cpp    |   6 +-
 .../ui/pages/modplatform/ResourcePackModel.cpp     |   3 +-
 launcher/ui/pages/modplatform/ResourcePage.cpp     |   6 +-
 launcher/ui/pages/modplatform/ResourcePage.h       |   5 +-
 launcher/ui/pages/modplatform/ShaderPackModel.cpp  |   3 +-
 .../atlauncher/AtlOptionalModDialog.cpp            |  16 +--
 .../modplatform/atlauncher/AtlOptionalModDialog.h  |   2 +-
 .../ui/pages/modplatform/atlauncher/AtlPage.cpp    |  12 +-
 launcher/ui/pages/modplatform/flame/FlameModel.cpp |   4 +-
 launcher/ui/pages/modplatform/flame/FlamePage.cpp  |   6 +-
 .../modplatform/flame/FlameResourceModels.cpp      |   2 +-
 .../ui/pages/modplatform/legacy_ftb/ListModel.cpp  |   6 +-
 launcher/ui/pages/modplatform/legacy_ftb/Page.cpp  |  18 +--
 .../pages/modplatform/modrinth/ModrinthModel.cpp   |   4 +-
 .../ui/pages/modplatform/modrinth/ModrinthPage.cpp |   6 +-
 .../modrinth/ModrinthResourceModels.cpp            |   2 +-
 .../ui/pages/modplatform/technic/TechnicPage.cpp   |   8 +-
 launcher/ui/themes/CustomTheme.cpp                 |   2 +-
 launcher/ui/widgets/InfoFrame.cpp                  |   6 +-
 launcher/ui/widgets/SubTaskProgressBar.cpp         |   2 +-
 96 files changed, 409 insertions(+), 413 deletions(-)

(limited to 'launcher/ui/pages/modplatform/ResourceModel.cpp')

diff --git a/launcher/DesktopServices.cpp b/launcher/DesktopServices.cpp
index 2984a1b4..c2002126 100644
--- a/launcher/DesktopServices.cpp
+++ b/launcher/DesktopServices.cpp
@@ -104,7 +104,7 @@ bool IndirectOpen(T callable, qint64 *pid_forked = nullptr)
 #endif
 
 namespace DesktopServices {
-bool openDirectory(const QString &path, bool ensureExists)
+bool openDirectory(const QString &path, [[maybe_unused]] bool ensureExists)
 {
     qDebug() << "Opening directory" << path;
     QDir parentPath;
diff --git a/launcher/InstanceList.cpp b/launcher/InstanceList.cpp
index b361b286..a5950659 100644
--- a/launcher/InstanceList.cpp
+++ b/launcher/InstanceList.cpp
@@ -41,9 +41,9 @@
 #include <QJsonArray>
 #include <QJsonDocument>
 #include <QMimeData>
+#include <QPair>
 #include <QSet>
 #include <QStack>
-#include <QPair>
 #include <QTextStream>
 #include <QThread>
 #include <QTimer>
@@ -96,7 +96,11 @@ Qt::DropActions InstanceList::supportedDropActions() const
     return Qt::MoveAction;
 }
 
-bool InstanceList::canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const
+bool InstanceList::canDropMimeData(const QMimeData* data,
+                                   [[maybe_unused]] Qt::DropAction action,
+                                   [[maybe_unused]] int row,
+                                   [[maybe_unused]] int column,
+                                   [[maybe_unused]] const QModelIndex& parent) const
 {
     if (data && data->hasFormat("application/x-instanceid")) {
         return true;
@@ -104,7 +108,11 @@ bool InstanceList::canDropMimeData(const QMimeData* data, Qt::DropAction action,
     return false;
 }
 
-bool InstanceList::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent)
+bool InstanceList::dropMimeData(const QMimeData* data,
+                                [[maybe_unused]] Qt::DropAction action,
+                                [[maybe_unused]] int row,
+                                [[maybe_unused]] int column,
+                                [[maybe_unused]] const QModelIndex& parent)
 {
     if (data && data->hasFormat("application/x-instanceid")) {
         return true;
@@ -129,7 +137,7 @@ QMimeData* InstanceList::mimeData(const QModelIndexList& indexes) const
     return mimeData;
 }
 
-QStringList InstanceList::getLinkedInstancesById(const QString &id) const
+QStringList InstanceList::getLinkedInstancesById(const QString& id) const
 {
     QStringList linkedInstances;
     for (auto inst : m_instances) {
@@ -158,42 +166,34 @@ QVariant InstanceList::data(const QModelIndex& index, int role) const
     if (!index.isValid()) {
         return QVariant();
     }
-    BaseInstance *pdata = static_cast<BaseInstance *>(index.internalPointer());
-    switch (role)
-    {
-    case InstancePointerRole:
-    {
-        QVariant v = QVariant::fromValue((void *)pdata);
-        return v;
-    }
-    case InstanceIDRole:
-    {
-        return pdata->id();
-    }
-    case Qt::EditRole:
-    case Qt::DisplayRole:
-    {
-        return pdata->name();
-    }
-    case Qt::AccessibleTextRole:
-    {
-        return tr("%1 Instance").arg(pdata->name());
-    }
-    case Qt::ToolTipRole:
-    {
-        return pdata->instanceRoot();
-    }
-    case Qt::DecorationRole:
-    {
-        return pdata->iconKey();
-    }
-    // HACK: see InstanceView.h in gui!
-    case GroupRole:
-    {
-        return getInstanceGroup(pdata->id());
-    }
-    default:
-        break;
+    BaseInstance* pdata = static_cast<BaseInstance*>(index.internalPointer());
+    switch (role) {
+        case InstancePointerRole: {
+            QVariant v = QVariant::fromValue((void*)pdata);
+            return v;
+        }
+        case InstanceIDRole: {
+            return pdata->id();
+        }
+        case Qt::EditRole:
+        case Qt::DisplayRole: {
+            return pdata->name();
+        }
+        case Qt::AccessibleTextRole: {
+            return tr("%1 Instance").arg(pdata->name());
+        }
+        case Qt::ToolTipRole: {
+            return pdata->instanceRoot();
+        }
+        case Qt::DecorationRole: {
+            return pdata->iconKey();
+        }
+        // HACK: see InstanceView.h in gui!
+        case GroupRole: {
+            return getInstanceGroup(pdata->id());
+        }
+        default:
+            break;
     }
     return QVariant();
 }
@@ -320,16 +320,18 @@ bool InstanceList::trashInstance(const InstanceId& id)
     }
 
     qDebug() << "Instance" << id << "has been trashed by the launcher.";
-    m_trashHistory.push({id, inst->instanceRoot(), trashedLoc, cachedGroupId});
-    
+    m_trashHistory.push({ id, inst->instanceRoot(), trashedLoc, cachedGroupId });
+
     return true;
 }
 
-bool InstanceList::trashedSomething() {
+bool InstanceList::trashedSomething()
+{
     return !m_trashHistory.empty();
 }
 
-void InstanceList::undoTrashInstance() {
+void InstanceList::undoTrashInstance()
+{
     if (m_trashHistory.empty()) {
         qWarning() << "Nothing to recover from trash.";
         return;
@@ -558,7 +560,7 @@ InstancePtr InstanceList::getInstanceByManagedName(const QString& managed_name)
     return {};
 }
 
-QModelIndex InstanceList::getInstanceIndexById(const QString &id) const
+QModelIndex InstanceList::getInstanceIndexById(const QString& id) const
 {
     return index(getInstIndex(getInstanceById(id).get()));
 }
@@ -597,13 +599,11 @@ InstancePtr InstanceList::loadInstance(const InstanceId& id)
 
     QString inst_type = instanceSettings->get("InstanceType").toString();
 
-    // NOTE: Some PolyMC versions didn't save the InstanceType properly. We will just bank on the probability that this is probably a OneSix instance
-    if (inst_type == "OneSix" || inst_type.isEmpty())
-    {
+    // NOTE: Some PolyMC versions didn't save the InstanceType properly. We will just bank on the probability that this is probably a OneSix
+    // instance
+    if (inst_type == "OneSix" || inst_type.isEmpty()) {
         inst.reset(new MinecraftInstance(m_globalSettings, instanceSettings, instanceRoot));
-    }
-    else
-    {
+    } else {
         inst.reset(new NullInstance(m_globalSettings, instanceSettings, instanceRoot));
     }
     qDebug() << "Loaded instance " << inst->name() << " from " << inst->instanceRoot();
@@ -759,7 +759,7 @@ void InstanceList::instanceDirContentsChanged(const QString& path)
     emit instancesChanged();
 }
 
-void InstanceList::on_InstFolderChanged(const Setting& setting, QVariant value)
+void InstanceList::on_InstFolderChanged( [[maybe_unused]] const Setting& setting, QVariant value)
 {
     QString newInstDir = QDir(value.toString()).canonicalPath();
     if (newInstDir != m_instDir) {
@@ -820,21 +820,17 @@ class InstanceStaging : public Task {
 
         return Task::abort();
     }
-    bool canAbort() const override
-    {
-        return (m_child && m_child->canAbort());
-    }
+    bool canAbort() const override { return (m_child && m_child->canAbort()); }
 
    protected:
     virtual void executeTask() override { m_child->start(); }
     QStringList warnings() const override { return m_child->warnings(); }
 
    private slots:
-    void childSucceded()
+    void childSucceeded()
     {
         unsigned sleepTime = backoff();
-        if (m_parent->commitStagedInstance(m_stagingPath, m_instance_name, m_groupName, *m_child.get()))
-        {
+        if (m_parent->commitStagedInstance(m_stagingPath, m_instance_name, m_groupName, *m_child.get())) {
             emitSucceeded();
             return;
         }
@@ -852,13 +848,10 @@ class InstanceStaging : public Task {
         emitFailed(reason);
     }
 
-    void childAborted()
-    {
-        emitAborted();
-    }
+    void childAborted() { emitAborted(); }
 
-private:
-    InstanceList * m_parent;
+   private:
+    InstanceList* m_parent;
     /*
      * WHY: the whole reason why this uses an exponential backoff retry scheme is antivirus on Windows.
      * Basically, it starts messing things up while the launcher is extracting/creating instances
@@ -897,7 +890,10 @@ QString InstanceList::getStagedInstancePath()
     return path;
 }
 
-bool InstanceList::commitStagedInstance(const QString& path, InstanceName const& instanceName, const QString& groupName, InstanceTask const& commiting)
+bool InstanceList::commitStagedInstance(const QString& path,
+                                        InstanceName const& instanceName,
+                                        const QString& groupName,
+                                        InstanceTask const& commiting)
 {
     QDir dir;
     QString instID;
diff --git a/launcher/NullInstance.h b/launcher/NullInstance.h
index 53edfa0b..0f7434bb 100644
--- a/launcher/NullInstance.h
+++ b/launcher/NullInstance.h
@@ -70,7 +70,7 @@ public:
     {
         return nullptr;
     }
-    shared_qobject_ptr< Task > createUpdateTask(Net::Mode mode) override
+    shared_qobject_ptr< Task > createUpdateTask([[maybe_unused]] Net::Mode mode) override
     {
         return nullptr;
     }
diff --git a/launcher/RecursiveFileSystemWatcher.cpp b/launcher/RecursiveFileSystemWatcher.cpp
index b7417cdf..be4d1fde 100644
--- a/launcher/RecursiveFileSystemWatcher.cpp
+++ b/launcher/RecursiveFileSystemWatcher.cpp
@@ -105,7 +105,7 @@ void RecursiveFileSystemWatcher::fileChange(const QString &path)
 {
     emit fileChanged(path);
 }
-void RecursiveFileSystemWatcher::directoryChange(const QString &path)
+void RecursiveFileSystemWatcher::directoryChange([[maybe_unused]] const QString& path)
 {
     setFiles(scanRecursive(m_root));
 }
diff --git a/launcher/VersionProxyModel.cpp b/launcher/VersionProxyModel.cpp
index e5c66566..ce3abe38 100644
--- a/launcher/VersionProxyModel.cpp
+++ b/launcher/VersionProxyModel.cpp
@@ -199,16 +199,12 @@ QVariant VersionProxyModel::data(const QModelIndex &index, int role) const
                 {
                     if(hasRecommended)
                     {
-                        auto value = sourceModel()->data(parentIndex, BaseVersionList::RecommendedRole);
-                        if(value.toBool())
-                        {
+                        auto recommended = sourceModel()->data(parentIndex, BaseVersionList::RecommendedRole);
+                        if (recommended.toBool()) {
                             return tr("Recommended");
-                        }
-                        else if(hasLatest)
-                        {
-                            auto value = sourceModel()->data(parentIndex, BaseVersionList::LatestRole);
-                            if(value.toBool())
-                            {
+                        } else if (hasLatest) {
+                            auto latest = sourceModel()->data(parentIndex, BaseVersionList::LatestRole);
+                            if (latest.toBool()) {
                                 return tr("Latest");
                             }
                         }
@@ -228,16 +224,12 @@ QVariant VersionProxyModel::data(const QModelIndex &index, int role) const
                 {
                     if(hasRecommended)
                     {
-                        auto value = sourceModel()->data(parentIndex, BaseVersionList::RecommendedRole);
-                        if(value.toBool())
-                        {
+                        auto recommenced = sourceModel()->data(parentIndex, BaseVersionList::RecommendedRole);
+                        if (recommenced.toBool()) {
                             return APPLICATION->getThemedIcon("star");
-                        }
-                        else if(hasLatest)
-                        {
-                            auto value = sourceModel()->data(parentIndex, BaseVersionList::LatestRole);
-                            if(value.toBool())
-                            {
+                        } else if (hasLatest) {
+                            auto latest = sourceModel()->data(parentIndex, BaseVersionList::LatestRole);
+                            if (latest.toBool()) {
                                 return APPLICATION->getThemedIcon("bug");
                             }
                         }
@@ -270,7 +262,7 @@ QVariant VersionProxyModel::data(const QModelIndex &index, int role) const
     }
 }
 
-QModelIndex VersionProxyModel::parent(const QModelIndex &child) const
+QModelIndex VersionProxyModel::parent([[maybe_unused]] const QModelIndex& child) const
 {
     return QModelIndex();
 }
@@ -469,7 +461,9 @@ void VersionProxyModel::sourceRowsAboutToBeInserted(const QModelIndex& parent, i
     beginInsertRows(parent, first, last);
 }
 
-void VersionProxyModel::sourceRowsInserted(const QModelIndex& parent, int first, int last)
+void VersionProxyModel::sourceRowsInserted([[maybe_unused]] const QModelIndex& parent,
+                                           [[maybe_unused]] int first,
+                                           [[maybe_unused]] int last)
 {
     endInsertRows();
 }
@@ -479,7 +473,7 @@ void VersionProxyModel::sourceRowsAboutToBeRemoved(const QModelIndex& parent, in
     beginRemoveRows(parent, first, last);
 }
 
-void VersionProxyModel::sourceRowsRemoved(const QModelIndex& parent, int first, int last)
+void VersionProxyModel::sourceRowsRemoved([[maybe_unused]] const QModelIndex& parent, [[maybe_unused]] int first, [[maybe_unused]] int last)
 {
     endRemoveRows();
 }
diff --git a/launcher/filelink/FileLink.cpp b/launcher/filelink/FileLink.cpp
index c9599b82..2650bb03 100644
--- a/launcher/filelink/FileLink.cpp
+++ b/launcher/filelink/FileLink.cpp
@@ -248,7 +248,7 @@ void FileLinkApp::readPathPairs()
     in >> numLinks;
     qDebug() << "numLinks" << numLinks;
 
-    for (int i = 0; i < numLinks; i++) {
+    for (quint32 i = 0; i < numLinks; i++) {
         FS::LinkPair pair;
         in >> pair.src;
         in >> pair.dst;
diff --git a/launcher/icons/IconUtils.cpp b/launcher/icons/IconUtils.cpp
index bf530c16..4015b329 100644
--- a/launcher/icons/IconUtils.cpp
+++ b/launcher/icons/IconUtils.cpp
@@ -19,7 +19,7 @@ std::array<const char *, 6> validIconExtensions = {{
 namespace IconUtils{
 
 QString findBestIconIn(const QString &folder, const QString & iconKey) {
-    int best_found = validIconExtensions.size();
+    size_t best_found = validIconExtensions.size();
     QString best_filename;
 
     QDirIterator it(folder, QDir::NoDotAndDotDot | QDir::Files, QDirIterator::NoIteratorFlags);
@@ -32,7 +32,7 @@ QString findBestIconIn(const QString &folder, const QString & iconKey) {
 
         auto extension = fileInfo.suffix();
 
-        for(int i = 0; i < best_found; i++) {
+        for(size_t i = 0; i < best_found; i++) {
             if(extension == validIconExtensions[i]) {
                 best_found = i;
                 qDebug() << i << " : " << fileInfo.fileName();
diff --git a/launcher/meta/BaseEntity.cpp b/launcher/meta/BaseEntity.cpp
index 97815eba..6acf2bbd 100644
--- a/launcher/meta/BaseEntity.cpp
+++ b/launcher/meta/BaseEntity.cpp
@@ -40,7 +40,7 @@ public: /* methods */
     }
     bool write(QByteArray & data) override
     {
-        this->data.append(data);
+        this->m_data.append(data);
         return true;
     }
     bool abort() override
@@ -52,7 +52,7 @@ public: /* methods */
         auto fname = m_entity->localFilename();
         try
         {
-            auto doc = Json::requireDocument(data, fname);
+            auto doc = Json::requireDocument(m_data, fname);
             auto obj = Json::requireObject(doc, fname);
             m_entity->parse(obj);
             return true;
@@ -65,7 +65,7 @@ public: /* methods */
     }
 
 private: /* data */
-    QByteArray data;
+    QByteArray m_data;
     Meta::BaseEntity *m_entity;
 };
 
diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp
index aab930de..974e3b38 100644
--- a/launcher/minecraft/MinecraftInstance.cpp
+++ b/launcher/minecraft/MinecraftInstance.cpp
@@ -1061,8 +1061,8 @@ shared_qobject_ptr<LaunchTask> MinecraftInstance::createLaunchTask(AuthSessionPt
 
     {
         // actually launch the game
-        auto method = launchMethod();
-        if(method == "LauncherPart")
+        auto launch_method = launchMethod();
+        if(launch_method == "LauncherPart")
         {
             auto step = makeShared<LauncherPartLaunch>(pptr);
             step->setWorkingDirectory(gameRoot());
@@ -1070,7 +1070,7 @@ shared_qobject_ptr<LaunchTask> MinecraftInstance::createLaunchTask(AuthSessionPt
             step->setServerToJoin(serverToJoin);
             process->appendStep(step);
         }
-        else if (method == "DirectJava")
+        else if (launch_method == "DirectJava")
         {
             auto step = makeShared<DirectJavaLaunch>(pptr);
             step->setWorkingDirectory(gameRoot());
diff --git a/launcher/minecraft/MojangDownloadInfo.h b/launcher/minecraft/MojangDownloadInfo.h
index 784374c8..6831d8d8 100644
--- a/launcher/minecraft/MojangDownloadInfo.h
+++ b/launcher/minecraft/MojangDownloadInfo.h
@@ -23,7 +23,7 @@ struct MojangDownloadInfo
 
 struct MojangLibraryDownloadInfo
 {
-    MojangLibraryDownloadInfo(MojangDownloadInfo::Ptr artifact): artifact(artifact) {}
+    MojangLibraryDownloadInfo(MojangDownloadInfo::Ptr artifact_): artifact(artifact_) {}
     MojangLibraryDownloadInfo() {}
 
     // types
@@ -57,20 +57,20 @@ struct MojangAssetIndexInfo : public MojangDownloadInfo
     {
     }
 
-    MojangAssetIndexInfo(QString id)
+    MojangAssetIndexInfo(QString id_)
     {
-        this->id = id;
+        this->id = id_;
         // HACK: ignore assets from other version files than Minecraft
         // workaround for stupid assets issue caused by amazon:
         // https://www.theregister.co.uk/2017/02/28/aws_is_awol_as_s3_goes_haywire/
-        if(id == "legacy")
+        if(id_ == "legacy")
         {
             url = "https://piston-meta.mojang.com/mc/assets/legacy/c0fd82e8ce9fbc93119e40d96d5a4e62cfa3f729/legacy.json";
         }
         // HACK
         else
         {
-            url = "https://s3.amazonaws.com/Minecraft.Download/indexes/" + id + ".json";
+            url = "https://s3.amazonaws.com/Minecraft.Download/indexes/" + id_ + ".json";
         }
         known = false;
     }
diff --git a/launcher/minecraft/OneSixVersionFormat.cpp b/launcher/minecraft/OneSixVersionFormat.cpp
index b586198b..ddd98110 100644
--- a/launcher/minecraft/OneSixVersionFormat.cpp
+++ b/launcher/minecraft/OneSixVersionFormat.cpp
@@ -413,7 +413,7 @@ QJsonDocument OneSixVersionFormat::versionFileToJson(const VersionFilePtr &patch
 }
 
 LibraryPtr OneSixVersionFormat::plusJarModFromJson(
-    ProblemContainer & problems,
+    [[maybe_unused]] ProblemContainer & problems,
     const QJsonObject &libObj,
     const QString &filename,
     const QString &originalName
diff --git a/launcher/minecraft/PackProfile.cpp b/launcher/minecraft/PackProfile.cpp
index aff05dbc..2b014fb6 100644
--- a/launcher/minecraft/PackProfile.cpp
+++ b/launcher/minecraft/PackProfile.cpp
@@ -225,11 +225,11 @@ static bool loadPackProfile(PackProfile * parent, const QString & filename, cons
         auto orderArray = Json::requireArray(obj.value("components"));
         for(auto item: orderArray)
         {
-            auto obj = Json::requireObject(item, "Component must be an object.");
-            container.append(componentFromJsonV1(parent, componentJsonPattern, obj));
+            auto comp_obj = Json::requireObject(item, "Component must be an object.");
+            container.append(componentFromJsonV1(parent, componentJsonPattern, comp_obj));
         }
     }
-    catch (const JSONValidationError &err)
+    catch ([[maybe_unused]] const JSONValidationError &err)
     {
         qCritical() << "Couldn't parse" << componentsFile.fileName() << ": bad file format";
         container.clear();
@@ -414,7 +414,7 @@ void PackProfile::insertComponent(size_t index, ComponentPtr component)
         qWarning() << "Attempt to add a component that is already present!";
         return;
     }
-    beginInsertRows(QModelIndex(), index, index);
+    beginInsertRows(QModelIndex(), static_cast<int>(index), static_cast<int>(index));
     d->components.insert(index, component);
     d->componentIndex[id] = component;
     endInsertRows();
@@ -427,7 +427,7 @@ void PackProfile::componentDataChanged()
     auto objPtr = qobject_cast<Component *>(sender());
     if(!objPtr)
     {
-        qWarning() << "PackProfile got dataChenged signal from a non-Component!";
+        qWarning() << "PackProfile got dataChanged signal from a non-Component!";
         return;
     }
     if(objPtr->getID() == "net.minecraft") {
@@ -445,7 +445,7 @@ void PackProfile::componentDataChanged()
         }
         index++;
     }
-    qWarning() << "PackProfile got dataChenged signal from a Component which does not belong to it!";
+    qWarning() << "PackProfile got dataChanged signal from a Component which does not belong to it!";
 }
 
 bool PackProfile::remove(const int index)
@@ -532,9 +532,9 @@ ComponentPtr PackProfile::getComponent(const QString &id)
     return (*iter);
 }
 
-ComponentPtr PackProfile::getComponent(int index)
+ComponentPtr PackProfile::getComponent(size_t index)
 {
-    if(index < 0 || index >= d->components.size())
+    if(index < 0 || index >= static_cast<size_t>(d->components.size()))
     {
         return nullptr;
     }
@@ -615,7 +615,7 @@ QVariant PackProfile::data(const QModelIndex &index, int role) const
     return QVariant();
 }
 
-bool PackProfile::setData(const QModelIndex& index, const QVariant& value, int role)
+bool PackProfile::setData(const QModelIndex& index, [[maybe_unused]] const QVariant& value, int role)
 {
     if (!index.isValid() || index.row() < 0 || index.row() >= rowCount(index.parent()))
     {
diff --git a/launcher/minecraft/PackProfile.h b/launcher/minecraft/PackProfile.h
index d144d875..06741c2d 100644
--- a/launcher/minecraft/PackProfile.h
+++ b/launcher/minecraft/PackProfile.h
@@ -145,7 +145,7 @@ public:
     ComponentPtr getComponent(const QString &id);
 
     /// get the profile component by index
-    ComponentPtr getComponent(int index);
+    ComponentPtr getComponent(size_t index);
 
     /// Add the component to the internal list of patches
     // todo(merged): is this the best approach
diff --git a/launcher/minecraft/ProfileUtils.cpp b/launcher/minecraft/ProfileUtils.cpp
index 03f8c198..14557003 100644
--- a/launcher/minecraft/ProfileUtils.cpp
+++ b/launcher/minecraft/ProfileUtils.cpp
@@ -92,7 +92,7 @@ bool readOverrideOrders(QString path, PatchOrder &order)
             order.append(Json::requireString(item));
         }
     }
-    catch (const JSONValidationError &err)
+    catch ([[maybe_unused]] const JSONValidationError &err)
     {
         qCritical() << "Couldn't parse" << orderFile.fileName() << ": bad file format";
         qWarning() << "Ignoring overriden order";
diff --git a/launcher/minecraft/World.cpp b/launcher/minecraft/World.cpp
index 54fb9434..21f2c439 100644
--- a/launcher/minecraft/World.cpp
+++ b/launcher/minecraft/World.cpp
@@ -408,13 +408,13 @@ optional<QString> read_string (nbt::value& parent, const char * name)
         auto & tag_str = namedValue.as<nbt::tag_string>();
         return QString::fromStdString(tag_str.get());
     }
-    catch (const std::out_of_range &e)
+    catch ([[maybe_unused]] const std::out_of_range &e)
     {
         // fallback for old world formats
         qWarning() << "String NBT tag" << name << "could not be found.";
         return nullopt;
     }
-    catch (const std::bad_cast &e)
+    catch ([[maybe_unused]] const std::bad_cast &e)
     {
         // type mismatch
         qWarning() << "NBT tag" << name << "could not be converted to string.";
@@ -434,13 +434,13 @@ optional<int64_t> read_long (nbt::value& parent, const char * name)
         auto & tag_str = namedValue.as<nbt::tag_long>();
         return tag_str.get();
     }
-    catch (const std::out_of_range &e)
+    catch ([[maybe_unused]] const std::out_of_range &e)
     {
         // fallback for old world formats
         qWarning() << "Long NBT tag" << name << "could not be found.";
         return nullopt;
     }
-    catch (const std::bad_cast &e)
+    catch ([[maybe_unused]] const std::bad_cast &e)
     {
         // type mismatch
         qWarning() << "NBT tag" << name << "could not be converted to long.";
@@ -460,13 +460,13 @@ optional<int> read_int (nbt::value& parent, const char * name)
         auto & tag_str = namedValue.as<nbt::tag_int>();
         return tag_str.get();
     }
-    catch (const std::out_of_range &e)
+    catch ([[maybe_unused]] const std::out_of_range &e)
     {
         // fallback for old world formats
         qWarning() << "Int NBT tag" << name << "could not be found.";
         return nullopt;
     }
-    catch (const std::bad_cast &e)
+    catch ([[maybe_unused]] const std::bad_cast &e)
     {
         // type mismatch
         qWarning() << "NBT tag" << name << "could not be converted to int.";
diff --git a/launcher/minecraft/WorldList.cpp b/launcher/minecraft/WorldList.cpp
index 0feee299..fe089378 100644
--- a/launcher/minecraft/WorldList.cpp
+++ b/launcher/minecraft/WorldList.cpp
@@ -278,7 +278,7 @@ QVariant WorldList::data(const QModelIndex &index, int role) const
     }
 }
 
-QVariant WorldList::headerData(int section, Qt::Orientation orientation, int role) const
+QVariant WorldList::headerData(int section, [[maybe_unused]] Qt::Orientation orientation, int role) const
 {
     switch (role)
     {
@@ -320,7 +320,6 @@ QVariant WorldList::headerData(int section, Qt::Orientation orientation, int rol
     default:
         return QVariant();
     }
-    return QVariant();
 }
 
 QStringList WorldList::mimeTypes() const
@@ -373,7 +372,7 @@ QMimeData *WorldList::mimeData(const QModelIndexList &indexes) const
     if (indexes.size() == 0)
         return new QMimeData();
 
-    QList<World> worlds;
+    QList<World> worlds_;
     for(auto idx : indexes)
     {
         if(idx.column() != 0)
@@ -381,13 +380,13 @@ QMimeData *WorldList::mimeData(const QModelIndexList &indexes) const
         int row = idx.row();
         if (row < 0 || row >= this->worlds.size())
             continue;
-        worlds.append(this->worlds[row]);
+        worlds_.append(this->worlds[row]);
     }
-    if(!worlds.size())
+    if(!worlds_.size())
     {
         return new QMimeData();
     }
-    return new WorldMimeData(worlds);
+    return new WorldMimeData(worlds_);
 }
 
 Qt::ItemFlags WorldList::flags(const QModelIndex &index) const
diff --git a/launcher/minecraft/auth/AccountData.cpp b/launcher/minecraft/auth/AccountData.cpp
index 44f7e256..334c63b5 100644
--- a/launcher/minecraft/auth/AccountData.cpp
+++ b/launcher/minecraft/auth/AccountData.cpp
@@ -310,7 +310,7 @@ bool AccountData::resumeStateFromV2(QJsonObject data) {
         QJsonObject profileObject = profileVal.toObject();
         QString id = profileObject.value("id").toString("");
         QString name = profileObject.value("name").toString("");
-        bool legacy = profileObject.value("legacy").toBool(false);
+        bool legacy_ = profileObject.value("legacy").toBool(false);
         if (id.isEmpty() || name.isEmpty())
         {
             qWarning() << "Unable to load a profile" << name << "because it was missing an ID or a name.";
@@ -319,7 +319,7 @@ bool AccountData::resumeStateFromV2(QJsonObject data) {
         if(id == currentProfile) {
             currentProfileIndex = index;
         }
-        profiles.append({id, name, legacy});
+        profiles.append({id, name, legacy_});
     }
     auto & profile = profiles[currentProfileIndex];
 
diff --git a/launcher/minecraft/auth/AccountList.cpp b/launcher/minecraft/auth/AccountList.cpp
index c2794147..bf663f2d 100644
--- a/launcher/minecraft/auth/AccountList.cpp
+++ b/launcher/minecraft/auth/AccountList.cpp
@@ -365,7 +365,7 @@ QVariant AccountList::data(const QModelIndex &index, int role) const
     }
 }
 
-QVariant AccountList::headerData(int section, Qt::Orientation orientation, int role) const
+QVariant AccountList::headerData(int section, [[maybe_unused]] Qt::Orientation orientation, int role) const
 {
     switch (role)
     {
diff --git a/launcher/minecraft/auth/Parsers.cpp b/launcher/minecraft/auth/Parsers.cpp
index f3d9ad56..98326272 100644
--- a/launcher/minecraft/auth/Parsers.cpp
+++ b/launcher/minecraft/auth/Parsers.cpp
@@ -107,16 +107,16 @@ bool parseXTokenResponse(QByteArray & data, Katabasis::Token &output, QString na
         if(!item.isObject()) {
             continue;
         }
-        auto obj = item.toObject();
-        if(obj.contains("uhs")) {
+        auto obj_ = item.toObject();
+        if(obj_.contains("uhs")) {
             foundUHS = true;
         } else {
             continue;
         }
         // consume all 'display claims' ... whatever that means
-        for(auto iter = obj.begin(); iter != obj.end(); iter++) {
+        for(auto iter = obj_.begin(); iter != obj_.end(); iter++) {
             QString claim;
-            if(!getString(obj.value(iter.key()), claim)) {
+            if(!getString(obj_.value(iter.key()), claim)) {
                 qWarning() << "display claim " << iter.key() << " is not a string...";
                 return false;
             }
diff --git a/launcher/minecraft/auth/steps/EntitlementsStep.cpp b/launcher/minecraft/auth/steps/EntitlementsStep.cpp
index bd604292..b5682708 100644
--- a/launcher/minecraft/auth/steps/EntitlementsStep.cpp
+++ b/launcher/minecraft/auth/steps/EntitlementsStep.cpp
@@ -35,9 +35,9 @@ void EntitlementsStep::rehydrate() {
 }
 
 void EntitlementsStep::onRequestDone(
-    QNetworkReply::NetworkError error,
+    [[maybe_unused]] QNetworkReply::NetworkError error,
     QByteArray data,
-    QList<QNetworkReply::RawHeaderPair> headers
+    [[maybe_unused]] QList<QNetworkReply::RawHeaderPair> headers
 ) {
     auto requestor = qobject_cast<AuthRequest *>(QObject::sender());
     requestor->deleteLater();
diff --git a/launcher/minecraft/gameoptions/GameOptions.cpp b/launcher/minecraft/gameoptions/GameOptions.cpp
index e547b32a..ce0988cc 100644
--- a/launcher/minecraft/gameoptions/GameOptions.cpp
+++ b/launcher/minecraft/gameoptions/GameOptions.cpp
@@ -112,12 +112,11 @@ QVariant GameOptions::data(const QModelIndex& index, int role) const
     default:
         return QVariant();
     }
-    return QVariant();
 }
 
 int GameOptions::rowCount(const QModelIndex&) const
 {
-    return contents.size();
+    return static_cast<int>(contents.size());
 }
 
 int GameOptions::columnCount(const QModelIndex&) const
diff --git a/launcher/minecraft/launch/LauncherPartLaunch.cpp b/launcher/minecraft/launch/LauncherPartLaunch.cpp
index 8ecf715d..01df8543 100644
--- a/launcher/minecraft/launch/LauncherPartLaunch.cpp
+++ b/launcher/minecraft/launch/LauncherPartLaunch.cpp
@@ -54,7 +54,7 @@ LauncherPartLaunch::LauncherPartLaunch(LaunchTask *parent) : LaunchStep(parent)
     if (instance->settings()->get("CloseAfterLaunch").toBool())
     {
         std::shared_ptr<QMetaObject::Connection> connection{new QMetaObject::Connection};
-        *connection = connect(&m_process, &LoggedProcess::log, this, [=](QStringList lines, MessageLevel::Enum level) {
+        *connection = connect(&m_process, &LoggedProcess::log, this, [=](QStringList lines, [[maybe_unused]] MessageLevel::Enum level) {
             qDebug() << lines;
             if (lines.filter(QRegularExpression(".*Setting user.+", QRegularExpression::CaseInsensitiveOption)).length() != 0)
             {
diff --git a/launcher/minecraft/mod/Mod.h b/launcher/minecraft/mod/Mod.h
index d4e419f4..9aa05f31 100644
--- a/launcher/minecraft/mod/Mod.h
+++ b/launcher/minecraft/mod/Mod.h
@@ -72,7 +72,7 @@ public:
     auto issueTracker() const -> QString;
 
     /** Get the intneral path to the mod's icon file*/
-    QString iconPath() const { return m_local_details.icon_file; };
+    QString iconPath() const { return m_local_details.icon_file; }
     /** Gets the icon of the mod, converted to a QPixmap for drawing, and scaled to size. */
     [[nodiscard]] QPixmap icon(QSize size, Qt::AspectRatioMode mode = Qt::AspectRatioMode::IgnoreAspectRatio) const;
     /** Thread-safe. */
diff --git a/launcher/minecraft/mod/ModDetails.h b/launcher/minecraft/mod/ModDetails.h
index b4e59d52..ae36baa8 100644
--- a/launcher/minecraft/mod/ModDetails.h
+++ b/launcher/minecraft/mod/ModDetails.h
@@ -59,17 +59,17 @@ struct ModLicense {
     ModLicense() {}
 
     ModLicense(const QString license) {
-        // FIXME: come up with a better license parseing. 
+        // FIXME: come up with a better license parsing. 
         // handle SPDX identifiers? https://spdx.org/licenses/
         auto parts = license.split(' ');
         QStringList notNameParts  = {};
         for (auto part : parts) {
-            auto url = QUrl(part);
+            auto _url = QUrl(part);
             if (part.startsWith("(") && part.endsWith(")"))
-                url = QUrl(part.mid(1, part.size() - 2));
+                _url = QUrl(part.mid(1, part.size() - 2));
 
-            if (url.isValid() && !url.scheme().isEmpty() && !url.host().isEmpty()) {
-                this->url = url.toString();
+            if (_url.isValid() && !_url.scheme().isEmpty() && !_url.host().isEmpty()) {
+                this->url = _url.toString();
                 notNameParts.append(part);
                 continue;
             }
@@ -89,12 +89,9 @@ struct ModLicense {
         
     }
 
-    ModLicense(const QString name, const QString id, const QString url, const QString description) {
-        this->name = name;
-        this->id = id;
-        this->url = url;
-        this->description = description;
-    }
+    ModLicense(const QString& name_, const QString& id_, const QString& url_, const QString& description_)
+        : name(name_), id(id_), url(url_), description(description_)
+    {}
 
     ModLicense(const ModLicense& other)
         : name(other.name)
diff --git a/launcher/minecraft/mod/ModFolderModel.cpp b/launcher/minecraft/mod/ModFolderModel.cpp
index af98d834..5cb53d3c 100644
--- a/launcher/minecraft/mod/ModFolderModel.cpp
+++ b/launcher/minecraft/mod/ModFolderModel.cpp
@@ -139,7 +139,7 @@ QVariant ModFolderModel::data(const QModelIndex &index, int role) const
     }
 }
 
-QVariant ModFolderModel::headerData(int section, Qt::Orientation orientation, int role) const
+QVariant ModFolderModel::headerData(int section, [[maybe_unused]] Qt::Orientation orientation, int role) const
 {
     switch (role)
     {
diff --git a/launcher/minecraft/mod/ResourceFolderModel.cpp b/launcher/minecraft/mod/ResourceFolderModel.cpp
index 7700fd36..a5533bbd 100644
--- a/launcher/minecraft/mod/ResourceFolderModel.cpp
+++ b/launcher/minecraft/mod/ResourceFolderModel.cpp
@@ -457,7 +457,7 @@ QVariant ResourceFolderModel::data(const QModelIndex& index, int role) const
     }
 }
 
-bool ResourceFolderModel::setData(const QModelIndex& index, const QVariant& value, int role)
+bool ResourceFolderModel::setData(const QModelIndex& index, [[maybe_unused]] const QVariant& value, int role)
 {
     int row = index.row();
     if (row < 0 || row >= rowCount(index.parent()) || !index.isValid())
@@ -469,7 +469,7 @@ bool ResourceFolderModel::setData(const QModelIndex& index, const QVariant& valu
     return false;
 }
 
-QVariant ResourceFolderModel::headerData(int section, Qt::Orientation orientation, int role) const
+QVariant ResourceFolderModel::headerData(int section, [[maybe_unused]] Qt::Orientation orientation, int role) const
 {
     switch (role) {
         case Qt::DisplayRole:
@@ -594,7 +594,7 @@ void ResourceFolderModel::enableInteraction(bool enabled)
 }
 
 /* Standard Proxy Model for createFilterProxyModel */
-[[nodiscard]] bool ResourceFolderModel::ProxyModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
+[[nodiscard]] bool ResourceFolderModel::ProxyModel::filterAcceptsRow(int source_row, [[maybe_unused]] const QModelIndex& source_parent) const
 {
     auto* model = qobject_cast<ResourceFolderModel*>(sourceModel());
     if (!model)
diff --git a/launcher/minecraft/mod/ResourceFolderModel.h b/launcher/minecraft/mod/ResourceFolderModel.h
index 016679dd..d2fb5ad6 100644
--- a/launcher/minecraft/mod/ResourceFolderModel.h
+++ b/launcher/minecraft/mod/ResourceFolderModel.h
@@ -97,9 +97,9 @@ class ResourceFolderModel : public QAbstractListModel {
 
     /* Basic columns */
     enum Columns { ACTIVE_COLUMN = 0, NAME_COLUMN, DATE_COLUMN, NUM_COLUMNS };
-    QStringList columnNames(bool translated = true) const { return translated ? m_column_names_translated : m_column_names; };
+    QStringList columnNames(bool translated = true) const { return translated ? m_column_names_translated : m_column_names; }
 
-    [[nodiscard]] int rowCount(const QModelIndex& parent = {}) const override { return parent.isValid() ? 0 : static_cast<int>(size()); }
+    [[nodiscard]] int rowCount(const QModelIndex& parent = {}) const override { return parent.isValid() ? 0 : size(); }
     [[nodiscard]] int columnCount(const QModelIndex& parent = {}) const override { return parent.isValid() ? 0 : NUM_COLUMNS; }
 
     [[nodiscard]] Qt::DropActions supportedDropActions() const override;
diff --git a/launcher/minecraft/mod/ResourcePackFolderModel.cpp b/launcher/minecraft/mod/ResourcePackFolderModel.cpp
index 41455599..f1a0572a 100644
--- a/launcher/minecraft/mod/ResourcePackFolderModel.cpp
+++ b/launcher/minecraft/mod/ResourcePackFolderModel.cpp
@@ -128,7 +128,7 @@ QVariant ResourcePackFolderModel::data(const QModelIndex& index, int role) const
     }
 }
 
-QVariant ResourcePackFolderModel::headerData(int section, Qt::Orientation orientation, int role) const
+QVariant ResourcePackFolderModel::headerData(int section, [[maybe_unused]] Qt::Orientation orientation, int role) const
 {
     switch (role) {
         case Qt::DisplayRole:
@@ -165,7 +165,6 @@ QVariant ResourcePackFolderModel::headerData(int section, Qt::Orientation orient
         default:
             return {};
     }
-    return {};
 }
 
 int ResourcePackFolderModel::columnCount(const QModelIndex& parent) const
diff --git a/launcher/minecraft/mod/TexturePackFolderModel.cpp b/launcher/minecraft/mod/TexturePackFolderModel.cpp
index 531a7023..3795db58 100644
--- a/launcher/minecraft/mod/TexturePackFolderModel.cpp
+++ b/launcher/minecraft/mod/TexturePackFolderModel.cpp
@@ -114,7 +114,7 @@ QVariant TexturePackFolderModel::data(const QModelIndex& index, int role) const
     }
 }
 
-QVariant TexturePackFolderModel::headerData(int section, Qt::Orientation orientation, int role) const
+QVariant TexturePackFolderModel::headerData(int section, [[maybe_unused]] Qt::Orientation orientation, int role) const
 {
     switch (role) {
         case Qt::DisplayRole:
diff --git a/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp b/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp
index f8ecdb33..0a0f57bf 100644
--- a/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp
+++ b/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp
@@ -61,7 +61,7 @@ GetModDependenciesTask::GetModDependenciesTask(QObject* parent,
         if (auto meta = mod->metadata(); meta)
             m_mods.append(meta);
     prepare();
-};
+}
 
 void GetModDependenciesTask::prepare()
 {
@@ -130,7 +130,7 @@ QList<ModPlatform::Dependency> GetModDependenciesTask::getDependenciesForVersion
         c_dependencies.append(getOverride(ver_dep, providerName));
     }
     return c_dependencies;
-};
+}
 
 Task::Ptr GetModDependenciesTask::getProjectInfoTask(std::shared_ptr<PackDependency> pDep)
 {
@@ -181,7 +181,7 @@ Task::Ptr GetModDependenciesTask::prepareDependencyTask(const ModPlatform::Depen
     ResourceAPI::DependencySearchArgs args = { dep, m_version, m_loaderType };
     ResourceAPI::DependencySearchCallbacks callbacks;
 
-    callbacks.on_succeed = [dep, provider, pDep, level, this](auto& doc, auto& pack) {
+    callbacks.on_succeed = [dep, provider, pDep, level, this](auto& doc, [[maybe_unused]] auto& pack) {
         try {
             QJsonArray arr;
             if (dep.version.length() != 0 && doc.isObject()) {
@@ -215,27 +215,27 @@ Task::Ptr GetModDependenciesTask::prepareDependencyTask(const ModPlatform::Depen
             return;
         }
         if (level == 0) {
-            qWarning() << "Dependency cycle exeeded";
+            qWarning() << "Dependency cycle exceeded";
             return;
         }
         if (dep.addonId.toString().isEmpty() && !pDep->version.addonId.toString().isEmpty()) {
             pDep->pack->addonId = pDep->version.addonId;
-            auto dep = getOverride({ pDep->version.addonId, pDep->dependency.type }, provider.name);
-            if (dep.addonId != pDep->version.addonId) {
+            auto dep_ = getOverride({ pDep->version.addonId, pDep->dependency.type }, provider.name);
+            if (dep_.addonId != pDep->version.addonId) {
                 removePack(pDep->version.addonId);
-                addTask(prepareDependencyTask(dep, provider.name, level));
+                addTask(prepareDependencyTask(dep_, provider.name, level));
             } else
                 addTask(getProjectInfoTask(pDep));
         }
-        for (auto dep : getDependenciesForVersion(pDep->version, provider.name)) {
-            addTask(prepareDependencyTask(dep, provider.name, level - 1));
+        for (auto dep_ : getDependenciesForVersion(pDep->version, provider.name)) {
+            addTask(prepareDependencyTask(dep_, provider.name, level - 1));
         }
     };
 
     auto version = provider.api->getDependencyVersion(std::move(args), std::move(callbacks));
     tasks->addTask(version);
     return tasks;
-};
+}
 
 void GetModDependenciesTask::removePack(const QVariant addonId)
 {
diff --git a/launcher/minecraft/mod/tasks/LocalModParseTask.cpp b/launcher/minecraft/mod/tasks/LocalModParseTask.cpp
index f8d454cf..ea23947f 100644
--- a/launcher/minecraft/mod/tasks/LocalModParseTask.cpp
+++ b/launcher/minecraft/mod/tasks/LocalModParseTask.cpp
@@ -152,8 +152,8 @@ ModDetails ReadMCModTOML(QByteArray contents)
     QString authors = "";
     if (auto authorsDatum = tomlData["authors"].as_string()) {
         authors = QString::fromStdString(authorsDatum->get());
-    } else if (auto authorsDatum = (*modsTable)["authors"].as_string()) {
-        authors = QString::fromStdString(authorsDatum->get());
+    } else if (auto authorsDatumMods = (*modsTable)["authors"].as_string()) {
+        authors = QString::fromStdString(authorsDatumMods->get());
     }
     if (!authors.isEmpty()) {
         details.authors.append(authors);
@@ -162,8 +162,8 @@ ModDetails ReadMCModTOML(QByteArray contents)
     QString homeurl = "";
     if (auto homeurlDatum = tomlData["displayURL"].as_string()) {
         homeurl = QString::fromStdString(homeurlDatum->get());
-    } else if (auto homeurlDatum = (*modsTable)["displayURL"].as_string()) {
-        homeurl = QString::fromStdString(homeurlDatum->get());
+    } else if (auto homeurlDatumMods = (*modsTable)["displayURL"].as_string()) {
+        homeurl = QString::fromStdString(homeurlDatumMods->get());
     }
     // fix up url.
     if (!homeurl.isEmpty() && !homeurl.startsWith("http://") && !homeurl.startsWith("https://") && !homeurl.startsWith("ftp://")) {
@@ -174,16 +174,16 @@ ModDetails ReadMCModTOML(QByteArray contents)
     QString issueTrackerURL = "";
     if (auto issueTrackerURLDatum = tomlData["issueTrackerURL"].as_string()) {
         issueTrackerURL = QString::fromStdString(issueTrackerURLDatum->get());
-    } else if (auto issueTrackerURLDatum = (*modsTable)["issueTrackerURL"].as_string()) {
-        issueTrackerURL = QString::fromStdString(issueTrackerURLDatum->get());
+    } else if (auto issueTrackerURLDatumMods = (*modsTable)["issueTrackerURL"].as_string()) {
+        issueTrackerURL = QString::fromStdString(issueTrackerURLDatumMods->get());
     }
     details.issue_tracker = issueTrackerURL;
 
     QString license = "";
     if (auto licenseDatum = tomlData["license"].as_string()) {
         license = QString::fromStdString(licenseDatum->get());
-    } else if (auto licenseDatum =(*modsTable)["license"].as_string()) {
-        license = QString::fromStdString(licenseDatum->get());
+    } else if (auto licenseDatumMods =(*modsTable)["license"].as_string()) {
+        license = QString::fromStdString(licenseDatumMods->get());
     }
     if (!license.isEmpty())
         details.licenses.append(ModLicense(license));
@@ -191,8 +191,8 @@ ModDetails ReadMCModTOML(QByteArray contents)
     QString logoFile = "";
     if (auto logoFileDatum = tomlData["logoFile"].as_string()) {
         logoFile = QString::fromStdString(logoFileDatum->get());
-    } else if (auto logoFileDatum =(*modsTable)["logoFile"].as_string()) {
-        logoFile = QString::fromStdString(logoFileDatum->get());
+    } else if (auto logoFileDatumMods =(*modsTable)["logoFile"].as_string()) {
+        logoFile = QString::fromStdString(logoFileDatumMods->get());
     }
     details.icon_file = logoFile;
 
@@ -460,7 +460,7 @@ bool process(Mod& mod, ProcessingLevel level)
     }
 }
 
-bool processZIP(Mod& mod, ProcessingLevel level)
+bool processZIP(Mod& mod, [[maybe_unused]] ProcessingLevel level)
 {
     ModDetails details;
 
@@ -593,7 +593,7 @@ bool processZIP(Mod& mod, ProcessingLevel level)
     return false;  // no valid mod found in archive
 }
 
-bool processFolder(Mod& mod, ProcessingLevel level)
+bool processFolder(Mod& mod, [[maybe_unused]] ProcessingLevel level)
 {
     ModDetails details;
 
@@ -614,7 +614,7 @@ bool processFolder(Mod& mod, ProcessingLevel level)
     return false;  // no valid mcmod.info file found
 }
 
-bool processLitemod(Mod& mod, ProcessingLevel level)
+bool processLitemod(Mod& mod, [[maybe_unused]] ProcessingLevel level)
 {
     ModDetails details;
 
diff --git a/launcher/minecraft/services/CapeChange.cpp b/launcher/minecraft/services/CapeChange.cpp
index 1d5ea36d..30155055 100644
--- a/launcher/minecraft/services/CapeChange.cpp
+++ b/launcher/minecraft/services/CapeChange.cpp
@@ -45,7 +45,7 @@ CapeChange::CapeChange(QObject *parent, QString token, QString cape)
 {
 }
 
-void CapeChange::setCape(QString& cape) {
+void CapeChange::setCape([[maybe_unused]]  QString& cape) {
     QNetworkRequest request(QUrl("https://api.minecraftservices.com/minecraft/profile/capes/active"));
     auto requestString = QString("{\"capeId\":\"%1\"}").arg(m_capeId);
     request.setRawHeader("Authorization", QString("Bearer %1").arg(m_token).toLocal8Bit());
diff --git a/launcher/modplatform/ModIndex.h b/launcher/modplatform/ModIndex.h
index b7670051..ebc4167b 100644
--- a/launcher/modplatform/ModIndex.h
+++ b/launcher/modplatform/ModIndex.h
@@ -143,7 +143,7 @@ inline auto getOverrideDeps() -> QList<OverrideDep>
 
              { "qvIfYCYJ", "P7dR8mSH", "API", ModPlatform::ResourceProvider::MODRINTH },
              { "lwVhp9o5", "Ha28R6CL", "KotlinLibraries", ModPlatform::ResourceProvider::MODRINTH } };
-};
+}
 
 }  // namespace ModPlatform
 
diff --git a/launcher/modplatform/ResourceAPI.h b/launcher/modplatform/ResourceAPI.h
index a8f300b4..baba550f 100644
--- a/launcher/modplatform/ResourceAPI.h
+++ b/launcher/modplatform/ResourceAPI.h
@@ -131,12 +131,12 @@ class ResourceAPI {
         qWarning() << "TODO: ResourceAPI::searchProjects";
         return nullptr;
     }
-    [[nodiscard]] virtual Task::Ptr getProject(QString addonId, std::shared_ptr<QByteArray> response) const
+    [[nodiscard]] virtual Task::Ptr getProject([[maybe_unused]] QString addonId, [[maybe_unused]] std::shared_ptr<QByteArray> response) const
     {
         qWarning() << "TODO: ResourceAPI::getProject";
         return nullptr;
     }
-    [[nodiscard]] virtual Task::Ptr getProjects(QStringList addonIds, std::shared_ptr<QByteArray> response) const
+    [[nodiscard]] virtual Task::Ptr getProjects([[maybe_unused]] QStringList addonIds, [[maybe_unused]] std::shared_ptr<QByteArray> response) const
     {
         qWarning() << "TODO: ResourceAPI::getProjects";
         return nullptr;
diff --git a/launcher/modplatform/flame/FileResolvingTask.cpp b/launcher/modplatform/flame/FileResolvingTask.cpp
index 84455e58..ca961e9c 100644
--- a/launcher/modplatform/flame/FileResolvingTask.cpp
+++ b/launcher/modplatform/flame/FileResolvingTask.cpp
@@ -89,7 +89,7 @@ void Flame::FileResolvingTask::netJobFinished()
         auto& out = m_toProcess.files[fileid];
         try {
             out.parseFromObject(Json::requireObject(file));
-        } catch (const JSONValidationError& e) {
+        } catch ([[maybe_unused]] const JSONValidationError& e) {
             qDebug() << "Blocked mod on curseforge" << out.fileName;
             auto hash = out.hash;
             if (!hash.isEmpty()) {
diff --git a/launcher/modplatform/flame/FlameModIndex.cpp b/launcher/modplatform/flame/FlameModIndex.cpp
index 227ce489..2215de19 100644
--- a/launcher/modplatform/flame/FlameModIndex.cpp
+++ b/launcher/modplatform/flame/FlameModIndex.cpp
@@ -54,7 +54,7 @@ void FlameMod::loadURLs(ModPlatform::IndexedPack& pack, QJsonObject& obj)
         pack.extraDataLoaded = true;
 }
 
-void FlameMod::loadBody(ModPlatform::IndexedPack& pack, QJsonObject& obj)
+void FlameMod::loadBody(ModPlatform::IndexedPack& pack, [[maybe_unused]] QJsonObject& obj)
 {
     pack.extraData.body = api.getModDescription(pack.addonId.toInt());
 
@@ -75,7 +75,7 @@ static QString enumToString(int hash_algorithm)
 
 void FlameMod::loadIndexedPackVersions(ModPlatform::IndexedPack& pack,
                                        QJsonArray& arr,
-                                       const shared_qobject_ptr<QNetworkAccessManager>& network,
+                                       [[maybe_unused]] const shared_qobject_ptr<QNetworkAccessManager>& network,
                                        const BaseInstance* inst)
 {
     QVector<ModPlatform::IndexedVersion> unsortedVersions;
@@ -193,4 +193,5 @@ ModPlatform::IndexedVersion FlameMod::loadDependencyVersions(const ModPlatform::
     };
     std::sort(versions.begin(), versions.end(), orderSortPredicate);
     return versions.front();
-};
+}
+
diff --git a/launcher/modplatform/helpers/NetworkResourceAPI.cpp b/launcher/modplatform/helpers/NetworkResourceAPI.cpp
index c278f800..e5718acb 100644
--- a/launcher/modplatform/helpers/NetworkResourceAPI.cpp
+++ b/launcher/modplatform/helpers/NetworkResourceAPI.cpp
@@ -145,4 +145,5 @@ Task::Ptr NetworkResourceAPI::getDependencyVersion(DependencySearchArgs&& args,
     });
 
     return netJob;
-};
+}
+
diff --git a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
index 4cd88aa6..d08759cf 100644
--- a/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
+++ b/launcher/modplatform/modrinth/ModrinthPackExportTask.cpp
@@ -180,10 +180,10 @@ void ModrinthPackExportTask::parseApiResponse(const std::shared_ptr<QByteArray>
             if (obj.isEmpty())
                 continue;
 
-            const QJsonArray files = obj["files"].toArray();
-            if (auto fileIter = std::find_if(files.begin(), files.end(),
+            const QJsonArray files_array = obj["files"].toArray();
+            if (auto fileIter = std::find_if(files_array.begin(), files_array.end(),
                                              [&iterator](const QJsonValue& file) { return file["hashes"]["sha512"] == iterator.value(); });
-                fileIter != files.end()) {
+                fileIter != files_array.end()) {
                 // map the file to the url
                 resolvedFiles[iterator.key()] =
                     ResolvedFile{ fileIter->toObject()["hashes"].toObject()["sha1"].toString(), iterator.value(),
@@ -293,7 +293,7 @@ QByteArray ModrinthPackExportTask::generateIndex()
         obj["dependencies"] = dependencies;
     }
 
-    QJsonArray files;
+    QJsonArray files_array;
     QMapIterator<QString, ResolvedFile> iterator(resolvedFiles);
     while (iterator.hasNext()) {
         iterator.next();
@@ -311,9 +311,9 @@ QByteArray ModrinthPackExportTask::generateIndex()
         file["hashes"] = hashes;
         file["fileSize"] = value.size;
 
-        files << file;
+        files_array << file;
     }
-    obj["files"] = files;
+    obj["files"] = files_array;
 
     return QJsonDocument(obj).toJson(QJsonDocument::Compact);
 }
diff --git a/launcher/modplatform/modrinth/ModrinthPackIndex.cpp b/launcher/modplatform/modrinth/ModrinthPackIndex.cpp
index b4037349..969018a9 100644
--- a/launcher/modplatform/modrinth/ModrinthPackIndex.cpp
+++ b/launcher/modplatform/modrinth/ModrinthPackIndex.cpp
@@ -95,7 +95,7 @@ void Modrinth::loadExtraPackData(ModPlatform::IndexedPack& pack, QJsonObject& ob
 
 void Modrinth::loadIndexedPackVersions(ModPlatform::IndexedPack& pack,
                                        QJsonArray& arr,
-                                       const shared_qobject_ptr<QNetworkAccessManager>& network,
+                                       [[maybe_unused]] const shared_qobject_ptr<QNetworkAccessManager>& network,
                                        const BaseInstance* inst)
 {
     QVector<ModPlatform::IndexedVersion> unsortedVersions;
@@ -218,7 +218,7 @@ auto Modrinth::loadIndexedPackVersion(QJsonObject& obj, QString preferred_hash_t
     return {};
 }
 
-auto Modrinth::loadDependencyVersions(const ModPlatform::Dependency& m, QJsonArray& arr) -> ModPlatform::IndexedVersion
+auto Modrinth::loadDependencyVersions([[maybe_unused]] const ModPlatform::Dependency& m, QJsonArray& arr) -> ModPlatform::IndexedVersion
 {
     QVector<ModPlatform::IndexedVersion> versions;
 
@@ -235,4 +235,4 @@ auto Modrinth::loadDependencyVersions(const ModPlatform::Dependency& m, QJsonArr
     };
     std::sort(versions.begin(), versions.end(), orderSortPredicate);
     return versions.length() != 0 ? versions.front() : ModPlatform::IndexedVersion();
-}
\ No newline at end of file
+}
diff --git a/launcher/modplatform/packwiz/Packwiz.cpp b/launcher/modplatform/packwiz/Packwiz.cpp
index 967b8870..82deef8b 100644
--- a/launcher/modplatform/packwiz/Packwiz.cpp
+++ b/launcher/modplatform/packwiz/Packwiz.cpp
@@ -89,7 +89,8 @@ auto intEntry(toml::table table, QString entry_name) -> int
     return node.value_or(0);
 }
 
-auto V1::createModFormat(QDir& index_dir, ModPlatform::IndexedPack& mod_pack, ModPlatform::IndexedVersion& mod_version) -> Mod
+auto V1::createModFormat([[maybe_unused]] QDir& index_dir, ModPlatform::IndexedPack& mod_pack, ModPlatform::IndexedVersion& mod_version)
+    -> Mod
 {
     Mod mod;
 
@@ -114,7 +115,7 @@ auto V1::createModFormat(QDir& index_dir, ModPlatform::IndexedPack& mod_pack, Mo
     return mod;
 }
 
-auto V1::createModFormat(QDir& index_dir, ::Mod& internal_mod, QString slug) -> Mod
+auto V1::createModFormat(QDir& index_dir, [[maybe_unused]] ::Mod& internal_mod, QString slug) -> Mod
 {
     // Try getting metadata if it exists
     Mod mod{ getIndexForMod(index_dir, slug) };
diff --git a/launcher/modplatform/technic/TechnicPackProcessor.cpp b/launcher/modplatform/technic/TechnicPackProcessor.cpp
index df713a72..e473c170 100644
--- a/launcher/modplatform/technic/TechnicPackProcessor.cpp
+++ b/launcher/modplatform/technic/TechnicPackProcessor.cpp
@@ -26,7 +26,12 @@
 
 #include <memory>
 
-void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings, const QString &instName, const QString &instIcon, const QString &stagingPath, const QString &minecraftVersion, const bool isSolder)
+void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings,
+                                        const QString& instName,
+                                        const QString& instIcon,
+                                        const QString& stagingPath,
+                                        const QString& minecraftVersion,
+                                        [[maybe_unused]] const bool isSolder)
 {
     QString minecraftPath = FS::PathCombine(stagingPath, ".minecraft");
     QString configPath = FS::PathCombine(stagingPath, "instance.cfg");
@@ -151,17 +156,16 @@ void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings, const
     {
         QJsonDocument doc = Json::requireDocument(data);
         QJsonObject root = Json::requireObject(doc, "version.json");
-        QString minecraftVersion = Json::ensureString(root, "inheritsFrom", QString(), "");
-        if (minecraftVersion.isEmpty())
-        {
+        QString packMinecraftVersion = Json::ensureString(root, "inheritsFrom", QString(), "");
+        if (packMinecraftVersion.isEmpty()) {
             if (fmlMinecraftVersion.isEmpty())
             {
                 emit failed(tr("Could not understand \"version.json\":\ninheritsFrom is missing"));
                 return;
             }
-            minecraftVersion = fmlMinecraftVersion;
+            packMinecraftVersion = fmlMinecraftVersion;
         }
-        components->setComponentVersion("net.minecraft", minecraftVersion, true);
+        components->setComponentVersion("net.minecraft", packMinecraftVersion, true);
         for (auto library: Json::ensureArray(root, "libraries", {}))
         {
             if (!library.isObject())
diff --git a/launcher/news/NewsEntry.cpp b/launcher/news/NewsEntry.cpp
index cfe07e86..9726cab2 100644
--- a/launcher/news/NewsEntry.cpp
+++ b/launcher/news/NewsEntry.cpp
@@ -42,8 +42,8 @@ inline QString childValue(const QDomElement& element, const QString& childName,
     QDomNodeList nodes = element.elementsByTagName(childName);
     if (nodes.count() > 0)
     {
-        QDomElement element = nodes.at(0).toElement();
-        return element.text();
+        QDomElement elem = nodes.at(0).toElement();
+        return elem.text();
     }
     else
     {
@@ -51,7 +51,7 @@ inline QString childValue(const QDomElement& element, const QString& childName,
     }
 }
 
-bool NewsEntry::fromXmlElement(const QDomElement& element, NewsEntry* entry, QString* errorMsg)
+bool NewsEntry::fromXmlElement(const QDomElement& element, NewsEntry* entry, [[maybe_unused]] QString* errorMsg)
 {
     QString title = childValue(element, "title", tr("Untitled"));
     QString content = childValue(element, "content", tr("No content."));
@@ -62,4 +62,3 @@ bool NewsEntry::fromXmlElement(const QDomElement& element, NewsEntry* entry, QSt
     entry->link = link;
     return true;
 }
-
diff --git a/launcher/screenshots/ImgurAlbumCreation.cpp b/launcher/screenshots/ImgurAlbumCreation.cpp
index ab425f1a..78bf111e 100644
--- a/launcher/screenshots/ImgurAlbumCreation.cpp
+++ b/launcher/screenshots/ImgurAlbumCreation.cpp
@@ -82,7 +82,7 @@ void ImgurAlbumCreation::executeTask()
     connect(rep, &QNetworkReply::sslErrors, this, &ImgurAlbumCreation::sslErrors);
 }
 
-void ImgurAlbumCreation::downloadError(QNetworkReply::NetworkError error)
+void ImgurAlbumCreation::downloadError([[maybe_unused]] QNetworkReply::NetworkError error)
 {
     qDebug() << m_reply->errorString();
     m_state = State::Failed;
diff --git a/launcher/screenshots/ImgurUpload.cpp b/launcher/screenshots/ImgurUpload.cpp
index a50f9afa..4f758767 100644
--- a/launcher/screenshots/ImgurUpload.cpp
+++ b/launcher/screenshots/ImgurUpload.cpp
@@ -97,7 +97,7 @@ void ImgurUpload::executeTask()
     connect(rep, &QNetworkReply::sslErrors, this, &ImgurUpload::sslErrors);
 }
 
-void ImgurUpload::downloadError(QNetworkReply::NetworkError error)
+void ImgurUpload::downloadError([[maybe_unused]] QNetworkReply::NetworkError error)
 {
     qCritical() << "ImgurUpload failed with error" << m_reply->errorString() << "Server reply:\n" << m_reply->readAll();
     if(finished)
diff --git a/launcher/tasks/ConcurrentTask.cpp b/launcher/tasks/ConcurrentTask.cpp
index 9aada5e6..0f835369 100644
--- a/launcher/tasks/ConcurrentTask.cpp
+++ b/launcher/tasks/ConcurrentTask.cpp
@@ -171,7 +171,7 @@ void ConcurrentTask::subTaskSucceeded(Task::Ptr task)
     startNext();
 }
 
-void ConcurrentTask::subTaskFailed(Task::Ptr task, const QString& msg)
+void ConcurrentTask::subTaskFailed(Task::Ptr task, [[maybe_unused]] const QString& msg)
 {
     m_done.insert(task.get(), task);
     m_failed.insert(task.get(), task);
diff --git a/launcher/tasks/Task.h b/launcher/tasks/Task.h
index de0884c5..25c7f8be 100644
--- a/launcher/tasks/Task.h
+++ b/launcher/tasks/Task.h
@@ -64,12 +64,13 @@ struct TaskStepProgress {
     QString status = "";
     QString details = "";
     TaskStepState state = TaskStepState::Waiting;
+    
     TaskStepProgress() {
         this->uid = QUuid::createUuid();
     }
-    TaskStepProgress(QUuid uid) {
-        this->uid = uid;
-    }
+
+    TaskStepProgress(QUuid uid_): uid(uid_) {}
+
     bool isDone() const { return (state == TaskStepState::Failed) || (state == TaskStepState::Succeeded); }
     void update(qint64 new_current, qint64 new_total) {
         this->old_current = this->current;
diff --git a/launcher/tools/JProfiler.cpp b/launcher/tools/JProfiler.cpp
index 15c0cab6..f08ee73d 100644
--- a/launcher/tools/JProfiler.cpp
+++ b/launcher/tools/JProfiler.cpp
@@ -34,7 +34,7 @@ void JProfiler::profilerStarted()
     emit readyToLaunch(tr("Listening on port: %1").arg(listeningPort));
 }
 
-void JProfiler::profilerFinished(int exit, QProcess::ExitStatus status)
+void JProfiler::profilerFinished([[maybe_unused]] int exit, QProcess::ExitStatus status)
 {
     if (status == QProcess::CrashExit)
     {
diff --git a/launcher/tools/JVisualVM.cpp b/launcher/tools/JVisualVM.cpp
index 28ffb9cd..2734f5ab 100644
--- a/launcher/tools/JVisualVM.cpp
+++ b/launcher/tools/JVisualVM.cpp
@@ -32,7 +32,7 @@ void JVisualVM::profilerStarted()
     emit readyToLaunch(tr("JVisualVM started"));
 }
 
-void JVisualVM::profilerFinished(int exit, QProcess::ExitStatus status)
+void JVisualVM::profilerFinished([[maybe_unused]] int exit, QProcess::ExitStatus status)
 {
     if (status == QProcess::CrashExit)
     {
diff --git a/launcher/translations/POTranslator.cpp b/launcher/translations/POTranslator.cpp
index c77ae45d..910a7f2c 100644
--- a/launcher/translations/POTranslator.cpp
+++ b/launcher/translations/POTranslator.cpp
@@ -334,7 +334,7 @@ POTranslator::~POTranslator()
     delete d;
 }
 
-QString POTranslator::translate(const char* context, const char* sourceText, const char* disambiguation, int n) const
+QString POTranslator::translate(const char* context, const char* sourceText, const char* disambiguation, [[maybe_unused]] int n) const
 {
     if(disambiguation)
     {
diff --git a/launcher/translations/TranslationsModel.cpp b/launcher/translations/TranslationsModel.cpp
index 6054b4b6..70d8726e 100644
--- a/launcher/translations/TranslationsModel.cpp
+++ b/launcher/translations/TranslationsModel.cpp
@@ -267,9 +267,7 @@ void readIndex(const QString & path, QMap<QString, Language>& languages)
     try
     {
         data = FS::read(path);
-    }
-    catch (const Exception &e)
-    {
+    } catch ([[maybe_unused]] const Exception& e) {
         qCritical() << "Translations Download Failed: index file not readable";
         return;
     }
@@ -307,9 +305,7 @@ void readIndex(const QString & path, QMap<QString, Language>& languages)
 
             languages.insert(lang.key, lang);
         }
-    }
-    catch (Json::JsonException & e)
-    {
+    } catch ([[maybe_unused]] Json::JsonException& e) {
         qCritical() << "Translations Download Failed: index file could not be parsed as json";
     }
 }
@@ -498,12 +494,12 @@ QVariant TranslationsModel::headerData(int section, Qt::Orientation orientation,
     return QAbstractListModel::headerData(section, orientation, role);
 }
 
-int TranslationsModel::rowCount(const QModelIndex& parent) const
+int TranslationsModel::rowCount([[maybe_unused]] const QModelIndex& parent) const
 {
     return d->m_languages.size();
 }
 
-int TranslationsModel::columnCount(const QModelIndex& parent) const
+int TranslationsModel::columnCount([[maybe_unused]] const QModelIndex& parent) const
 {
     return 2;
 }
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 496738e3..6d80d1d5 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -537,9 +537,9 @@ void MainWindow::showInstanceContextMenu(const QPoint &pos)
         actionCreateInstance->setToolTip(ui->actionAddInstance->toolTip());
         if(!group.isNull())
         {
-            QVariantMap data;
-            data["group"] = group;
-            actionCreateInstance->setData(data);
+            QVariantMap instance_action_data;
+            instance_action_data["group"] = group;
+            actionCreateInstance->setData(instance_action_data);
         }
 
         connect(actionCreateInstance, SIGNAL(triggered(bool)), SLOT(on_actionAddInstance_triggered()));
@@ -550,9 +550,9 @@ void MainWindow::showInstanceContextMenu(const QPoint &pos)
         if(!group.isNull())
         {
             QAction *actionDeleteGroup = new QAction(tr("Delete group '%1'").arg(group), this);
-            QVariantMap data;
-            data["group"] = group;
-            actionDeleteGroup->setData(data);
+            QVariantMap delete_group_action_data;
+            delete_group_action_data["group"] = group;
+            actionDeleteGroup->setData(delete_group_action_data);
             connect(actionDeleteGroup, SIGNAL(triggered(bool)), SLOT(deleteGroup()));
             actions.append(actionDeleteGroup);
         }
@@ -799,9 +799,9 @@ void MainWindow::changeActiveAccount()
     if (sAction->data().type() != QVariant::Type::Int)
         return;
 
-    QVariant data = sAction->data();
+    QVariant action_data = sAction->data();
     bool valid = false;
-    int index = data.toInt(&valid);
+    int index = action_data.toInt(&valid);
     if(!valid) {
         index = -1;
     }
@@ -1158,9 +1158,9 @@ void MainWindow::iconUpdated(QString icon)
 {
     if (icon == m_currentInstIcon)
     {
-        auto icon = APPLICATION->icons()->getIcon(m_currentInstIcon);
-        ui->actionChangeInstIcon->setIcon(icon);
-        changeIconButton->setIcon(icon);
+        auto new_icon = APPLICATION->icons()->getIcon(m_currentInstIcon);
+        ui->actionChangeInstIcon->setIcon(new_icon);
+        changeIconButton->setIcon(new_icon);
     }
 }
 
@@ -1636,7 +1636,7 @@ void MainWindow::startTask(Task *task)
     task->start();
 }
 
-void MainWindow::instanceChanged(const QModelIndex &current, const QModelIndex &previous)
+void MainWindow::instanceChanged(const QModelIndex &current, [[maybe_unused]] const QModelIndex &previous)
 {
     if (!current.isValid())
     {
@@ -1782,8 +1782,9 @@ void MainWindow::setInstanceActionsEnabled(bool enabled)
     ui->actionCreateInstanceShortcut->setEnabled(enabled);
 }
 
-void MainWindow::refreshCurrentInstance(bool running)
+void MainWindow::refreshCurrentInstance([[maybe_unused]] bool running)
 {
     auto current = view->selectionModel()->currentIndex();
     instanceChanged(current, current);
 }
+
diff --git a/launcher/ui/dialogs/CopyInstanceDialog.cpp b/launcher/ui/dialogs/CopyInstanceDialog.cpp
index d75bb5fe..ffa1e31b 100644
--- a/launcher/ui/dialogs/CopyInstanceDialog.cpp
+++ b/launcher/ui/dialogs/CopyInstanceDialog.cpp
@@ -220,7 +220,7 @@ void CopyInstanceDialog::on_iconButton_clicked()
     }
 }
 
-void CopyInstanceDialog::on_instNameTextBox_textChanged(const QString& arg1)
+void CopyInstanceDialog::on_instNameTextBox_textChanged([[maybe_unused]] const QString& arg1)
 {
     updateDialogState();
 }
diff --git a/launcher/ui/dialogs/ExportInstanceDialog.cpp b/launcher/ui/dialogs/ExportInstanceDialog.cpp
index cc41c394..5223391e 100644
--- a/launcher/ui/dialogs/ExportInstanceDialog.cpp
+++ b/launcher/ui/dialogs/ExportInstanceDialog.cpp
@@ -203,8 +203,8 @@ void ExportInstanceDialog::loadPackIgnore()
     {
         return;
     }
-    auto data = ignoreFile.readAll();
-    auto string = QString::fromUtf8(data);
+    auto ignoreData = ignoreFile.readAll();
+    auto string = QString::fromUtf8(ignoreData);
 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
     proxyModel->setBlockedPaths(string.split('\n', Qt::SkipEmptyParts));
 #else
@@ -214,11 +214,11 @@ void ExportInstanceDialog::loadPackIgnore()
 
 void ExportInstanceDialog::savePackIgnore()
 {
-    auto data = proxyModel->blockedPaths().toStringList().join('\n').toUtf8();
+    auto ignoreData = proxyModel->blockedPaths().toStringList().join('\n').toUtf8();
     auto filename = ignoreFileName();
     try
     {
-        FS::write(filename, data);
+        FS::write(filename, ignoreData);
     }
     catch (const Exception &e)
     {
diff --git a/launcher/ui/dialogs/NewInstanceDialog.cpp b/launcher/ui/dialogs/NewInstanceDialog.cpp
index 7b9bb944..95ded16e 100644
--- a/launcher/ui/dialogs/NewInstanceDialog.cpp
+++ b/launcher/ui/dialogs/NewInstanceDialog.cpp
@@ -296,7 +296,7 @@ void NewInstanceDialog::on_iconButton_clicked()
     }
 }
 
-void NewInstanceDialog::on_instNameTextBox_textChanged(const QString &arg1)
+void NewInstanceDialog::on_instNameTextBox_textChanged([[maybe_unused]] const QString &arg1)
 {
     updateDialogState();
 }
diff --git a/launcher/ui/dialogs/ProfileSetupDialog.cpp b/launcher/ui/dialogs/ProfileSetupDialog.cpp
index 64c0b924..758f7f23 100644
--- a/launcher/ui/dialogs/ProfileSetupDialog.cpp
+++ b/launcher/ui/dialogs/ProfileSetupDialog.cpp
@@ -167,14 +167,14 @@ void ProfileSetupDialog::checkName(const QString &name) {
 
 void ProfileSetupDialog::checkFinished(
     QNetworkReply::NetworkError error,
-    QByteArray data,
-    QList<QNetworkReply::RawHeaderPair> headers
+    QByteArray profileData,
+    [[maybe_unused]] QList<QNetworkReply::RawHeaderPair> headers
 ) {
     auto requestor = qobject_cast<AuthRequest *>(QObject::sender());
     requestor->deleteLater();
 
     if(error == QNetworkReply::NoError) {
-        auto doc = QJsonDocument::fromJson(data);
+        auto doc = QJsonDocument::fromJson(profileData);
         auto root = doc.object();
         auto statusValue = root.value("status").toString("INVALID");
         if(statusValue == "AVAILABLE") {
@@ -210,11 +210,11 @@ void ProfileSetupDialog::setupProfile(const QString &profileName) {
     request.setRawHeader("Authorization", QString("Bearer %1").arg(token).toUtf8());
 
     QString payloadTemplate("{\"profileName\":\"%1\"}");
-    auto data = payloadTemplate.arg(profileName).toUtf8();
+    auto profileData = payloadTemplate.arg(profileName).toUtf8();
 
     AuthRequest *requestor = new AuthRequest(this);
     connect(requestor, &AuthRequest::finished, this, &ProfileSetupDialog::setupProfileFinished);
-    requestor->post(request, data);
+    requestor->post(request, profileData);
     isWorking = true;
 
     auto button = ui->buttonBox->button(QDialogButtonBox::Cancel);
@@ -251,8 +251,8 @@ struct MojangError{
 
 void ProfileSetupDialog::setupProfileFinished(
     QNetworkReply::NetworkError error,
-    QByteArray data,
-    QList<QNetworkReply::RawHeaderPair> headers
+    QByteArray errorData,
+    [[maybe_unused]] QList<QNetworkReply::RawHeaderPair> headers
 ) {
     auto requestor = qobject_cast<AuthRequest *>(QObject::sender());
     requestor->deleteLater();
@@ -266,7 +266,7 @@ void ProfileSetupDialog::setupProfileFinished(
         accept();
     }
     else {
-        auto parsedError = MojangError::fromJSON(data);
+        auto parsedError = MojangError::fromJSON(errorData);
         ui->errorLabel->setVisible(true);
         ui->errorLabel->setText(tr("The server returned the following error:") + "\n\n" + parsedError.errorMessage);
         qDebug() << parsedError.rawError;
diff --git a/launcher/ui/dialogs/ProgressDialog.cpp b/launcher/ui/dialogs/ProgressDialog.cpp
index 246a0fd4..24f445e6 100644
--- a/launcher/ui/dialogs/ProgressDialog.cpp
+++ b/launcher/ui/dialogs/ProgressDialog.cpp
@@ -85,7 +85,7 @@ void ProgressDialog::on_skipButton_clicked(bool checked)
 {
     Q_UNUSED(checked);
     if (ui->skipButton->isEnabled())  // prevent other triggers from aborting
-        task->abort();
+        m_task->abort();
 }
 
 ProgressDialog::~ProgressDialog()
@@ -116,7 +116,7 @@ void ProgressDialog::updateSize()
 
 int ProgressDialog::execWithTask(Task* task)
 {
-    this->task = task;
+    this->m_task = task;
 
     if (!task) {
         qDebug() << "Programmer error: Progress dialog created with null task.";
@@ -168,8 +168,8 @@ int ProgressDialog::execWithTask(std::unique_ptr<Task>& task)
 
 bool ProgressDialog::handleImmediateResult(QDialog::DialogCode& result)
 {
-    if (task->isFinished()) {
-        if (task->wasSuccessful()) {
+    if (m_task->isFinished()) {
+        if (m_task->wasSuccessful()) {
             result = QDialog::Accepted;
         } else {
             result = QDialog::Rejected;
@@ -181,12 +181,12 @@ bool ProgressDialog::handleImmediateResult(QDialog::DialogCode& result)
 
 Task* ProgressDialog::getTask()
 {
-    return task;
+    return m_task;
 }
 
 void ProgressDialog::onTaskStarted() {}
 
-void ProgressDialog::onTaskFailed(QString failure)
+void ProgressDialog::onTaskFailed([[maybe_unused]] QString failure)
 {
     reject();
     hide();
@@ -198,10 +198,10 @@ void ProgressDialog::onTaskSucceeded()
     hide();
 }
 
-void ProgressDialog::changeStatus(const QString& status)
+void ProgressDialog::changeStatus([[maybe_unused]] const QString& status)
 {
-    ui->globalStatusLabel->setText(task->getStatus());
-    ui->globalStatusDetailsLabel->setText(task->getDetails());
+    ui->globalStatusLabel->setText(m_task->getStatus());
+    ui->globalStatusDetailsLabel->setText(m_task->getDetails());
 
     updateSize();
 }
@@ -269,7 +269,7 @@ void ProgressDialog::keyPressEvent(QKeyEvent* e)
 
 void ProgressDialog::closeEvent(QCloseEvent* e)
 {
-    if (task && task->isRunning()) {
+    if (m_task && m_task->isRunning()) {
         e->ignore();
     } else {
         QDialog::closeEvent(e);
diff --git a/launcher/ui/dialogs/ProgressDialog.h b/launcher/ui/dialogs/ProgressDialog.h
index fc9a0fbc..ee55ceca 100644
--- a/launcher/ui/dialogs/ProgressDialog.h
+++ b/launcher/ui/dialogs/ProgressDialog.h
@@ -98,7 +98,7 @@ private:
 private:
     Ui::ProgressDialog *ui;
 
-    Task *task;
+    Task *m_task;
 
     bool m_is_multi_step = false;
     QHash<QUuid, SubTaskProgressBar*> taskProgress;
diff --git a/launcher/ui/dialogs/ResourceDownloadDialog.cpp b/launcher/ui/dialogs/ResourceDownloadDialog.cpp
index 4f59f560..cebc9e9e 100644
--- a/launcher/ui/dialogs/ResourceDownloadDialog.cpp
+++ b/launcher/ui/dialogs/ResourceDownloadDialog.cpp
@@ -301,7 +301,7 @@ GetModDependenciesTask::Ptr ModDownloadDialog::getModDependenciesTask()
         return makeShared<GetModDependenciesTask>(this, m_instance, model, selectedVers);
     }
     return nullptr;
-};
+}
 
 ResourcePackDownloadDialog::ResourcePackDownloadDialog(QWidget* parent,
                                                        const std::shared_ptr<ResourcePackFolderModel>& resource_packs,
diff --git a/launcher/ui/dialogs/ReviewMessageBox.cpp b/launcher/ui/dialogs/ReviewMessageBox.cpp
index 7b33765f..78c2542f 100644
--- a/launcher/ui/dialogs/ReviewMessageBox.cpp
+++ b/launcher/ui/dialogs/ReviewMessageBox.cpp
@@ -5,7 +5,7 @@
 
 #include <QPushButton>
 
-ReviewMessageBox::ReviewMessageBox(QWidget* parent, QString const& title, QString const& icon)
+ReviewMessageBox::ReviewMessageBox(QWidget* parent, [[maybe_unused]] QString const& title, [[maybe_unused]] QString const& icon)
     : QDialog(parent), ui(new Ui::ReviewMessageBox)
 {
     ui->setupUi(this);
diff --git a/launcher/ui/dialogs/SkinUploadDialog.cpp b/launcher/ui/dialogs/SkinUploadDialog.cpp
index 8180ac1f..1ff15c87 100644
--- a/launcher/ui/dialogs/SkinUploadDialog.cpp
+++ b/launcher/ui/dialogs/SkinUploadDialog.cpp
@@ -155,15 +155,15 @@ SkinUploadDialog::SkinUploadDialog(MinecraftAccountPtr acct, QWidget *parent)
     ui->setupUi(this);
 
     // FIXME: add a model for this, download/refresh the capes on demand
-    auto &data = *acct->accountData();
+    auto &accountData = *acct->accountData();
     int index = 0;
     ui->capeCombo->addItem(tr("No Cape"), QVariant());
-    auto currentCape = data.minecraftProfile.currentCape;
+    auto currentCape = accountData.minecraftProfile.currentCape;
     if(currentCape.isEmpty()) {
         ui->capeCombo->setCurrentIndex(index);
     }
 
-    for(auto & cape: data.minecraftProfile.capes) {
+    for(auto & cape: accountData.minecraftProfile.capes) {
         index++;
         if(cape.data.size()) {
             QPixmap capeImage;
diff --git a/launcher/ui/instanceview/InstanceDelegate.cpp b/launcher/ui/instanceview/InstanceDelegate.cpp
index 137cc8d5..384c33f3 100644
--- a/launcher/ui/instanceview/InstanceDelegate.cpp
+++ b/launcher/ui/instanceview/InstanceDelegate.cpp
@@ -400,7 +400,9 @@ signals:
     void editingDone();
 };
 
-void ListViewDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const
+void ListViewDelegate::updateEditorGeometry(QWidget* editor,
+                                            const QStyleOptionViewItem& option,
+                                            [[maybe_unused]] const QModelIndex& index) const
 {
     const int iconSize = 48;
     QRect textRect = option.rect;
@@ -412,17 +414,17 @@ void ListViewDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionV
 void ListViewDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const
 {
     auto text = index.data(Qt::EditRole).toString();
-    QTextEdit * realeditor = qobject_cast<NoReturnTextEdit *>(editor);
-    realeditor->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
-    realeditor->append(text);
-    realeditor->selectAll();
-    realeditor->document()->clearUndoRedoStacks();
+    QTextEdit* realEditor = qobject_cast<NoReturnTextEdit*>(editor);
+    realEditor->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
+    realEditor->append(text);
+    realEditor->selectAll();
+    realEditor->document()->clearUndoRedoStacks();
 }
 
 void ListViewDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const
 {
-    QTextEdit * realeditor = qobject_cast<NoReturnTextEdit *>(editor);
-    QString text = realeditor->toPlainText();
+    QTextEdit * realEditor = qobject_cast<NoReturnTextEdit *>(editor);
+    QString text = realEditor->toPlainText();
     text.replace(QChar('\n'), QChar(' '));
     text = text.trimmed();
     // Prevent instance names longer than 128 chars
@@ -433,7 +435,9 @@ void ListViewDelegate::setModelData(QWidget* editor, QAbstractItemModel* model,
     }
 }
 
-QWidget * ListViewDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const
+QWidget* ListViewDelegate::createEditor(QWidget* parent,
+                                        [[maybe_unused]] const QStyleOptionViewItem& option,
+                                        [[maybe_unused]] const QModelIndex& index) const
 {
     auto editor = new NoReturnTextEdit(parent);
     connect(editor, &NoReturnTextEdit::editingDone, this, &ListViewDelegate::editingDone);
diff --git a/launcher/ui/instanceview/InstanceView.cpp b/launcher/ui/instanceview/InstanceView.cpp
index fbeffe35..3b27e9fa 100644
--- a/launcher/ui/instanceview/InstanceView.cpp
+++ b/launcher/ui/instanceview/InstanceView.cpp
@@ -88,16 +88,18 @@ void InstanceView::setModel(QAbstractItemModel *model)
     connect(model, &QAbstractItemModel::rowsRemoved, this, &InstanceView::rowsRemoved);
 }
 
-void InstanceView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles)
+void InstanceView::dataChanged([[maybe_unused]] const QModelIndex& topLeft,
+                               [[maybe_unused]] const QModelIndex& bottomRight,
+                               [[maybe_unused]] const QVector<int>& roles)
 {
     scheduleDelayedItemsLayout();
 }
-void InstanceView::rowsInserted(const QModelIndex &parent, int start, int end)
+void InstanceView::rowsInserted([[maybe_unused]] const QModelIndex& parent, [[maybe_unused]] int start, [[maybe_unused]] int end)
 {
     scheduleDelayedItemsLayout();
 }
 
-void InstanceView::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
+void InstanceView::rowsAboutToBeRemoved([[maybe_unused]] const QModelIndex& parent, [[maybe_unused]] int start, [[maybe_unused]] int end)
 {
     scheduleDelayedItemsLayout();
 }
@@ -263,9 +265,9 @@ QString InstanceView::groupNameAt(const QPoint &point)
 {
     executeDelayedItemsLayout();
 
-    VisualGroup::HitResults hitresult;
-    auto group = categoryAt(point + offset(), hitresult);
-    if(group && (hitresult & (VisualGroup::HeaderHit | VisualGroup::BodyHit)))
+    VisualGroup::HitResults hitResult;
+    auto group = categoryAt(point + offset(), hitResult);
+    if(group && (hitResult & (VisualGroup::HeaderHit | VisualGroup::BodyHit)))
     {
         return group->text;
     }
@@ -300,9 +302,9 @@ void InstanceView::mousePressEvent(QMouseEvent *event)
     m_pressedAlreadySelected = selectionModel()->isSelected(m_pressedIndex);
     m_pressedPosition = geometryPos;
 
-    VisualGroup::HitResults hitresult;
-    m_pressedCategory = categoryAt(geometryPos, hitresult);
-    if (m_pressedCategory && hitresult & VisualGroup::CheckboxHit)
+    VisualGroup::HitResults hitResult;
+    m_pressedCategory = categoryAt(geometryPos, hitResult);
+    if (m_pressedCategory && hitResult & VisualGroup::CheckboxHit)
     {
         setState(m_pressedCategory->collapsed ? ExpandingState : CollapsingState);
         event->accept();
@@ -402,10 +404,10 @@ void InstanceView::mouseReleaseEvent(QMouseEvent *event)
     QPoint geometryPos = event->pos() + offset();
     QPersistentModelIndex index = indexAt(visualPos);
 
-    VisualGroup::HitResults hitresult;
+    VisualGroup::HitResults hitResult;
 
     bool click = (index == m_pressedIndex && index.isValid()) ||
-                 (m_pressedCategory && m_pressedCategory == categoryAt(geometryPos, hitresult));
+                 (m_pressedCategory && m_pressedCategory == categoryAt(geometryPos, hitResult));
 
     if (click && m_pressedCategory)
     {
@@ -498,7 +500,7 @@ void InstanceView::mouseDoubleClickEvent(QMouseEvent *event)
     }
 }
 
-void InstanceView::paintEvent(QPaintEvent *event)
+void InstanceView::paintEvent([[maybe_unused]] QPaintEvent *event)
 {
     executeDelayedItemsLayout();
 
@@ -589,7 +591,7 @@ void InstanceView::paintEvent(QPaintEvent *event)
 #endif
 }
 
-void InstanceView::resizeEvent(QResizeEvent *event)
+void InstanceView::resizeEvent([[maybe_unused]] QResizeEvent *event)
 {
     int newItemsPerRow = calculateItemsPerRow();
     if(newItemsPerRow != m_currentItemsPerRow)
@@ -630,7 +632,7 @@ void InstanceView::dragMoveEvent(QDragMoveEvent *event)
     event->accept();
 }
 
-void InstanceView::dragLeaveEvent(QDragLeaveEvent *event)
+void InstanceView::dragLeaveEvent([[maybe_unused]] QDragLeaveEvent *event)
 {
     executeDelayedItemsLayout();
 
@@ -655,9 +657,9 @@ void InstanceView::dropEvent(QDropEvent *event)
         {
             std::pair<VisualGroup *, VisualGroup::HitResults> dropPos = rowDropPos(event->pos());
             const VisualGroup *group = dropPos.first;
-            auto hitresult = dropPos.second;
+            auto hitResult = dropPos.second;
 
-            if (hitresult == VisualGroup::HitResult::NoHit)
+            if (hitResult == VisualGroup::HitResult::NoHit)
             {
                 viewport()->update();
                 return;
@@ -697,8 +699,8 @@ void InstanceView::startDrag(Qt::DropActions supportedActions)
     if(indexes.count() == 0)
         return;
 
-    QMimeData *data = model()->mimeData(indexes);
-    if (!data)
+    QMimeData *mimeData = model()->mimeData(indexes);
+    if (!mimeData)
     {
         return;
     }
@@ -706,7 +708,7 @@ void InstanceView::startDrag(Qt::DropActions supportedActions)
     QPixmap pixmap = renderToPixmap(indexes, &rect);
     QDrag *drag = new QDrag(this);
     drag->setPixmap(pixmap);
-    drag->setMimeData(data);
+    drag->setMimeData(mimeData);
     drag->setHotSpot(m_pressedPosition - rect.topLeft());
     Qt::DropAction defaultDropAction = Qt::IgnoreAction;
     if (this->defaultDropAction() != Qt::IgnoreAction && (supportedActions & this->defaultDropAction()))
@@ -833,16 +835,16 @@ QList<std::pair<QRect, QModelIndex>> InstanceView::draggablePaintPairs(const QMo
     return ret;
 }
 
-bool InstanceView::isDragEventAccepted(QDropEvent *event)
+bool InstanceView::isDragEventAccepted([[maybe_unused]] QDropEvent *event)
 {
     return true;
 }
 
 std::pair<VisualGroup *, VisualGroup::HitResults> InstanceView::rowDropPos(const QPoint &pos)
 {
-    VisualGroup::HitResults hitresult;
-    auto group = categoryAt(pos + offset(), hitresult);
-    return std::make_pair(group, hitresult);
+    VisualGroup::HitResults hitResult;
+    auto group = categoryAt(pos + offset(), hitResult);
+    return std::make_pair(group, hitResult);
 }
 
 QPoint InstanceView::offset() const
@@ -871,7 +873,7 @@ QRegion InstanceView::visualRegionForSelection(const QItemSelection &selection)
     return region;
 }
 
-QModelIndex InstanceView::moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers)
+QModelIndex InstanceView::moveCursor(QAbstractItemView::CursorAction cursorAction, [[maybe_unused]] Qt::KeyboardModifiers modifiers)
 {
     auto current = currentIndex();
     if(!current.isValid())
@@ -896,23 +898,23 @@ QModelIndex InstanceView::moveCursor(QAbstractItemView::CursorAction cursorActio
         {
             if(row == 0)
             {
-                int prevgroupindex = group_index-1;
-                while(prevgroupindex >= 0)
+                int prevGroupIndex = group_index-1;
+                while(prevGroupIndex >= 0)
                 {
-                    auto prevgroup = m_groups[prevgroupindex];
-                    if(prevgroup->collapsed)
+                    auto prevGroup = m_groups[prevGroupIndex];
+                    if(prevGroup->collapsed)
                     {
-                        prevgroupindex--;
+                        prevGroupIndex--;
                         continue;
                     }
-                    int newRow = prevgroup->numRows() - 1;
-                    int newRowSize = prevgroup->rows[newRow].size();
+                    int newRow = prevGroup->numRows() - 1;
+                    int newRowSize = prevGroup->rows[newRow].size();
                     int newColumn = m_currentCursorColumn;
                     if (m_currentCursorColumn >= newRowSize)
                     {
                         newColumn = newRowSize - 1;
                     }
-                    return prevgroup->rows[newRow][newColumn];
+                    return prevGroup->rows[newRow][newColumn];
                 }
             }
             else
@@ -932,22 +934,22 @@ QModelIndex InstanceView::moveCursor(QAbstractItemView::CursorAction cursorActio
         {
             if(row == cat->rows.size() - 1)
             {
-                int nextgroupindex = group_index+1;
-                while (nextgroupindex < m_groups.size())
+                int nextGroupIndex = group_index+1;
+                while (nextGroupIndex < m_groups.size())
                 {
-                    auto nextgroup = m_groups[nextgroupindex];
-                    if(nextgroup->collapsed)
+                    auto nextGroup = m_groups[nextGroupIndex];
+                    if(nextGroup->collapsed)
                     {
-                        nextgroupindex++;
+                        nextGroupIndex++;
                         continue;
                     }
-                    int newRowSize = nextgroup->rows[0].size();
+                    int newRowSize = nextGroup->rows[0].size();
                     int newColumn = m_currentCursorColumn;
                     if (m_currentCursorColumn >= newRowSize)
                     {
                         newColumn = newRowSize - 1;
                     }
-                    return nextgroup->rows[0][newColumn];
+                    return nextGroup->rows[0][newColumn];
                 }
             }
             else
@@ -1031,7 +1033,7 @@ void InstanceView::scrollTo(const QModelIndex &index, ScrollHint hint)
     verticalScrollBar()->setValue(verticalScrollToValue(index, rect, hint));
 }
 
-int InstanceView::verticalScrollToValue(const QModelIndex &index, const QRect &rect, QListView::ScrollHint hint) const
+int InstanceView::verticalScrollToValue([[maybe_unused]] const QModelIndex &index, const QRect &rect, QListView::ScrollHint hint) const
 {
     const QRect area = viewport()->rect();
     const bool above = (hint == QListView::EnsureVisible && rect.top() < area.top());
diff --git a/launcher/ui/instanceview/VisualGroup.cpp b/launcher/ui/instanceview/VisualGroup.cpp
index e6bca17d..70fad5a2 100644
--- a/launcher/ui/instanceview/VisualGroup.cpp
+++ b/launcher/ui/instanceview/VisualGroup.cpp
@@ -165,7 +165,7 @@ void VisualGroup::drawHeader(QPainter *painter, const QStyleOptionViewItem &opti
     const QFontMetrics fontMetrics = QFontMetrics(font);
 
     QColor outlineColor = option.palette.text().color();
-    outlineColor.setAlphaF(0.35);
+    outlineColor.setAlphaF(static_cast<float>(0.35));
 
     //BEGIN: top left corner
     {
@@ -234,7 +234,7 @@ void VisualGroup::drawHeader(QPainter *painter, const QStyleOptionViewItem &opti
         painter->setRenderHint(QPainter::Antialiasing, false);
         painter->setFont(font);
         QColor penColor(option.palette.text().color());
-        penColor.setAlphaF(0.6);
+        penColor.setAlphaF(static_cast<float>(0.6));
         painter->setPen(penColor);
         QRect iconSubRect(option.rect);
         iconSubRect.setTop(iconSubRect.top() + 7);
@@ -278,7 +278,7 @@ void VisualGroup::drawHeader(QPainter *painter, const QStyleOptionViewItem &opti
         painter->save();
         painter->setFont(font);
         QColor penColor(option.palette.text().color());
-        penColor.setAlphaF(0.6);
+        penColor.setAlphaF(static_cast<float>(0.6));
         painter->setPen(penColor);
         painter->drawText(textRect, Qt::AlignLeft | Qt::AlignVCenter, text);
         painter->restore();
diff --git a/launcher/ui/pages/global/AccountListPage.cpp b/launcher/ui/pages/global/AccountListPage.cpp
index 278f45c4..5cc3d7f3 100644
--- a/launcher/ui/pages/global/AccountListPage.cpp
+++ b/launcher/ui/pages/global/AccountListPage.cpp
@@ -84,9 +84,8 @@ AccountListPage::AccountListPage(QWidget *parent)
 
     QItemSelectionModel *selectionModel = ui->listView->selectionModel();
 
-    connect(selectionModel, &QItemSelectionModel::selectionChanged, [this](const QItemSelection &sel, const QItemSelection &dsel) {
-        updateButtonStates();
-    });
+    connect(selectionModel, &QItemSelectionModel::selectionChanged,
+            [this]([[maybe_unused]] const QItemSelection& sel, [[maybe_unused]] const QItemSelection& dsel) { updateButtonStates(); });
     connect(ui->listView, &VersionListView::customContextMenuRequested, this, &AccountListPage::ShowContextMenu);
 
     connect(m_accounts.get(), &AccountList::listChanged, this, &AccountListPage::listChanged);
diff --git a/launcher/ui/pages/global/JavaPage.cpp b/launcher/ui/pages/global/JavaPage.cpp
index 81dd4cc1..1f4dcc8d 100644
--- a/launcher/ui/pages/global/JavaPage.cpp
+++ b/launcher/ui/pages/global/JavaPage.cpp
@@ -176,7 +176,7 @@ void JavaPage::on_javaTestBtn_clicked()
     checker->run();
 }
 
-void JavaPage::on_maxMemSpinBox_valueChanged(int i)
+void JavaPage::on_maxMemSpinBox_valueChanged([[maybe_unused]] int i)
 {
     updateThresholds();
 }
diff --git a/launcher/ui/pages/global/ProxyPage.cpp b/launcher/ui/pages/global/ProxyPage.cpp
index ffff8456..5ccdb152 100644
--- a/launcher/ui/pages/global/ProxyPage.cpp
+++ b/launcher/ui/pages/global/ProxyPage.cpp
@@ -73,7 +73,7 @@ void ProxyPage::updateCheckboxStuff()
     ui->proxyAuthBox->setEnabled(enableEditing);
 }
 
-void ProxyPage::proxyGroupChanged(QAbstractButton *button)
+void ProxyPage::proxyGroupChanged([[maybe_unused]] QAbstractButton *button)
 {
     updateCheckboxStuff();
 }
diff --git a/launcher/ui/pages/instance/ExternalResourcesPage.cpp b/launcher/ui/pages/instance/ExternalResourcesPage.cpp
index 173bcb66..5a7100b1 100644
--- a/launcher/ui/pages/instance/ExternalResourcesPage.cpp
+++ b/launcher/ui/pages/instance/ExternalResourcesPage.cpp
@@ -300,7 +300,7 @@ bool ExternalResourcesPage::current(const QModelIndex& current, const QModelInde
     return onSelectionChanged(current, previous);
 }
 
-bool ExternalResourcesPage::onSelectionChanged(const QModelIndex& current, const QModelIndex& previous)
+bool ExternalResourcesPage::onSelectionChanged(const QModelIndex& current, [[maybe_unused]] const QModelIndex& previous)
 {
     auto sourceCurrent = m_filterModel->mapToSource(current);
     int row = sourceCurrent.row();
diff --git a/launcher/ui/pages/instance/InstanceSettingsPage.cpp b/launcher/ui/pages/instance/InstanceSettingsPage.cpp
index 2a7c5b27..311ebc86 100644
--- a/launcher/ui/pages/instance/InstanceSettingsPage.cpp
+++ b/launcher/ui/pages/instance/InstanceSettingsPage.cpp
@@ -482,7 +482,7 @@ void InstanceSettingsPage::changeInstanceAccount(int index)
     }
 }
 
-void InstanceSettingsPage::on_maxMemSpinBox_valueChanged(int i)
+void InstanceSettingsPage::on_maxMemSpinBox_valueChanged([[maybe_unused]] int i)
 {
     updateThresholds();
 }
diff --git a/launcher/ui/pages/instance/ModFolderPage.cpp b/launcher/ui/pages/instance/ModFolderPage.cpp
index 90e7d0d6..f6b1a71c 100644
--- a/launcher/ui/pages/instance/ModFolderPage.cpp
+++ b/launcher/ui/pages/instance/ModFolderPage.cpp
@@ -122,7 +122,7 @@ bool ModFolderPage::shouldDisplay() const
     return true;
 }
 
-bool ModFolderPage::onSelectionChanged(const QModelIndex& current, const QModelIndex& previous)
+bool ModFolderPage::onSelectionChanged(const QModelIndex& current, [[maybe_unused]] const QModelIndex& previous)
 {
     auto sourceCurrent = m_filterModel->mapToSource(current);
     int row = sourceCurrent.row();
diff --git a/launcher/ui/pages/instance/OtherLogsPage.cpp b/launcher/ui/pages/instance/OtherLogsPage.cpp
index bbdd7324..f2b13f32 100644
--- a/launcher/ui/pages/instance/OtherLogsPage.cpp
+++ b/launcher/ui/pages/instance/OtherLogsPage.cpp
@@ -287,23 +287,23 @@ void OtherLogsPage::on_btnClean_clicked()
     }
     if(!failed.empty())
     {
-        QMessageBox *messageBox = new QMessageBox(this);
-        messageBox->setWindowTitle(tr("Error"));
+        QMessageBox *messageBoxFailure = new QMessageBox(this);
+        messageBoxFailure->setWindowTitle(tr("Error"));
         if(failed.size() > 5)
         {
-            messageBox->setText(tr("Couldn't delete some files!"));
-            messageBox->setDetailedText(failed.join('\n'));
+            messageBoxFailure->setText(tr("Couldn't delete some files!"));
+            messageBoxFailure->setDetailedText(failed.join('\n'));
         }
         else
         {
-            messageBox->setText(tr("Couldn't delete some files:\n%1").arg(failed.join('\n')));
+            messageBoxFailure->setText(tr("Couldn't delete some files:\n%1").arg(failed.join('\n')));
         }
-        messageBox->setStandardButtons(QMessageBox::Ok);
-        messageBox->setDefaultButton(QMessageBox::Ok);
-        messageBox->setTextInteractionFlags(Qt::TextSelectableByMouse);
-        messageBox->setIcon(QMessageBox::Critical);
-        messageBox->setTextInteractionFlags(Qt::TextBrowserInteraction);
-        messageBox->exec();
+        messageBoxFailure->setStandardButtons(QMessageBox::Ok);
+        messageBoxFailure->setDefaultButton(QMessageBox::Ok);
+        messageBoxFailure->setTextInteractionFlags(Qt::TextSelectableByMouse);
+        messageBoxFailure->setIcon(QMessageBox::Critical);
+        messageBoxFailure->setTextInteractionFlags(Qt::TextBrowserInteraction);
+        messageBoxFailure->exec();
     }
 }
 
diff --git a/launcher/ui/pages/instance/ResourcePackPage.cpp b/launcher/ui/pages/instance/ResourcePackPage.cpp
index 24bfb38d..2696acfc 100644
--- a/launcher/ui/pages/instance/ResourcePackPage.cpp
+++ b/launcher/ui/pages/instance/ResourcePackPage.cpp
@@ -55,7 +55,7 @@ ResourcePackPage::ResourcePackPage(MinecraftInstance* instance, std::shared_ptr<
     ui->actionViewConfigs->setVisible(false);
 }
 
-bool ResourcePackPage::onSelectionChanged(const QModelIndex& current, const QModelIndex& previous)
+bool ResourcePackPage::onSelectionChanged(const QModelIndex& current, [[maybe_unused]] const QModelIndex& previous)
 {
     auto sourceCurrent = m_filterModel->mapToSource(current);
     int row = sourceCurrent.row();
diff --git a/launcher/ui/pages/instance/ServersPage.cpp b/launcher/ui/pages/instance/ServersPage.cpp
index 4b1fa08a..09ed9e40 100644
--- a/launcher/ui/pages/instance/ServersPage.cpp
+++ b/launcher/ui/pages/instance/ServersPage.cpp
@@ -684,7 +684,7 @@ void ServersPage::runningStateChanged(bool running)
     updateState();
 }
 
-void ServersPage::currentChanged(const QModelIndex &current, const QModelIndex &previous)
+void ServersPage::currentChanged(const QModelIndex &current, [[maybe_unused]] const QModelIndex &previous)
 {
     int nextServer = -1;
     if (!current.isValid())
@@ -700,7 +700,7 @@ void ServersPage::currentChanged(const QModelIndex &current, const QModelIndex &
 }
 
 // WARNING: this is here because currentChanged is not accurate when removing rows. the current item needs to be fixed up after removal.
-void ServersPage::rowsRemoved(const QModelIndex& parent, int first, int last)
+void ServersPage::rowsRemoved([[maybe_unused]] const QModelIndex& parent, int first, int last)
 {
     if(currentServer < first)
     {
diff --git a/launcher/ui/pages/instance/TexturePackPage.cpp b/launcher/ui/pages/instance/TexturePackPage.cpp
index 427aba11..f7b3bc8d 100644
--- a/launcher/ui/pages/instance/TexturePackPage.cpp
+++ b/launcher/ui/pages/instance/TexturePackPage.cpp
@@ -57,7 +57,7 @@ TexturePackPage::TexturePackPage(MinecraftInstance* instance, std::shared_ptr<Te
     ui->actionViewConfigs->setVisible(false);
 }
 
-bool TexturePackPage::onSelectionChanged(const QModelIndex& current, const QModelIndex& previous)
+bool TexturePackPage::onSelectionChanged(const QModelIndex& current, [[maybe_unused]] const QModelIndex& previous)
 {
     auto sourceCurrent = m_filterModel->mapToSource(current);
     int row = sourceCurrent.row();
diff --git a/launcher/ui/pages/instance/VersionPage.cpp b/launcher/ui/pages/instance/VersionPage.cpp
index 59107c53..e3cef0d7 100644
--- a/launcher/ui/pages/instance/VersionPage.cpp
+++ b/launcher/ui/pages/instance/VersionPage.cpp
@@ -202,7 +202,7 @@ void VersionPage::showContextMenu(const QPoint& pos)
     delete menu;
 }
 
-void VersionPage::packageCurrent(const QModelIndex &current, const QModelIndex &previous)
+void VersionPage::packageCurrent(const QModelIndex &current, [[maybe_unused]] const QModelIndex &previous)
 {
     if (!current.isValid())
     {
@@ -647,7 +647,7 @@ void VersionPage::on_actionMinecraftFolder_triggered()
     DesktopServices::openDirectory(m_inst->gameRoot(), true);
 }
 
-void VersionPage::versionCurrent(const QModelIndex &current, const QModelIndex &previous)
+void VersionPage::versionCurrent(const QModelIndex &current, [[maybe_unused]] const QModelIndex &previous)
 {
     currentIdx = current.row();
     updateButtons(currentIdx);
diff --git a/launcher/ui/pages/instance/WorldListPage.cpp b/launcher/ui/pages/instance/WorldListPage.cpp
index b6ad159e..d961a382 100644
--- a/launcher/ui/pages/instance/WorldListPage.cpp
+++ b/launcher/ui/pages/instance/WorldListPage.cpp
@@ -352,7 +352,7 @@ void WorldListPage::mceditState(LoggedProcess::State state)
     }
 }
 
-void WorldListPage::worldChanged(const QModelIndex &current, const QModelIndex &previous)
+void WorldListPage::worldChanged([[maybe_unused]] const QModelIndex &current, [[maybe_unused]] const QModelIndex &previous)
 {
     QModelIndex index = getSelectedWorld();
     bool enable = index.isValid();
diff --git a/launcher/ui/pages/modplatform/ImportPage.cpp b/launcher/ui/pages/modplatform/ImportPage.cpp
index 30196aad..8f30781e 100644
--- a/launcher/ui/pages/modplatform/ImportPage.cpp
+++ b/launcher/ui/pages/modplatform/ImportPage.cpp
@@ -50,7 +50,7 @@ class UrlValidator : public QValidator
 public:
     using QValidator::QValidator;
 
-    State validate(QString &in, int &pos) const
+    State validate(QString &in, [[maybe_unused]] int &pos) const
     {
         const QUrl url(in);
         if (url.isValid() && !url.isRelative() && !url.isEmpty())
@@ -118,8 +118,8 @@ void ImportPage::updateState()
 
             if(fi.exists() && (isZip || isMRPack))
             {
-                QFileInfo fi(url.fileName());
-                dialog->setSuggestedPack(fi.completeBaseName(), new InstanceImportTask(url,this));
+                QFileInfo file_info(url.fileName());
+                dialog->setSuggestedPack(file_info.completeBaseName(), new InstanceImportTask(url,this));
                 dialog->setSuggestedIcon("default");
             }
         }
diff --git a/launcher/ui/pages/modplatform/ResourceModel.cpp b/launcher/ui/pages/modplatform/ResourceModel.cpp
index 49405a02..26b96d54 100644
--- a/launcher/ui/pages/modplatform/ResourceModel.cpp
+++ b/launcher/ui/pages/modplatform/ResourceModel.cpp
@@ -102,7 +102,7 @@ QHash<int, QByteArray> ResourceModel::roleNames() const
     return roles;
 }
 
-bool ResourceModel::setData(const QModelIndex& index, const QVariant& value, int role)
+bool ResourceModel::setData(const QModelIndex& index, const QVariant& value, [[maybe_unused]] int role)
 {
     int pos = index.row();
     if (pos >= m_packs.size() || pos < 0 || !index.isValid())
@@ -310,7 +310,7 @@ std::optional<QIcon> ResourceModel::getIcon(QModelIndex& index, const QUrl& url)
 #define NEED_FOR_CALLBACK_ASSERT(name) \
     Q_ASSERT_X(0 != 0, #name, "You NEED to re-implement this if you intend on using the default callbacks.")
 
-QJsonArray ResourceModel::documentToArray(QJsonDocument& doc) const
+QJsonArray ResourceModel::documentToArray([[maybe_unused]] QJsonDocument& doc) const
 {
     NEED_FOR_CALLBACK_ASSERT("documentToArray");
     return {};
@@ -372,7 +372,7 @@ void ResourceModel::searchRequestSucceeded(QJsonDocument& doc)
     endInsertRows();
 }
 
-void ResourceModel::searchRequestFailed(QString reason, int network_error_code)
+void ResourceModel::searchRequestFailed([[maybe_unused]] QString reason, int network_error_code)
 {
     switch (network_error_code) {
         default:
diff --git a/launcher/ui/pages/modplatform/ResourcePackModel.cpp b/launcher/ui/pages/modplatform/ResourcePackModel.cpp
index 18c14bf8..d436f320 100644
--- a/launcher/ui/pages/modplatform/ResourcePackModel.cpp
+++ b/launcher/ui/pages/modplatform/ResourcePackModel.cpp
@@ -9,7 +9,8 @@
 namespace ResourceDownload {
 
 ResourcePackResourceModel::ResourcePackResourceModel(BaseInstance const& base_inst, ResourceAPI* api)
-    : ResourceModel(api), m_base_instance(base_inst){};
+    : ResourceModel(api), m_base_instance(base_inst)
+{}
 
 /******** Make data requests ********/
 
diff --git a/launcher/ui/pages/modplatform/ResourcePage.cpp b/launcher/ui/pages/modplatform/ResourcePage.cpp
index aab2ee89..b98f614f 100644
--- a/launcher/ui/pages/modplatform/ResourcePage.cpp
+++ b/launcher/ui/pages/modplatform/ResourcePage.cpp
@@ -279,7 +279,7 @@ void ResourcePage::updateVersionList()
     updateSelectionButton();
 }
 
-void ResourcePage::onSelectionChanged(QModelIndex curr, QModelIndex prev)
+void ResourcePage::onSelectionChanged(QModelIndex curr, [[maybe_unused]] QModelIndex prev)
 {
     if (!curr.isValid()) {
         return;
@@ -306,9 +306,9 @@ void ResourcePage::onSelectionChanged(QModelIndex curr, QModelIndex prev)
     updateUi();
 }
 
-void ResourcePage::onVersionSelectionChanged(QString data)
+void ResourcePage::onVersionSelectionChanged(QString versionData)
 {
-    if (data.isNull() || data.isEmpty()) {
+    if (versionData.isNull() || versionData.isEmpty()) {
         m_selected_version_index = -1;
         return;
     }
diff --git a/launcher/ui/pages/modplatform/ResourcePage.h b/launcher/ui/pages/modplatform/ResourcePage.h
index b4a87f57..3e8bb7d8 100644
--- a/launcher/ui/pages/modplatform/ResourcePage.h
+++ b/launcher/ui/pages/modplatform/ResourcePage.h
@@ -97,7 +97,10 @@ class ResourcePage : public QWidget, public BasePage {
     virtual void openUrl(const QUrl&);
 
     /** Whether the version is opted out or not. Currently only makes sense in CF. */
-    virtual bool optedOut(ModPlatform::IndexedVersion& ver) const { return false; };
+    virtual bool optedOut(ModPlatform::IndexedVersion& ver) const { 
+        Q_UNUSED(ver);
+        return false;
+    };
 
    public:
     BaseInstance& m_base_instance;
diff --git a/launcher/ui/pages/modplatform/ShaderPackModel.cpp b/launcher/ui/pages/modplatform/ShaderPackModel.cpp
index aabd3be6..8c913657 100644
--- a/launcher/ui/pages/modplatform/ShaderPackModel.cpp
+++ b/launcher/ui/pages/modplatform/ShaderPackModel.cpp
@@ -9,7 +9,8 @@
 namespace ResourceDownload {
 
 ShaderPackResourceModel::ShaderPackResourceModel(BaseInstance const& base_inst, ResourceAPI* api)
-    : ResourceModel(api), m_base_instance(base_inst){};
+    : ResourceModel(api), m_base_instance(base_inst)
+{}
 
 /******** Make data requests ********/
 
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp
index 7b61daa7..289173e1 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp
@@ -114,7 +114,7 @@ QVariant AtlOptionalModListModel::data(const QModelIndex &index, int role) const
     return {};
 }
 
-bool AtlOptionalModListModel::setData(const QModelIndex &index, const QVariant &value, int role) {
+bool AtlOptionalModListModel::setData(const QModelIndex &index, [[maybe_unused]] const QVariant &value, int role) {
     if (role == Qt::CheckStateRole) {
         auto row = index.row();
         auto mod = m_mods.at(row);
@@ -206,7 +206,7 @@ void AtlOptionalModListModel::shareCodeSuccess() {
                      AtlOptionalModListModel::index(m_mods.size() - 1, EnabledColumn));
 }
 
-void AtlOptionalModListModel::shareCodeFailure(const QString& reason) {
+void AtlOptionalModListModel::shareCodeFailure([[maybe_unused]] const QString& reason) {
     m_jobPtr.reset();
 
     // fixme: plumb in an error message
@@ -277,16 +277,16 @@ void AtlOptionalModListModel::setMod(ATLauncher::VersionMod mod, int index, bool
         // if the dependency is 'effectively hidden', then track which mods
         // depend on it - so we can efficiently disable it when no more dependents
         // depend on it.
-        auto dependants = m_dependants[dependencyName];
+        auto dependents = m_dependents[dependencyName];
 
         if (enable) {
-            dependants.append(mod.name);
+            dependents.append(mod.name);
         }
         else {
-            dependants.removeAll(mod.name);
+            dependents.removeAll(mod.name);
 
             // if there are no longer any dependents, let's disable the mod
-            if (dependencyMod.effectively_hidden && dependants.isEmpty()) {
+            if (dependencyMod.effectively_hidden && dependents.isEmpty()) {
                 setMod(dependencyMod, dependencyIndex, false, shouldEmit);
             }
         }
@@ -294,8 +294,8 @@ void AtlOptionalModListModel::setMod(ATLauncher::VersionMod mod, int index, bool
 
     // disable mods that depend on this one, if disabling
     if (!enable) {
-        auto dependants = m_dependants[mod.name];
-        for (const auto& dependencyName : dependants) {
+        auto dependents = m_dependents[mod.name];
+        for (const auto& dependencyName : dependents) {
             auto dependencyIndex = m_index[dependencyName];
             auto dependencyMod = m_mods.at(dependencyIndex);
 
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h b/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h
index 639f0d48..fe24d821 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h
@@ -91,7 +91,7 @@ private:
 
     QMap<QString, bool> m_selection;
     QMap<QString, int> m_index;
-    QMap<QString, QVector<QString>> m_dependants;
+    QMap<QString, QVector<QString>> m_dependents;
 };
 
 class AtlOptionalModDialog : public QDialog {
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp
index 87544445..7c80ed2d 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp
@@ -132,13 +132,13 @@ void AtlPage::triggerSearch()
     filterModel->setSearchTerm(ui->searchEdit->text());
 }
 
-void AtlPage::onSortingSelectionChanged(QString data)
+void AtlPage::onSortingSelectionChanged(QString sort)
 {
-    auto toSet = filterModel->getAvailableSortings().value(data);
+    auto toSet = filterModel->getAvailableSortings().value(sort);
     filterModel->setSorting(toSet);
 }
 
-void AtlPage::onSelectionChanged(QModelIndex first, QModelIndex second)
+void AtlPage::onSelectionChanged(QModelIndex first, [[maybe_unused]] QModelIndex second)
 {
     ui->versionSelectionBox->clear();
 
@@ -162,14 +162,14 @@ void AtlPage::onSelectionChanged(QModelIndex first, QModelIndex second)
     suggestCurrent();
 }
 
-void AtlPage::onVersionSelectionChanged(QString data)
+void AtlPage::onVersionSelectionChanged(QString version)
 {
-    if(data.isNull() || data.isEmpty())
+    if(version.isNull() || version.isEmpty())
     {
         selectedVersion = "";
         return;
     }
 
-    selectedVersion = data;
+    selectedVersion = version;
     suggestCurrent();
 }
diff --git a/launcher/ui/pages/modplatform/flame/FlameModel.cpp b/launcher/ui/pages/modplatform/flame/FlameModel.cpp
index fa55aa68..c693515f 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModel.cpp
+++ b/launcher/ui/pages/modplatform/flame/FlameModel.cpp
@@ -68,7 +68,7 @@ QVariant ListModel::data(const QModelIndex& index, int role) const
     return QVariant();
 }
 
-bool ListModel::setData(const QModelIndex &index, const QVariant &value, int role)
+bool ListModel::setData(const QModelIndex &index, const QVariant &value, [[maybe_unused]] int role)
 {
     int pos = index.row();
     if (pos >= modpacks.size() || pos < 0 || !index.isValid())
@@ -139,7 +139,7 @@ Qt::ItemFlags ListModel::flags(const QModelIndex& index) const
     return QAbstractListModel::flags(index);
 }
 
-bool ListModel::canFetchMore(const QModelIndex& parent) const
+bool ListModel::canFetchMore([[maybe_unused]] const QModelIndex& parent) const
 {
     return searchState == CanPossiblyFetchMore;
 }
diff --git a/launcher/ui/pages/modplatform/flame/FlamePage.cpp b/launcher/ui/pages/modplatform/flame/FlamePage.cpp
index cef26bb6..5942883f 100644
--- a/launcher/ui/pages/modplatform/flame/FlamePage.cpp
+++ b/launcher/ui/pages/modplatform/flame/FlamePage.cpp
@@ -114,7 +114,7 @@ void FlamePage::triggerSearch()
     listModel->searchWithTerm(ui->searchEdit->text(), ui->sortByBox->currentIndex());
 }
 
-void FlamePage::onSelectionChanged(QModelIndex curr, QModelIndex prev)
+void FlamePage::onSelectionChanged(QModelIndex curr, [[maybe_unused]] QModelIndex prev)
 {
     ui->versionSelectionBox->clear();
 
@@ -212,12 +212,12 @@ void FlamePage::suggestCurrent()
                        [this, editedLogoName](QString logo) { dialog->setSuggestedIconFromFile(logo, editedLogoName); });
 }
 
-void FlamePage::onVersionSelectionChanged(QString data)
+void FlamePage::onVersionSelectionChanged(QString version)
 {
     bool is_blocked = false;
     ui->versionSelectionBox->currentData().toInt(&is_blocked);
 
-    if (data.isNull() || data.isEmpty() || is_blocked) {
+    if (version.isNull() || version.isEmpty() || is_blocked) {
         m_selected_version_index = -1;
         return;
     }
diff --git a/launcher/ui/pages/modplatform/flame/FlameResourceModels.cpp b/launcher/ui/pages/modplatform/flame/FlameResourceModels.cpp
index 0fb67c50..2b020c48 100644
--- a/launcher/ui/pages/modplatform/flame/FlameResourceModels.cpp
+++ b/launcher/ui/pages/modplatform/flame/FlameResourceModels.cpp
@@ -32,7 +32,7 @@ void FlameModModel::loadIndexedPackVersions(ModPlatform::IndexedPack& m, QJsonAr
 auto FlameModModel::loadDependencyVersions(const ModPlatform::Dependency& m, QJsonArray& arr) -> ModPlatform::IndexedVersion
 {
     return FlameMod::loadDependencyVersions(m, arr);
-};
+}
 
 auto FlameModModel::documentToArray(QJsonDocument& obj) const -> QJsonArray
 {
diff --git a/launcher/ui/pages/modplatform/legacy_ftb/ListModel.cpp b/launcher/ui/pages/modplatform/legacy_ftb/ListModel.cpp
index 330dd4fb..75b8f9d1 100644
--- a/launcher/ui/pages/modplatform/legacy_ftb/ListModel.cpp
+++ b/launcher/ui/pages/modplatform/legacy_ftb/ListModel.cpp
@@ -76,7 +76,7 @@ bool FilterModel::lessThan(const QModelIndex& left, const QModelIndex& right) co
     return true;
 }
 
-bool FilterModel::filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const
+bool FilterModel::filterAcceptsRow([[maybe_unused]] int sourceRow, [[maybe_unused]] const QModelIndex& sourceParent) const
 {
     return true;
 }
@@ -173,10 +173,10 @@ QVariant ListModel::data(const QModelIndex& index, int role) const
     return QVariant();
 }
 
-void ListModel::fill(ModpackList modpacks)
+void ListModel::fill(ModpackList modpacks_)
 {
     beginResetModel();
-    this->modpacks = modpacks;
+    this->modpacks = modpacks_;
     endResetModel();
 }
 
diff --git a/launcher/ui/pages/modplatform/legacy_ftb/Page.cpp b/launcher/ui/pages/modplatform/legacy_ftb/Page.cpp
index b3f6261f..d4174ff1 100644
--- a/launcher/ui/pages/modplatform/legacy_ftb/Page.cpp
+++ b/launcher/ui/pages/modplatform/legacy_ftb/Page.cpp
@@ -234,7 +234,7 @@ void Page::ftbPrivatePackDataDownloadSuccessfully(Modpack pack)
     privateListModel->addPack(pack);
 }
 
-void Page::ftbPrivatePackDataDownloadFailed(QString reason, QString packCode)
+void Page::ftbPrivatePackDataDownloadFailed([[maybe_unused]] QString reason, QString packCode)
 {
     auto reply = QMessageBox::question(
         this,
@@ -247,7 +247,7 @@ void Page::ftbPrivatePackDataDownloadFailed(QString reason, QString packCode)
     }
 }
 
-void Page::onPublicPackSelectionChanged(QModelIndex now, QModelIndex prev)
+void Page::onPublicPackSelectionChanged(QModelIndex now, [[maybe_unused]] QModelIndex prev)
 {
     if(!now.isValid())
     {
@@ -258,7 +258,7 @@ void Page::onPublicPackSelectionChanged(QModelIndex now, QModelIndex prev)
     onPackSelectionChanged(&selectedPack);
 }
 
-void Page::onThirdPartyPackSelectionChanged(QModelIndex now, QModelIndex prev)
+void Page::onThirdPartyPackSelectionChanged(QModelIndex now, [[maybe_unused]] QModelIndex prev)
 {
     if(!now.isValid())
     {
@@ -269,7 +269,7 @@ void Page::onThirdPartyPackSelectionChanged(QModelIndex now, QModelIndex prev)
     onPackSelectionChanged(&selectedPack);
 }
 
-void Page::onPrivatePackSelectionChanged(QModelIndex now, QModelIndex prev)
+void Page::onPrivatePackSelectionChanged(QModelIndex now, [[maybe_unused]] QModelIndex prev)
 {
     if(!now.isValid())
     {
@@ -318,21 +318,21 @@ void Page::onPackSelectionChanged(Modpack* pack)
     suggestCurrent();
 }
 
-void Page::onVersionSelectionItemChanged(QString data)
+void Page::onVersionSelectionItemChanged(QString version)
 {
-    if(data.isNull() || data.isEmpty())
+    if(version.isNull() || version.isEmpty())
     {
         selectedVersion = "";
         return;
     }
 
-    selectedVersion = data;
+    selectedVersion = version;
     suggestCurrent();
 }
 
-void Page::onSortingSelectionChanged(QString data)
+void Page::onSortingSelectionChanged(QString sort)
 {
-    FilterModel::Sorting toSet = publicFilterModel->getAvailableSortings().value(data);
+    FilterModel::Sorting toSet = publicFilterModel->getAvailableSortings().value(sort);
     publicFilterModel->setSorting(toSet);
     thirdPartyFilterModel->setSorting(toSet);
     privateFilterModel->setSorting(toSet);
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
index e0046d88..14e8e709 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
@@ -115,7 +115,7 @@ auto ModpackListModel::data(const QModelIndex& index, int role) const -> QVarian
     return {};
 }
 
-bool ModpackListModel::setData(const QModelIndex &index, const QVariant &value, int role)
+bool ModpackListModel::setData(const QModelIndex &index, const QVariant &value, [[maybe_unused]] int role)
 {
     int pos = index.row();
     if (pos >= modpacks.size() || pos < 0 || !index.isValid())
@@ -194,8 +194,6 @@ static auto sortFromIndex(int index) -> QString
     case 4:
         return "updated";
     }
-
-    return {};
 }
 
 void ModpackListModel::searchWithTerm(const QString& term, const int sort)
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp
index c71dd903..5e084c03 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp
@@ -105,7 +105,7 @@ bool ModrinthPage::eventFilter(QObject* watched, QEvent* event)
     return QObject::eventFilter(watched, event);
 }
 
-void ModrinthPage::onSelectionChanged(QModelIndex curr, QModelIndex prev)
+void ModrinthPage::onSelectionChanged(QModelIndex curr, [[maybe_unused]] QModelIndex prev)
 {
     ui->versionSelectionBox->clear();
 
@@ -309,9 +309,9 @@ void ModrinthPage::triggerSearch()
     m_model->searchWithTerm(ui->searchEdit->text(), ui->sortByBox->currentIndex());
 }
 
-void ModrinthPage::onVersionSelectionChanged(QString data)
+void ModrinthPage::onVersionSelectionChanged(QString version)
 {
-    if (data.isNull() || data.isEmpty()) {
+    if (version.isNull() || version.isEmpty()) {
         selectedVersion = "";
         return;
     }
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp
index 8aa64989..512eb027 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp
@@ -45,7 +45,7 @@ void ModrinthModModel::loadIndexedPackVersions(ModPlatform::IndexedPack& m, QJso
 auto ModrinthModModel::loadDependencyVersions(const ModPlatform::Dependency& m, QJsonArray& arr) -> ModPlatform::IndexedVersion
 {
     return ::Modrinth::loadDependencyVersions(m, arr);
-};
+}
 
 auto ModrinthModModel::documentToArray(QJsonDocument& obj) const -> QJsonArray
 {
diff --git a/launcher/ui/pages/modplatform/technic/TechnicPage.cpp b/launcher/ui/pages/modplatform/technic/TechnicPage.cpp
index fc678fa2..656009db 100644
--- a/launcher/ui/pages/modplatform/technic/TechnicPage.cpp
+++ b/launcher/ui/pages/modplatform/technic/TechnicPage.cpp
@@ -100,7 +100,7 @@ void TechnicPage::triggerSearch() {
     model->searchWithTerm(ui->searchEdit->text());
 }
 
-void TechnicPage::onSelectionChanged(QModelIndex first, QModelIndex second)
+void TechnicPage::onSelectionChanged(QModelIndex first, [[maybe_unused]] QModelIndex second)
 {
     ui->versionSelectionBox->clear();
 
@@ -319,12 +319,12 @@ void TechnicPage::onSolderLoaded() {
     metadataLoaded();
 }
 
-void TechnicPage::onVersionSelectionChanged(QString data) {
-    if (data.isNull() || data.isEmpty()) {
+void TechnicPage::onVersionSelectionChanged(QString version) {
+    if (version.isNull() || version.isEmpty()) {
         selectedVersion = "";
         return;
     }
 
-    selectedVersion = data;
+    selectedVersion = version;
     selectVersion();
 }
diff --git a/launcher/ui/themes/CustomTheme.cpp b/launcher/ui/themes/CustomTheme.cpp
index 198e76ba..13d6b6ff 100644
--- a/launcher/ui/themes/CustomTheme.cpp
+++ b/launcher/ui/themes/CustomTheme.cpp
@@ -148,7 +148,7 @@ static bool writeThemeJson(const QString& path,
     try {
         Json::write(rootObj, path);
         return true;
-    } catch (const Exception& e) {
+    } catch ([[maybe_unused]] const Exception& e) {
         themeWarningLog() << "Failed to write theme json to" << path;
         return false;
     }
diff --git a/launcher/ui/widgets/InfoFrame.cpp b/launcher/ui/widgets/InfoFrame.cpp
index 9c041bfe..096a6c5d 100644
--- a/launcher/ui/widgets/InfoFrame.cpp
+++ b/launcher/ui/widgets/InfoFrame.cpp
@@ -357,7 +357,7 @@ void InfoFrame::setImage(QPixmap img)
     }
 }
 
-void InfoFrame::descriptionEllipsisHandler(QString link)
+void InfoFrame::descriptionEllipsisHandler([[maybe_unused]] QString link)
 {
     if(!m_current_box)
     {
@@ -371,7 +371,7 @@ void InfoFrame::descriptionEllipsisHandler(QString link)
     }
 }
 
-void InfoFrame::licenseEllipsisHandler(QString link)
+void InfoFrame::licenseEllipsisHandler([[maybe_unused]] QString link)
 {
     if(!m_current_box)
     {
@@ -385,7 +385,7 @@ void InfoFrame::licenseEllipsisHandler(QString link)
     }
 }
 
-void InfoFrame::boxClosed(int result)
+void InfoFrame::boxClosed([[maybe_unused]] int result)
 {
     m_current_box = nullptr;
 }
diff --git a/launcher/ui/widgets/SubTaskProgressBar.cpp b/launcher/ui/widgets/SubTaskProgressBar.cpp
index 84ea5f20..96f4fe24 100644
--- a/launcher/ui/widgets/SubTaskProgressBar.cpp
+++ b/launcher/ui/widgets/SubTaskProgressBar.cpp
@@ -27,7 +27,7 @@ unique_qobject_ptr<SubTaskProgressBar> SubTaskProgressBar::create(QWidget* paren
 }
 
 SubTaskProgressBar::SubTaskProgressBar(QWidget* parent)
-    : ui(new Ui::SubTaskProgressBar)
+    : QWidget(parent), ui(new Ui::SubTaskProgressBar)
 {
     ui->setupUi(this);
 }
-- 
cgit 


From 44ff247f5f71ebeb95423ca37bf82d9913073522 Mon Sep 17 00:00:00 2001
From: Trial97 <alexandru.tripon97@gmail.com>
Date: Fri, 18 Aug 2023 20:03:02 +0300
Subject: feat:refactored modpack ux

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
---
 launcher/modplatform/ResourceAPI.h                 |   2 +
 .../modplatform/helpers/NetworkResourceAPI.cpp     |   3 +-
 launcher/ui/pages/modplatform/ResourceModel.cpp    |  57 +++++++++++
 launcher/ui/pages/modplatform/ResourceModel.h      |   1 +
 launcher/ui/pages/modplatform/ResourcePage.cpp     |   3 -
 .../modplatform/atlauncher/AtlFilterModel.cpp      |   3 +-
 .../pages/modplatform/atlauncher/AtlListModel.cpp  |  56 +++++++----
 .../ui/pages/modplatform/atlauncher/AtlPage.cpp    |   4 +-
 .../ui/pages/modplatform/atlauncher/AtlPage.ui     |  89 +++++++++--------
 launcher/ui/pages/modplatform/flame/FlameModel.cpp |  55 +++++++++--
 launcher/ui/pages/modplatform/flame/FlameModel.h   |   5 +-
 launcher/ui/pages/modplatform/flame/FlamePage.cpp  |  10 ++
 launcher/ui/pages/modplatform/flame/FlamePage.h    |   5 +-
 .../pages/modplatform/import_ftb/ImportFTBPage.cpp |  29 +++++-
 .../pages/modplatform/import_ftb/ImportFTBPage.h   |   3 +
 .../pages/modplatform/import_ftb/ImportFTBPage.ui  |  52 +++++++++-
 .../ui/pages/modplatform/import_ftb/ListModel.cpp  | 105 ++++++++++++++++++---
 .../ui/pages/modplatform/import_ftb/ListModel.h    |  22 +++++
 .../ui/pages/modplatform/legacy_ftb/ListModel.cpp  |  90 ++++++++++++------
 .../ui/pages/modplatform/legacy_ftb/ListModel.h    |   2 +
 launcher/ui/pages/modplatform/legacy_ftb/Page.cpp  |  13 +++
 launcher/ui/pages/modplatform/legacy_ftb/Page.h    |   5 +-
 launcher/ui/pages/modplatform/legacy_ftb/Page.ui   |  49 +++++++---
 .../pages/modplatform/modrinth/ModrinthModel.cpp   |  62 ++++++++++--
 .../ui/pages/modplatform/modrinth/ModrinthModel.h  |   5 +-
 .../ui/pages/modplatform/modrinth/ModrinthPage.cpp |  10 ++
 .../ui/pages/modplatform/modrinth/ModrinthPage.h   |   4 +
 .../ui/pages/modplatform/technic/TechnicModel.cpp  |  72 ++++++++++----
 .../ui/pages/modplatform/technic/TechnicModel.h    |   2 +
 .../ui/pages/modplatform/technic/TechnicPage.cpp   |  13 +++
 .../ui/pages/modplatform/technic/TechnicPage.h     |   5 +-
 launcher/ui/widgets/ProjectItem.cpp                |   2 +-
 32 files changed, 677 insertions(+), 161 deletions(-)

(limited to 'launcher/ui/pages/modplatform/ResourceModel.cpp')

diff --git a/launcher/modplatform/ResourceAPI.h b/launcher/modplatform/ResourceAPI.h
index a92217a0..bd0d2824 100644
--- a/launcher/modplatform/ResourceAPI.h
+++ b/launcher/modplatform/ResourceAPI.h
@@ -109,6 +109,8 @@ class ResourceAPI {
     };
     struct ProjectInfoCallbacks {
         std::function<void(QJsonDocument&, ModPlatform::IndexedPack)> on_succeed;
+        std::function<void(QString const& reason)> on_fail;
+        std::function<void()> on_abort;
     };
 
     struct DependencySearchArgs {
diff --git a/launcher/modplatform/helpers/NetworkResourceAPI.cpp b/launcher/modplatform/helpers/NetworkResourceAPI.cpp
index 46b96662..506eb187 100644
--- a/launcher/modplatform/helpers/NetworkResourceAPI.cpp
+++ b/launcher/modplatform/helpers/NetworkResourceAPI.cpp
@@ -72,7 +72,8 @@ Task::Ptr NetworkResourceAPI::getProjectInfo(ProjectInfoArgs&& args, ProjectInfo
 
         callbacks.on_succeed(doc, args.pack);
     });
-
+    QObject::connect(job.get(), &NetJob::failed, [callbacks](QString reason) { callbacks.on_fail(reason); });
+    QObject::connect(job.get(), &NetJob::aborted, [callbacks] { callbacks.on_abort(); });
     return job;
 }
 
diff --git a/launcher/ui/pages/modplatform/ResourceModel.cpp b/launcher/ui/pages/modplatform/ResourceModel.cpp
index 0a7edb7b..96803531 100644
--- a/launcher/ui/pages/modplatform/ResourceModel.cpp
+++ b/launcher/ui/pages/modplatform/ResourceModel.cpp
@@ -132,6 +132,36 @@ void ResourceModel::search()
     if (hasActiveSearchJob())
         return;
 
+    if (m_search_term.startsWith("#")) {
+        auto projectId = m_search_term.removeFirst();
+        if (!projectId.isEmpty()) {
+            ResourceAPI::ProjectInfoCallbacks callbacks;
+
+            // Use defaults if no callbacks are set
+            if (!callbacks.on_fail)
+                callbacks.on_fail = [this](QString reason) {
+                    if (!s_running_models.constFind(this).value())
+                        return;
+                    searchRequestFailed(reason, -1);
+                };
+            if (!callbacks.on_abort)
+                callbacks.on_abort = [this] {
+                    if (!s_running_models.constFind(this).value())
+                        return;
+                    searchRequestAborted();
+                };
+
+            if (!callbacks.on_succeed)
+                callbacks.on_succeed = [this](auto& doc, auto pack) {
+                    if (!s_running_models.constFind(this).value())
+                        return;
+                    searchRequestForOneSucceeded(doc);
+                };
+            if (auto job = m_api->getProjectInfo({ projectId }, std::move(callbacks)); job)
+                runSearchJob(job);
+            return;
+        }
+    }
     auto args{ createSearchArguments() };
 
     auto callbacks{ createSearchCallbacks() };
@@ -194,6 +224,12 @@ void ResourceModel::loadEntry(QModelIndex& entry)
                     return;
                 infoRequestSucceeded(doc, pack, entry);
             };
+        if (!callbacks.on_fail)
+            callbacks.on_fail = [this](QString reason) {
+                if (!s_running_models.constFind(this).value())
+                    return;
+                QMessageBox::critical(nullptr, tr("Error"), tr("A network error occurred. Could not load project info:%1").arg(reason));
+            };
 
         if (auto job = m_api->getProjectInfo(std::move(args), std::move(callbacks)); job)
             runInfoJob(job);
@@ -372,6 +408,27 @@ void ResourceModel::searchRequestSucceeded(QJsonDocument& doc)
     endInsertRows();
 }
 
+void ResourceModel::searchRequestForOneSucceeded(QJsonDocument& doc)
+{
+    ModPlatform::IndexedPack::Ptr pack = std::make_shared<ModPlatform::IndexedPack>();
+
+    try {
+        auto obj = Json::requireObject(doc);
+        if (obj.contains("data"))
+            obj = Json::requireObject(obj, "data");
+        loadIndexedPack(*pack, obj);
+    } catch (const JSONValidationError& e) {
+        qDebug() << doc;
+        qWarning() << "Error while reading " << debugName() << " resource info: " << e.cause();
+    }
+
+    m_search_state = SearchState::Finished;
+
+    beginInsertRows(QModelIndex(), m_packs.size(), m_packs.size() + 1);
+    m_packs.append(pack);
+    endInsertRows();
+}
+
 void ResourceModel::searchRequestFailed([[maybe_unused]] QString reason, int network_error_code)
 {
     switch (network_error_code) {
diff --git a/launcher/ui/pages/modplatform/ResourceModel.h b/launcher/ui/pages/modplatform/ResourceModel.h
index cc813d6e..ecf4f8f7 100644
--- a/launcher/ui/pages/modplatform/ResourceModel.h
+++ b/launcher/ui/pages/modplatform/ResourceModel.h
@@ -149,6 +149,7 @@ class ResourceModel : public QAbstractListModel {
    private:
     /* Default search request callbacks */
     void searchRequestSucceeded(QJsonDocument&);
+    void searchRequestForOneSucceeded(QJsonDocument&);
     void searchRequestFailed(QString reason, int network_error_code);
     void searchRequestAborted();
 
diff --git a/launcher/ui/pages/modplatform/ResourcePage.cpp b/launcher/ui/pages/modplatform/ResourcePage.cpp
index c087e2be..fc7d64a4 100644
--- a/launcher/ui/pages/modplatform/ResourcePage.cpp
+++ b/launcher/ui/pages/modplatform/ResourcePage.cpp
@@ -44,9 +44,6 @@
 #include <QKeyEvent>
 
 #include "Markdown.h"
-#include "ResourceDownloadTask.h"
-
-#include "minecraft/MinecraftInstance.h"
 
 #include "ui/dialogs/ResourceDownloadDialog.h"
 #include "ui/pages/modplatform/ResourceModel.h"
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlFilterModel.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlFilterModel.cpp
index 9cd5eed5..dee3784e 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlFilterModel.cpp
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlFilterModel.cpp
@@ -67,9 +67,10 @@ bool FilterModel::filterAcceptsRow(int sourceRow, const QModelIndex& sourceParen
     if (searchTerm.isEmpty()) {
         return true;
     }
-
     QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
     ATLauncher::IndexedPack pack = sourceModel()->data(index, Qt::UserRole).value<ATLauncher::IndexedPack>();
+    if (searchTerm.startsWith("#"))
+        return QString::number(pack.id) == searchTerm.mid(1);
     return pack.name.contains(searchTerm, Qt::CaseInsensitive);
 }
 
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlListModel.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlListModel.cpp
index 39f4f346..b6fb7153 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlListModel.cpp
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlListModel.cpp
@@ -21,6 +21,7 @@
 #include <Json.h>
 
 #include "net/ApiDownload.h"
+#include "ui/widgets/ProjectItem.h"
 
 namespace Atl {
 
@@ -46,27 +47,50 @@ QVariant ListModel::data(const QModelIndex& index, int role) const
     }
 
     ATLauncher::IndexedPack pack = modpacks.at(pos);
-    if (role == Qt::DisplayRole) {
-        return pack.name;
-    } else if (role == Qt::ToolTipRole) {
-        return pack.name;
-    } else if (role == Qt::DecorationRole) {
-        if (m_logoMap.contains(pack.safeName)) {
-            return (m_logoMap.value(pack.safeName));
+    switch (role) {
+        case Qt::ToolTipRole: {
+            if (pack.description.length() > 100) {
+                // some magic to prevent to long tooltips and replace html linebreaks
+                QString edit = pack.description.left(97);
+                edit = edit.left(edit.lastIndexOf("<br>")).left(edit.lastIndexOf(" ")).append("...");
+                return edit;
+            }
+            return pack.description;
         }
-        auto icon = APPLICATION->getThemedIcon("atlauncher-placeholder");
+        case Qt::DecorationRole: {
+            if (m_logoMap.contains(pack.safeName)) {
+                return (m_logoMap.value(pack.safeName));
+            }
+            auto icon = APPLICATION->getThemedIcon("atlauncher-placeholder");
 
-        auto url = QString(BuildConfig.ATL_DOWNLOAD_SERVER_URL + "launcher/images/%1.png").arg(pack.safeName.toLower());
-        ((ListModel*)this)->requestLogo(pack.safeName, url);
+            auto url = QString(BuildConfig.ATL_DOWNLOAD_SERVER_URL + "launcher/images/%1.png").arg(pack.safeName.toLower());
+            ((ListModel*)this)->requestLogo(pack.safeName, url);
 
-        return icon;
-    } else if (role == Qt::UserRole) {
-        QVariant v;
-        v.setValue(pack);
-        return v;
+            return icon;
+        }
+        case Qt::UserRole: {
+            QVariant v;
+            v.setValue(pack);
+            return v;
+        }
+        case Qt::DisplayRole:
+            return pack.name;
+        case Qt::SizeHintRole:
+            return QSize(0, 58);
+        // Custom data
+        case UserDataTypes::TITLE:
+            return pack.name;
+        case UserDataTypes::DESCRIPTION:
+            return pack.description;
+        case UserDataTypes::SELECTED:
+            return false;
+        case UserDataTypes::INSTALLED:
+            return false;
+        default:
+            break;
     }
 
-    return QVariant();
+    return {};
 }
 
 void ListModel::request()
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp
index 5e3b9ecf..c7e80027 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp
@@ -35,11 +35,11 @@
  */
 
 #include "AtlPage.h"
+#include "ui/widgets/ProjectItem.h"
 #include "ui_AtlPage.h"
 
 #include "BuildConfig.h"
 
-#include "AtlOptionalModDialog.h"
 #include "AtlUserInteractionSupportImpl.h"
 #include "modplatform/atlauncher/ATLPackInstallTask.h"
 #include "ui/dialogs/NewInstanceDialog.h"
@@ -71,6 +71,8 @@ AtlPage::AtlPage(NewInstanceDialog* dialog, QWidget* parent) : QWidget(parent),
     connect(ui->sortByBox, &QComboBox::currentTextChanged, this, &AtlPage::onSortingSelectionChanged);
     connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &AtlPage::onSelectionChanged);
     connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &AtlPage::onVersionSelectionChanged);
+
+    ui->packView->setItemDelegate(new ProjectItemDelegate(this));
 }
 
 AtlPage::~AtlPage()
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlPage.ui b/launcher/ui/pages/modplatform/atlauncher/AtlPage.ui
index 746aa6d1..8b674733 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlPage.ui
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlPage.ui
@@ -11,21 +11,28 @@
    </rect>
   </property>
   <layout class="QGridLayout" name="gridLayout">
-   <item row="1" column="0" colspan="2">
-    <layout class="QGridLayout" name="gridLayout_3">
-     <item row="1" column="0">
-      <widget class="QTreeView" name="packView">
-       <property name="alternatingRowColors">
-        <bool>true</bool>
+   <item row="3" column="0" colspan="2">
+    <layout class="QGridLayout" name="gridLayout_4" columnstretch="0,0,0" rowminimumheight="0" columnminimumwidth="0,0,0">
+     <item row="0" column="2">
+      <widget class="QComboBox" name="versionSelectionBox"/>
+     </item>
+     <item row="0" column="1">
+      <widget class="QLabel" name="label">
+       <property name="text">
+        <string>Version selected:</string>
        </property>
-       <property name="iconSize">
-        <size>
-         <width>96</width>
-         <height>48</height>
-        </size>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
       </widget>
      </item>
+     <item row="0" column="0">
+      <widget class="QComboBox" name="sortByBox"/>
+     </item>
+    </layout>
+   </item>
+   <item row="2" column="0" colspan="2">
+    <layout class="QGridLayout" name="gridLayout_3">
      <item row="1" column="1">
       <widget class="QTextBrowser" name="packDescription">
        <property name="openExternalLinks">
@@ -36,39 +43,22 @@
        </property>
       </widget>
      </item>
-     <item row="0" column="0" colspan="2">
-      <widget class="QLabel" name="label_2">
-       <property name="text">
-        <string>Warning: This is still a work in progress. If you run into issues with the imported modpack, it may be a bug.</string>
-       </property>
-       <property name="wordWrap">
+     <item row="1" column="0">
+      <widget class="QTreeView" name="packView">
+       <property name="alternatingRowColors">
         <bool>true</bool>
        </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item row="2" column="0" colspan="2">
-    <layout class="QGridLayout" name="gridLayout_4" columnstretch="0,0,0" rowminimumheight="0" columnminimumwidth="0,0,0">
-     <item row="0" column="2">
-      <widget class="QComboBox" name="versionSelectionBox"/>
-     </item>
-     <item row="0" column="1">
-      <widget class="QLabel" name="label">
-       <property name="text">
-        <string>Version selected:</string>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       <property name="iconSize">
+        <size>
+         <width>96</width>
+         <height>48</height>
+        </size>
        </property>
       </widget>
      </item>
-     <item row="0" column="0">
-      <widget class="QComboBox" name="sortByBox"/>
-     </item>
     </layout>
    </item>
-   <item row="0" column="0">
+   <item row="1" column="0">
     <widget class="QLineEdit" name="searchEdit">
      <property name="placeholderText">
       <string>Search and filter...</string>
@@ -78,6 +68,31 @@
      </property>
     </widget>
    </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="pushButton">
+     <property name="text">
+      <string>Search</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="0" colspan="2">
+    <widget class="QLabel" name="label_2">
+     <property name="font">
+      <font>
+       <italic>true</italic>
+      </font>
+     </property>
+     <property name="text">
+      <string>Warning: This is still a work in progress. If you run into issues with the imported modpack, it may be a bug.</string>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignCenter</set>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
   </layout>
  </widget>
  <tabstops>
diff --git a/launcher/ui/pages/modplatform/flame/FlameModel.cpp b/launcher/ui/pages/modplatform/flame/FlameModel.cpp
index ff21d010..e488f078 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModel.cpp
+++ b/launcher/ui/pages/modplatform/flame/FlameModel.cpp
@@ -1,6 +1,8 @@
 #include "FlameModel.h"
 #include <Json.h>
 #include "Application.h"
+#include "modplatform/ResourceAPI.h"
+#include "modplatform/flame/FlameAPI.h"
 #include "ui/widgets/ProjectItem.h"
 
 #include "net/ApiDownload.h"
@@ -161,6 +163,25 @@ void ListModel::fetchMore(const QModelIndex& parent)
 
 void ListModel::performPaginatedSearch()
 {
+    if (currentSearchTerm.startsWith("#")) {
+        auto projectId = currentSearchTerm.removeFirst();
+        if (!projectId.isEmpty()) {
+            ResourceAPI::ProjectInfoCallbacks callbacks;
+
+            // Use defaults if no callbacks are set
+            if (!callbacks.on_fail)
+                callbacks.on_fail = [this](QString reason) { searchRequestFailed(reason); };
+
+            if (!callbacks.on_succeed)
+                callbacks.on_succeed = [this](auto& doc, auto pack) { searchRequestForOneSucceeded(doc); };
+            static const FlameAPI api;
+            if (auto job = api.getProjectInfo({ projectId }, std::move(callbacks)); job) {
+                jobPtr = job;
+                jobPtr->start();
+            }
+            return;
+        }
+    }
     auto netJob = makeShared<NetJob>("Flame::Search", APPLICATION->network());
     auto searchUrl = QString(
                          "https://api.curseforge.com/v1/mods/search?"
@@ -189,23 +210,24 @@ void ListModel::searchWithTerm(const QString& term, int sort)
     }
     currentSearchTerm = term;
     currentSort = sort;
-    if (jobPtr) {
+    if (hasActiveSearchJob()) {
         jobPtr->abort();
         searchState = ResetRequested;
         return;
-    } else {
-        beginResetModel();
-        modpacks.clear();
-        endResetModel();
-        searchState = None;
     }
+    beginResetModel();
+    modpacks.clear();
+    endResetModel();
+    searchState = None;
+
     nextSearchOffset = 0;
     performPaginatedSearch();
 }
 
 void Flame::ListModel::searchRequestFinished()
 {
-    jobPtr.reset();
+    if (hasActiveSearchJob())
+        return;
 
     QJsonParseError parse_error;
     QJsonDocument doc = QJsonDocument::fromJson(*response, &parse_error);
@@ -246,6 +268,25 @@ void Flame::ListModel::searchRequestFinished()
     endInsertRows();
 }
 
+void Flame::ListModel::searchRequestForOneSucceeded(QJsonDocument& doc)
+{
+    jobPtr.reset();
+
+    auto packObj = Json::ensureObject(doc.object(), "data");
+
+    Flame::IndexedPack pack;
+    try {
+        Flame::loadIndexedPack(pack, packObj);
+    } catch (const JSONValidationError& e) {
+        qWarning() << "Error while loading pack from CurseForge: " << e.cause();
+        return;
+    }
+
+    beginInsertRows(QModelIndex(), modpacks.size(), modpacks.size() + 1);
+    modpacks.append({ pack });
+    endInsertRows();
+}
+
 void Flame::ListModel::searchRequestFailed(QString reason)
 {
     jobPtr.reset();
diff --git a/launcher/ui/pages/modplatform/flame/FlameModel.h b/launcher/ui/pages/modplatform/flame/FlameModel.h
index b3bc96b8..cd73fce3 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModel.h
+++ b/launcher/ui/pages/modplatform/flame/FlameModel.h
@@ -40,6 +40,8 @@ class ListModel : public QAbstractListModel {
     void getLogo(const QString& logo, const QString& logoUrl, LogoCallback callback);
     void searchWithTerm(const QString& term, const int sort);
 
+    [[nodiscard]] bool hasActiveSearchJob() const { return jobPtr && jobPtr->isRunning(); }
+
    private slots:
     void performPaginatedSearch();
 
@@ -48,6 +50,7 @@ class ListModel : public QAbstractListModel {
 
     void searchRequestFinished();
     void searchRequestFailed(QString reason);
+    void searchRequestForOneSucceeded(QJsonDocument&);
 
    private:
     void requestLogo(QString file, QString url);
@@ -63,7 +66,7 @@ class ListModel : public QAbstractListModel {
     int currentSort = 0;
     int nextSearchOffset = 0;
     enum SearchState { None, CanPossiblyFetchMore, ResetRequested, Finished } searchState = None;
-    NetJob::Ptr jobPtr;
+    Task::Ptr jobPtr;
     std::shared_ptr<QByteArray> response = std::make_shared<QByteArray>();
 };
 
diff --git a/launcher/ui/pages/modplatform/flame/FlamePage.cpp b/launcher/ui/pages/modplatform/flame/FlamePage.cpp
index 183e16f9..79fcc821 100644
--- a/launcher/ui/pages/modplatform/flame/FlamePage.cpp
+++ b/launcher/ui/pages/modplatform/flame/FlamePage.cpp
@@ -61,6 +61,11 @@ FlamePage::FlamePage(NewInstanceDialog* dialog, QWidget* parent) : QWidget(paren
     ui->versionSelectionBox->view()->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
     ui->versionSelectionBox->view()->parentWidget()->setMaximumHeight(300);
 
+    m_search_timer.setTimerType(Qt::TimerType::CoarseTimer);
+    m_search_timer.setSingleShot(true);
+
+    connect(&m_search_timer, &QTimer::timeout, this, &FlamePage::triggerSearch);
+
     // index is used to set the sorting with the curseforge api
     ui->sortByBox->addItem(tr("Sort by Featured"));
     ui->sortByBox->addItem(tr("Sort by Popularity"));
@@ -90,6 +95,11 @@ bool FlamePage::eventFilter(QObject* watched, QEvent* event)
             triggerSearch();
             keyEvent->accept();
             return true;
+        } else {
+            if (m_search_timer.isActive())
+                m_search_timer.stop();
+
+            m_search_timer.start(350);
         }
     }
     return QWidget::eventFilter(watched, event);
diff --git a/launcher/ui/pages/modplatform/flame/FlamePage.h b/launcher/ui/pages/modplatform/flame/FlamePage.h
index ff5c7975..a45c9e40 100644
--- a/launcher/ui/pages/modplatform/flame/FlamePage.h
+++ b/launcher/ui/pages/modplatform/flame/FlamePage.h
@@ -39,7 +39,7 @@
 
 #include <Application.h>
 #include <modplatform/flame/FlamePackIndex.h>
-#include "tasks/Task.h"
+#include <QTimer>
 #include "ui/pages/BasePage.h"
 
 namespace Ui {
@@ -86,4 +86,7 @@ class FlamePage : public QWidget, public BasePage {
     Flame::IndexedPack current;
 
     int m_selected_version_index = -1;
+
+    // Used to do instant searching with a delay to cache quick changes
+    QTimer m_search_timer;
 };
diff --git a/launcher/ui/pages/modplatform/import_ftb/ImportFTBPage.cpp b/launcher/ui/pages/modplatform/import_ftb/ImportFTBPage.cpp
index 5c9ff63b..d3ead083 100644
--- a/launcher/ui/pages/modplatform/import_ftb/ImportFTBPage.cpp
+++ b/launcher/ui/pages/modplatform/import_ftb/ImportFTBPage.cpp
@@ -17,6 +17,7 @@
  */
 
 #include "ImportFTBPage.h"
+#include "ui/widgets/ProjectItem.h"
 #include "ui_ImportFTBPage.h"
 
 #include <QWidget>
@@ -32,17 +33,30 @@ ImportFTBPage::ImportFTBPage(NewInstanceDialog* dialog, QWidget* parent) : QWidg
     ui->setupUi(this);
 
     {
+        currentModel = new FilterModel(this);
         listModel = new ListModel(this);
+        currentModel->setSourceModel(listModel);
 
-        ui->modpackList->setModel(listModel);
+        ui->modpackList->setModel(currentModel);
         ui->modpackList->setSortingEnabled(true);
         ui->modpackList->header()->hide();
         ui->modpackList->setIndentation(0);
         ui->modpackList->setIconSize(QSize(42, 42));
+
+        for (int i = 0; i < currentModel->getAvailableSortings().size(); i++) {
+            ui->sortByBox->addItem(currentModel->getAvailableSortings().keys().at(i));
+        }
+
+        ui->sortByBox->setCurrentText(currentModel->translateCurrentSorting());
     }
 
     connect(ui->modpackList->selectionModel(), &QItemSelectionModel::currentChanged, this, &ImportFTBPage::onPublicPackSelectionChanged);
 
+    connect(ui->sortByBox, &QComboBox::currentTextChanged, this, &ImportFTBPage::onSortingSelectionChanged);
+
+    connect(ui->searchEdit, &QLineEdit::textChanged, this, &ImportFTBPage::triggerSearch);
+
+    ui->modpackList->setItemDelegate(new ProjectItemDelegate(this));
     ui->modpackList->selectionModel()->reset();
 }
 
@@ -86,7 +100,7 @@ void ImportFTBPage::onPublicPackSelectionChanged(QModelIndex now, QModelIndex pr
         onPackSelectionChanged();
         return;
     }
-    Modpack selectedPack = listModel->data(now, Qt::UserRole).value<Modpack>();
+    Modpack selectedPack = currentModel->data(now, Qt::UserRole).value<Modpack>();
     onPackSelectionChanged(&selectedPack);
 }
 
@@ -101,4 +115,15 @@ void ImportFTBPage::onPackSelectionChanged(Modpack* pack)
         dialog->setSuggestedPack();
 }
 
+void ImportFTBPage::onSortingSelectionChanged(QString sort)
+{
+    FilterModel::Sorting toSet = currentModel->getAvailableSortings().value(sort);
+    currentModel->setSorting(toSet);
+}
+
+void ImportFTBPage::triggerSearch()
+{
+    currentModel->setSearchTerm(ui->searchEdit->text());
+}
+
 }  // namespace FTBImportAPP
diff --git a/launcher/ui/pages/modplatform/import_ftb/ImportFTBPage.h b/launcher/ui/pages/modplatform/import_ftb/ImportFTBPage.h
index 54c49f7b..8e966127 100644
--- a/launcher/ui/pages/modplatform/import_ftb/ImportFTBPage.h
+++ b/launcher/ui/pages/modplatform/import_ftb/ImportFTBPage.h
@@ -53,12 +53,15 @@ class ImportFTBPage : public QWidget, public BasePage {
     void suggestCurrent();
     void onPackSelectionChanged(Modpack* pack = nullptr);
    private slots:
+    void onSortingSelectionChanged(QString data);
     void onPublicPackSelectionChanged(QModelIndex first, QModelIndex second);
+    void triggerSearch();
 
    private:
     bool initialized = false;
     Modpack selected;
     ListModel* listModel = nullptr;
+    FilterModel* currentModel = nullptr;
 
     NewInstanceDialog* dialog = nullptr;
     Ui::ImportFTBPage* ui = nullptr;
diff --git a/launcher/ui/pages/modplatform/import_ftb/ImportFTBPage.ui b/launcher/ui/pages/modplatform/import_ftb/ImportFTBPage.ui
index 32d548b0..5e09fb6d 100644
--- a/launcher/ui/pages/modplatform/import_ftb/ImportFTBPage.ui
+++ b/launcher/ui/pages/modplatform/import_ftb/ImportFTBPage.ui
@@ -10,8 +10,8 @@
     <height>1011</height>
    </rect>
   </property>
-  <layout class="QHBoxLayout" name="horizontalLayout">
-   <item>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="1" column="1">
     <widget class="QTreeView" name="modpackList">
      <property name="maximumSize">
       <size>
@@ -21,6 +21,54 @@
      </property>
     </widget>
    </item>
+   <item row="0" column="1">
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QLineEdit" name="searchEdit">
+       <property name="placeholderText">
+        <string>Search and filter...</string>
+       </property>
+       <property name="clearButtonEnabled">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton">
+       <property name="text">
+        <string>Search</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="2" column="1">
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item>
+      <widget class="QComboBox" name="sortByBox">
+       <property name="minimumSize">
+        <size>
+         <width>265</width>
+         <height>0</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
   </layout>
  </widget>
  <resources/>
diff --git a/launcher/ui/pages/modplatform/import_ftb/ListModel.cpp b/launcher/ui/pages/modplatform/import_ftb/ListModel.cpp
index dc78f451..134bdc0c 100644
--- a/launcher/ui/pages/modplatform/import_ftb/ListModel.cpp
+++ b/launcher/ui/pages/modplatform/import_ftb/ListModel.cpp
@@ -23,7 +23,9 @@
 #include <QIcon>
 #include <QProcessEnvironment>
 #include "FileSystem.h"
+#include "StringUtils.h"
 #include "modplatform/import_ftb/PackHelpers.h"
+#include "ui/widgets/ProjectItem.h"
 
 namespace FTBImportAPP {
 
@@ -71,18 +73,99 @@ QVariant ListModel::data(const QModelIndex& index, int role) const
     }
 
     auto pack = modpacks.at(pos);
-    if (role == Qt::DisplayRole) {
-        return pack.name;
-    } else if (role == Qt::DecorationRole) {
-        return pack.icon;
-    } else if (role == Qt::UserRole) {
-        QVariant v;
-        v.setValue(pack);
-        return v;
-    } else if (role == Qt::ToolTipRole) {
-        return tr("Minecraft %1").arg(pack.mcVersion);
+    if (role == Qt::ToolTipRole) {
     }
 
-    return QVariant();
+    switch (role) {
+        case Qt::ToolTipRole:
+            return tr("Minecraft %1").arg(pack.mcVersion);
+        case Qt::DecorationRole:
+            return pack.icon;
+        case Qt::UserRole: {
+            QVariant v;
+            v.setValue(pack);
+            return v;
+        }
+        case Qt::DisplayRole:
+            return pack.name;
+        case Qt::SizeHintRole:
+            return QSize(0, 58);
+        // Custom data
+        case UserDataTypes::TITLE:
+            return pack.name;
+        case UserDataTypes::DESCRIPTION:
+            return tr("Minecraft %1").arg(pack.mcVersion);
+        case UserDataTypes::SELECTED:
+            return false;
+        case UserDataTypes::INSTALLED:
+            return false;
+        default:
+            break;
+    }
+
+    return {};
+}
+
+FilterModel::FilterModel(QObject* parent) : QSortFilterProxyModel(parent)
+{
+    currentSorting = Sorting::ByGameVersion;
+    sortings.insert(tr("Sort by Name"), Sorting::ByName);
+    sortings.insert(tr("Sort by Game Version"), Sorting::ByGameVersion);
+}
+
+bool FilterModel::lessThan(const QModelIndex& left, const QModelIndex& right) const
+{
+    Modpack leftPack = sourceModel()->data(left, Qt::UserRole).value<Modpack>();
+    Modpack rightPack = sourceModel()->data(right, Qt::UserRole).value<Modpack>();
+
+    if (currentSorting == Sorting::ByGameVersion) {
+        Version lv(leftPack.mcVersion);
+        Version rv(rightPack.mcVersion);
+        return lv < rv;
+
+    } else if (currentSorting == Sorting::ByName) {
+        return StringUtils::naturalCompare(leftPack.name, rightPack.name, Qt::CaseSensitive) >= 0;
+    }
+
+    // UHM, some inavlid value set?!
+    qWarning() << "Invalid sorting set!";
+    return true;
+}
+
+bool FilterModel::filterAcceptsRow([[maybe_unused]] int sourceRow, [[maybe_unused]] const QModelIndex& sourceParent) const
+{
+    if (searchTerm.isEmpty()) {
+        return true;
+    }
+    QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
+    Modpack pack = sourceModel()->data(index, Qt::UserRole).value<Modpack>();
+    return pack.name.contains(searchTerm, Qt::CaseInsensitive);
+}
+
+void FilterModel::setSearchTerm(const QString term)
+{
+    searchTerm = term.trimmed();
+    invalidate();
+}
+
+const QMap<QString, FilterModel::Sorting> FilterModel::getAvailableSortings()
+{
+    return sortings;
+}
+
+QString FilterModel::translateCurrentSorting()
+{
+    return sortings.key(currentSorting);
+}
+
+void FilterModel::setSorting(Sorting s)
+{
+    currentSorting = s;
+    invalidate();
+}
+
+FilterModel::Sorting FilterModel::getCurrentSorting()
+{
+    return currentSorting;
 }
 }  // namespace FTBImportAPP
\ No newline at end of file
diff --git a/launcher/ui/pages/modplatform/import_ftb/ListModel.h b/launcher/ui/pages/modplatform/import_ftb/ListModel.h
index c67aa896..11192827 100644
--- a/launcher/ui/pages/modplatform/import_ftb/ListModel.h
+++ b/launcher/ui/pages/modplatform/import_ftb/ListModel.h
@@ -20,11 +20,33 @@
 
 #include <QAbstractListModel>
 #include <QIcon>
+#include <QSortFilterProxyModel>
 #include <QVariant>
 #include "modplatform/import_ftb/PackHelpers.h"
 
 namespace FTBImportAPP {
 
+class FilterModel : public QSortFilterProxyModel {
+    Q_OBJECT
+   public:
+    FilterModel(QObject* parent = Q_NULLPTR);
+    enum Sorting { ByName, ByGameVersion };
+    const QMap<QString, Sorting> getAvailableSortings();
+    QString translateCurrentSorting();
+    void setSorting(Sorting sorting);
+    Sorting getCurrentSorting();
+    void setSearchTerm(QString term);
+
+   protected:
+    bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const override;
+    bool lessThan(const QModelIndex& left, const QModelIndex& right) const override;
+
+   private:
+    QMap<QString, Sorting> sortings;
+    Sorting currentSorting;
+    QString searchTerm;
+};
+
 class ListModel : public QAbstractListModel {
     Q_OBJECT
 
diff --git a/launcher/ui/pages/modplatform/legacy_ftb/ListModel.cpp b/launcher/ui/pages/modplatform/legacy_ftb/ListModel.cpp
index 356d919d..49666cf6 100644
--- a/launcher/ui/pages/modplatform/legacy_ftb/ListModel.cpp
+++ b/launcher/ui/pages/modplatform/legacy_ftb/ListModel.cpp
@@ -41,6 +41,7 @@
 
 #include <Version.h>
 #include "StringUtils.h"
+#include "ui/widgets/ProjectItem.h"
 
 #include <QLabel>
 #include <QtMath>
@@ -79,7 +80,20 @@ bool FilterModel::lessThan(const QModelIndex& left, const QModelIndex& right) co
 
 bool FilterModel::filterAcceptsRow([[maybe_unused]] int sourceRow, [[maybe_unused]] const QModelIndex& sourceParent) const
 {
-    return true;
+    if (searchTerm.isEmpty()) {
+        return true;
+    }
+    QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
+    Modpack pack = sourceModel()->data(index, Qt::UserRole).value<Modpack>();
+    if (searchTerm.startsWith("#"))
+        return pack.packCode == searchTerm.mid(1);
+    return pack.name.contains(searchTerm, Qt::CaseInsensitive);
+}
+
+void FilterModel::setSearchTerm(const QString term)
+{
+    searchTerm = term.trimmed();
+    invalidate();
 }
 
 const QMap<QString, FilterModel::Sorting> FilterModel::getAvailableSortings()
@@ -139,39 +153,57 @@ QVariant ListModel::data(const QModelIndex& index, int role) const
     }
 
     Modpack pack = modpacks.at(pos);
-    if (role == Qt::DisplayRole) {
-        return pack.name + "\n" + translatePackType(pack.type);
-    } else if (role == Qt::ToolTipRole) {
-        if (pack.description.length() > 100) {
-            // some magic to prevent to long tooltips and replace html linebreaks
-            QString edit = pack.description.left(97);
-            edit = edit.left(edit.lastIndexOf("<br>")).left(edit.lastIndexOf(" ")).append("...");
-            return edit;
+    switch (role) {
+        case Qt::ToolTipRole: {
+            if (pack.description.length() > 100) {
+                // some magic to prevent to long tooltips and replace html linebreaks
+                QString edit = pack.description.left(97);
+                edit = edit.left(edit.lastIndexOf("<br>")).left(edit.lastIndexOf(" ")).append("...");
+                return edit;
+            }
+            return pack.description;
+        }
+        case Qt::DecorationRole: {
+            if (m_logoMap.contains(pack.logo)) {
+                return (m_logoMap.value(pack.logo));
+            }
+            QIcon icon = APPLICATION->getThemedIcon("screenshot-placeholder");
+            ((ListModel*)this)->requestLogo(pack.logo);
+            return icon;
         }
-        return pack.description;
-    } else if (role == Qt::DecorationRole) {
-        if (m_logoMap.contains(pack.logo)) {
-            return (m_logoMap.value(pack.logo));
+        case Qt::UserRole: {
+            QVariant v;
+            v.setValue(pack);
+            return v;
         }
-        QIcon icon = APPLICATION->getThemedIcon("screenshot-placeholder");
-        ((ListModel*)this)->requestLogo(pack.logo);
-        return icon;
-    } else if (role == Qt::ForegroundRole) {
-        if (pack.broken) {
-            // FIXME: Hardcoded color
-            return QColor(255, 0, 50);
-        } else if (pack.bugged) {
-            // FIXME: Hardcoded color
-            // bugged pack, currently only indicates bugged xml
-            return QColor(244, 229, 66);
+        case Qt::ForegroundRole: {
+            if (pack.broken) {
+                // FIXME: Hardcoded color
+                return QColor(255, 0, 50);
+            } else if (pack.bugged) {
+                // FIXME: Hardcoded color
+                // bugged pack, currently only indicates bugged xml
+                return QColor(244, 229, 66);
+            }
         }
-    } else if (role == Qt::UserRole) {
-        QVariant v;
-        v.setValue(pack);
-        return v;
+        case Qt::DisplayRole:
+            return pack.name;
+        case Qt::SizeHintRole:
+            return QSize(0, 58);
+        // Custom data
+        case UserDataTypes::TITLE:
+            return pack.name;
+        case UserDataTypes::DESCRIPTION:
+            return pack.description;
+        case UserDataTypes::SELECTED:
+            return false;
+        case UserDataTypes::INSTALLED:
+            return false;
+        default:
+            break;
     }
 
-    return QVariant();
+    return {};
 }
 
 void ListModel::fill(ModpackList modpacks_)
diff --git a/launcher/ui/pages/modplatform/legacy_ftb/ListModel.h b/launcher/ui/pages/modplatform/legacy_ftb/ListModel.h
index 51a58d99..c802a4b5 100644
--- a/launcher/ui/pages/modplatform/legacy_ftb/ListModel.h
+++ b/launcher/ui/pages/modplatform/legacy_ftb/ListModel.h
@@ -25,6 +25,7 @@ class FilterModel : public QSortFilterProxyModel {
     QString translateCurrentSorting();
     void setSorting(Sorting sorting);
     Sorting getCurrentSorting();
+    void setSearchTerm(QString term);
 
    protected:
     bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const override;
@@ -33,6 +34,7 @@ class FilterModel : public QSortFilterProxyModel {
    private:
     QMap<QString, Sorting> sortings;
     Sorting currentSorting;
+    QString searchTerm;
 };
 
 class ListModel : public QAbstractListModel {
diff --git a/launcher/ui/pages/modplatform/legacy_ftb/Page.cpp b/launcher/ui/pages/modplatform/legacy_ftb/Page.cpp
index 0103bbaa..4104f139 100644
--- a/launcher/ui/pages/modplatform/legacy_ftb/Page.cpp
+++ b/launcher/ui/pages/modplatform/legacy_ftb/Page.cpp
@@ -35,6 +35,7 @@
  */
 
 #include "Page.h"
+#include "ui/widgets/ProjectItem.h"
 #include "ui_Page.h"
 
 #include <QInputDialog>
@@ -110,6 +111,8 @@ Page::Page(NewInstanceDialog* dialog, QWidget* parent) : QWidget(parent), dialog
     connect(ui->sortByBox, &QComboBox::currentTextChanged, this, &Page::onSortingSelectionChanged);
     connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &Page::onVersionSelectionItemChanged);
 
+    connect(ui->searchEdit, &QLineEdit::textChanged, this, &Page::triggerSearch);
+
     connect(ui->publicPackList->selectionModel(), &QItemSelectionModel::currentChanged, this, &Page::onPublicPackSelectionChanged);
     connect(ui->thirdPartyPackList->selectionModel(), &QItemSelectionModel::currentChanged, this, &Page::onThirdPartyPackSelectionChanged);
     connect(ui->privatePackList->selectionModel(), &QItemSelectionModel::currentChanged, this, &Page::onPrivatePackSelectionChanged);
@@ -125,6 +128,9 @@ Page::Page(NewInstanceDialog* dialog, QWidget* parent) : QWidget(parent), dialog
     ui->thirdPartyPackList->selectionModel()->reset();
     ui->privatePackList->selectionModel()->reset();
 
+    ui->publicPackList->setItemDelegate(new ProjectItemDelegate(this));
+    ui->thirdPartyPackList->setItemDelegate(new ProjectItemDelegate(this));
+    ui->privatePackList->setItemDelegate(new ProjectItemDelegate(this));
     onTabChanged(ui->tabWidget->currentIndex());
 }
 
@@ -319,6 +325,8 @@ void Page::onTabChanged(int tab)
         currentModpackInfo = ui->publicPackDescription;
     }
 
+    triggerSearch();
+
     currentList->selectionModel()->reset();
     QModelIndex idx = currentList->currentIndex();
     if (idx.isValid()) {
@@ -358,4 +366,9 @@ void Page::onRemovePackClicked()
     onPackSelectionChanged();
 }
 
+void Page::triggerSearch()
+{
+    currentModel->setSearchTerm(ui->searchEdit->text());
+}
+
 }  // namespace LegacyFTB
diff --git a/launcher/ui/pages/modplatform/legacy_ftb/Page.h b/launcher/ui/pages/modplatform/legacy_ftb/Page.h
index a12b0745..4d317b7c 100644
--- a/launcher/ui/pages/modplatform/legacy_ftb/Page.h
+++ b/launcher/ui/pages/modplatform/legacy_ftb/Page.h
@@ -43,7 +43,6 @@
 #include "QObjectPtr.h"
 #include "modplatform/legacy_ftb/PackFetchTask.h"
 #include "modplatform/legacy_ftb/PackHelpers.h"
-#include "tasks/Task.h"
 #include "ui/pages/BasePage.h"
 
 class NewInstanceDialog;
@@ -56,8 +55,6 @@ class Page;
 
 class ListModel;
 class FilterModel;
-class PrivatePackListModel;
-class PrivatePackFilterModel;
 class PrivatePackManager;
 
 class Page : public QWidget, public BasePage {
@@ -98,6 +95,8 @@ class Page : public QWidget, public BasePage {
     void onAddPackClicked();
     void onRemovePackClicked();
 
+    void triggerSearch();
+
    private:
     FilterModel* currentModel = nullptr;
     QTreeView* currentList = nullptr;
diff --git a/launcher/ui/pages/modplatform/legacy_ftb/Page.ui b/launcher/ui/pages/modplatform/legacy_ftb/Page.ui
index ad08dc25..56cba748 100644
--- a/launcher/ui/pages/modplatform/legacy_ftb/Page.ui
+++ b/launcher/ui/pages/modplatform/legacy_ftb/Page.ui
@@ -10,8 +10,29 @@
     <height>602</height>
    </rect>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
+  <layout class="QGridLayout" name="gridLayout_5">
+   <item row="0" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QLineEdit" name="searchEdit">
+       <property name="placeholderText">
+        <string>Search and filter...</string>
+       </property>
+       <property name="clearButtonEnabled">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton">
+       <property name="text">
+        <string>Search</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="4" column="0">
     <widget class="QTabWidget" name="tabWidget">
      <property name="currentIndex">
       <number>0</number>
@@ -36,9 +57,9 @@
        </item>
        <item row="0" column="1">
         <widget class="QTextBrowser" name="publicPackDescription">
-           <property name="openExternalLinks">
-            <bool>true</bool>
-           </property>
+         <property name="openExternalLinks">
+          <bool>true</bool>
+         </property>
         </widget>
        </item>
       </layout>
@@ -50,10 +71,10 @@
       <layout class="QGridLayout" name="gridLayout_3">
        <item row="0" column="1">
         <widget class="QTextBrowser" name="thirdPartyPackDescription">
-               <property name="openExternalLinks">
-            <bool>true</bool>
-           </property>
-          </widget>
+         <property name="openExternalLinks">
+          <bool>true</bool>
+         </property>
+        </widget>
        </item>
        <item row="0" column="0">
         <widget class="QTreeView" name="thirdPartyPackList">
@@ -104,16 +125,16 @@
        </item>
        <item row="0" column="1" rowspan="3">
         <widget class="QTextBrowser" name="privatePackDescription">
-           <property name="openExternalLinks">
-            <bool>true</bool>
-           </property>
-          </widget>
+         <property name="openExternalLinks">
+          <bool>true</bool>
+         </property>
+        </widget>
        </item>
       </layout>
      </widget>
     </widget>
    </item>
-   <item>
+   <item row="5" column="0">
     <layout class="QGridLayout" name="gridLayout_4">
      <item row="0" column="1">
       <widget class="QLabel" name="label">
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
index ebc5556c..16949eba 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
@@ -38,8 +38,8 @@
 
 #include "BuildConfig.h"
 #include "Json.h"
-#include "minecraft/MinecraftInstance.h"
-#include "minecraft/PackProfile.h"
+#include "modplatform/modrinth/ModrinthAPI.h"
+#include "net/NetJob.h"
 #include "ui/widgets/ProjectItem.h"
 
 #include "net/ApiDownload.h"
@@ -130,7 +130,28 @@ bool ModpackListModel::setData(const QModelIndex& index, const QVariant& value,
 
 void ModpackListModel::performPaginatedSearch()
 {
-    // TODO: Move to standalone API
+    if (hasActiveSearchJob())
+        return;
+
+    if (currentSearchTerm.startsWith("#")) {
+        auto projectId = currentSearchTerm.removeFirst();
+        if (!projectId.isEmpty()) {
+            ResourceAPI::ProjectInfoCallbacks callbacks;
+
+            // Use defaults if no callbacks are set
+            if (!callbacks.on_fail)
+                callbacks.on_fail = [this](QString reason) { searchRequestFailed(reason); };
+
+            if (!callbacks.on_succeed)
+                callbacks.on_succeed = [this](auto& doc, auto pack) { searchRequestForOneSucceeded(doc); };
+            static const ModrinthAPI api;
+            if (auto job = api.getProjectInfo({ projectId }, std::move(callbacks)); job) {
+                jobPtr = job;
+                jobPtr->start();
+            }
+            return;
+        }
+    }  // TODO: Move to standalone API
     auto netJob = makeShared<NetJob>("Modrinth::SearchModpack", APPLICATION->network());
     auto searchAllUrl = QString(BuildConfig.MODRINTH_PROD_URL +
                                 "/search?"
@@ -167,16 +188,17 @@ void ModpackListModel::performPaginatedSearch()
 
 void ModpackListModel::refresh()
 {
-    if (jobPtr) {
+    if (hasActiveSearchJob()) {
         jobPtr->abort();
         searchState = ResetRequested;
         return;
-    } else {
-        beginResetModel();
-        modpacks.clear();
-        endResetModel();
-        searchState = None;
     }
+
+    beginResetModel();
+    modpacks.clear();
+    endResetModel();
+    searchState = None;
+
     nextSearchOffset = 0;
     performPaginatedSearch();
 }
@@ -307,9 +329,29 @@ void ModpackListModel::searchRequestFinished(QJsonDocument& doc_all)
     endInsertRows();
 }
 
+void ModpackListModel::searchRequestForOneSucceeded(QJsonDocument& doc)
+{
+    jobPtr.reset();
+
+    auto packObj = doc.object();
+
+    Modrinth::Modpack pack;
+    try {
+        Modrinth::loadIndexedPack(pack, packObj);
+        pack.id = Json::ensureString(packObj, "id", pack.id);
+    } catch (const JSONValidationError& e) {
+        qWarning() << "Error while loading mod from " << m_parent->debugName() << ": " << e.cause();
+        return;
+    }
+
+    beginInsertRows(QModelIndex(), modpacks.size(), modpacks.size() + 1);
+    modpacks.append({ pack });
+    endInsertRows();
+}
+
 void ModpackListModel::searchRequestFailed(QString reason)
 {
-    auto failed_action = jobPtr->getFailedActions().at(0);
+    auto failed_action = dynamic_cast<NetJob*>(jobPtr.get())->getFailedActions().at(0);
     if (!failed_action->m_reply) {
         // Network error
         QMessageBox::critical(nullptr, tr("Error"), tr("A network error occurred. Could not load modpacks."));
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.h b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.h
index 721c69f5..f5e686a8 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.h
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.h
@@ -73,6 +73,8 @@ class ModpackListModel : public QAbstractListModel {
     void refresh();
     void searchWithTerm(const QString& term, const int sort);
 
+    [[nodiscard]] bool hasActiveSearchJob() const { return jobPtr && jobPtr->isRunning(); }
+
     void getLogo(const QString& logo, const QString& logoUrl, LogoCallback callback);
 
     inline auto canFetchMore(const QModelIndex& parent) const -> bool override
@@ -83,6 +85,7 @@ class ModpackListModel : public QAbstractListModel {
    public slots:
     void searchRequestFinished(QJsonDocument& doc_all);
     void searchRequestFailed(QString reason);
+    void searchRequestForOneSucceeded(QJsonDocument&);
 
    protected slots:
 
@@ -111,7 +114,7 @@ class ModpackListModel : public QAbstractListModel {
     int nextSearchOffset = 0;
     enum SearchState { None, CanPossiblyFetchMore, ResetRequested, Finished } searchState = None;
 
-    NetJob::Ptr jobPtr;
+    Task::Ptr jobPtr;
 
     std::shared_ptr<QByteArray> m_all_response = std::make_shared<QByteArray>();
     QByteArray m_specific_response;
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp
index 41fd5003..72c9da35 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp
@@ -64,6 +64,11 @@ ModrinthPage::ModrinthPage(NewInstanceDialog* dialog, QWidget* parent) : QWidget
     ui->versionSelectionBox->view()->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
     ui->versionSelectionBox->view()->parentWidget()->setMaximumHeight(300);
 
+    m_search_timer.setTimerType(Qt::TimerType::CoarseTimer);
+    m_search_timer.setSingleShot(true);
+
+    connect(&m_search_timer, &QTimer::timeout, this, &ModrinthPage::triggerSearch);
+
     ui->sortByBox->addItem(tr("Sort by Relevance"));
     ui->sortByBox->addItem(tr("Sort by Total Downloads"));
     ui->sortByBox->addItem(tr("Sort by Follows"));
@@ -102,6 +107,11 @@ bool ModrinthPage::eventFilter(QObject* watched, QEvent* event)
             this->triggerSearch();
             keyEvent->accept();
             return true;
+        } else {
+            if (m_search_timer.isActive())
+                m_search_timer.stop();
+
+            m_search_timer.start(350);
         }
     }
     return QObject::eventFilter(watched, event);
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.h b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.h
index b7054c88..0705ca99 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.h
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.h
@@ -42,6 +42,7 @@
 
 #include "modplatform/modrinth/ModrinthPackManifest.h"
 
+#include <QTimer>
 #include <QWidget>
 
 namespace Ui {
@@ -88,4 +89,7 @@ class ModrinthPage : public QWidget, public BasePage {
 
     Modrinth::Modpack current;
     QString selectedVersion;
+
+    // Used to do instant searching with a delay to cache quick changes
+    QTimer m_search_timer;
 };
diff --git a/launcher/ui/pages/modplatform/technic/TechnicModel.cpp b/launcher/ui/pages/modplatform/technic/TechnicModel.cpp
index e8c5ac92..3cd1d9a2 100644
--- a/launcher/ui/pages/modplatform/technic/TechnicModel.cpp
+++ b/launcher/ui/pages/modplatform/technic/TechnicModel.cpp
@@ -39,6 +39,7 @@
 #include "Json.h"
 
 #include "net/ApiDownload.h"
+#include "ui/widgets/ProjectItem.h"
 
 #include <QIcon>
 
@@ -54,21 +55,47 @@ QVariant Technic::ListModel::data(const QModelIndex& index, int role) const
     }
 
     Modpack pack = modpacks.at(pos);
-    if (role == Qt::DisplayRole) {
-        return pack.name;
-    } else if (role == Qt::DecorationRole) {
-        if (m_logoMap.contains(pack.logoName)) {
-            return (m_logoMap.value(pack.logoName));
+    switch (role) {
+        case Qt::ToolTipRole: {
+            if (pack.description.length() > 100) {
+                // some magic to prevent to long tooltips and replace html linebreaks
+                QString edit = pack.description.left(97);
+                edit = edit.left(edit.lastIndexOf("<br>")).left(edit.lastIndexOf(" ")).append("...");
+                return edit;
+            }
+            return pack.description;
+        }
+        case Qt::DecorationRole: {
+            if (m_logoMap.contains(pack.logoName)) {
+                return (m_logoMap.value(pack.logoName));
+            }
+            QIcon icon = APPLICATION->getThemedIcon("screenshot-placeholder");
+            ((ListModel*)this)->requestLogo(pack.logoName, pack.logoUrl);
+            return icon;
+        }
+        case Qt::UserRole: {
+            QVariant v;
+            v.setValue(pack);
+            return v;
         }
-        QIcon icon = APPLICATION->getThemedIcon("screenshot-placeholder");
-        ((ListModel*)this)->requestLogo(pack.logoName, pack.logoUrl);
-        return icon;
-    } else if (role == Qt::UserRole) {
-        QVariant v;
-        v.setValue(pack);
-        return v;
+        case Qt::DisplayRole:
+            return pack.name;
+        case Qt::SizeHintRole:
+            return QSize(0, 58);
+        // Custom data
+        case UserDataTypes::TITLE:
+            return pack.name;
+        case UserDataTypes::DESCRIPTION:
+            return pack.description;
+        case UserDataTypes::SELECTED:
+            return false;
+        case UserDataTypes::INSTALLED:
+            return false;
+        default:
+            break;
     }
-    return QVariant();
+
+    return {};
 }
 
 int Technic::ListModel::columnCount(const QModelIndex& parent) const
@@ -87,21 +114,25 @@ void Technic::ListModel::searchWithTerm(const QString& term)
         return;
     }
     currentSearchTerm = term;
-    if (jobPtr) {
+    if (hasActiveSearchJob()) {
         jobPtr->abort();
         searchState = ResetRequested;
         return;
-    } else {
-        beginResetModel();
-        modpacks.clear();
-        endResetModel();
-        searchState = None;
     }
+
+    beginResetModel();
+    modpacks.clear();
+    endResetModel();
+    searchState = None;
+
     performSearch();
 }
 
 void Technic::ListModel::performSearch()
 {
+    if (hasActiveSearchJob())
+        return;
+
     auto netJob = makeShared<NetJob>("Technic::Search", APPLICATION->network());
     QString searchUrl = "";
     if (currentSearchTerm.isEmpty()) {
@@ -113,6 +144,9 @@ void Technic::ListModel::performSearch()
     } else if (currentSearchTerm.startsWith("https://api.technicpack.net/modpack/")) {
         searchUrl = QString("%1?build=%2").arg(currentSearchTerm, BuildConfig.TECHNIC_API_BUILD);
         searchMode = Single;
+    } else if (currentSearchTerm.startsWith("#")) {
+        searchUrl = QString("https://api.technicpack.net/modpack/%1?build=%2").arg(currentSearchTerm.mid(1), BuildConfig.TECHNIC_API_BUILD);
+        searchMode = Single;
     } else {
         searchUrl =
             QString("%1search?build=%2&q=%3").arg(BuildConfig.TECHNIC_API_BASE_URL, BuildConfig.TECHNIC_API_BUILD, currentSearchTerm);
diff --git a/launcher/ui/pages/modplatform/technic/TechnicModel.h b/launcher/ui/pages/modplatform/technic/TechnicModel.h
index d7a635d4..c0d13ae8 100644
--- a/launcher/ui/pages/modplatform/technic/TechnicModel.h
+++ b/launcher/ui/pages/modplatform/technic/TechnicModel.h
@@ -58,6 +58,8 @@ class ListModel : public QAbstractListModel {
     void getLogo(const QString& logo, const QString& logoUrl, LogoCallback callback);
     void searchWithTerm(const QString& term);
 
+    [[nodiscard]] bool hasActiveSearchJob() const { return jobPtr && jobPtr->isRunning(); }
+
    private slots:
     void searchRequestFinished();
     void searchRequestFailed();
diff --git a/launcher/ui/pages/modplatform/technic/TechnicPage.cpp b/launcher/ui/pages/modplatform/technic/TechnicPage.cpp
index 54b86feb..518d049e 100644
--- a/launcher/ui/pages/modplatform/technic/TechnicPage.cpp
+++ b/launcher/ui/pages/modplatform/technic/TechnicPage.cpp
@@ -34,6 +34,7 @@
  */
 
 #include "TechnicPage.h"
+#include "ui/widgets/ProjectItem.h"
 #include "ui_TechnicPage.h"
 
 #include <QKeyEvent>
@@ -59,8 +60,15 @@ TechnicPage::TechnicPage(NewInstanceDialog* dialog, QWidget* parent) : QWidget(p
     model = new Technic::ListModel(this);
     ui->packView->setModel(model);
 
+    m_search_timer.setTimerType(Qt::TimerType::CoarseTimer);
+    m_search_timer.setSingleShot(true);
+
+    connect(&m_search_timer, &QTimer::timeout, this, &TechnicPage::triggerSearch);
+
     connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &TechnicPage::onSelectionChanged);
     connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &TechnicPage::onVersionSelectionChanged);
+
+    ui->packView->setItemDelegate(new ProjectItemDelegate(this));
 }
 
 bool TechnicPage::eventFilter(QObject* watched, QEvent* event)
@@ -71,6 +79,11 @@ bool TechnicPage::eventFilter(QObject* watched, QEvent* event)
             triggerSearch();
             keyEvent->accept();
             return true;
+        } else {
+            if (m_search_timer.isActive())
+                m_search_timer.stop();
+
+            m_search_timer.start(350);
         }
     }
     return QWidget::eventFilter(watched, event);
diff --git a/launcher/ui/pages/modplatform/technic/TechnicPage.h b/launcher/ui/pages/modplatform/technic/TechnicPage.h
index 91b61eaf..1e36fbd3 100644
--- a/launcher/ui/pages/modplatform/technic/TechnicPage.h
+++ b/launcher/ui/pages/modplatform/technic/TechnicPage.h
@@ -35,12 +35,12 @@
 
 #pragma once
 
+#include <QTimer>
 #include <QWidget>
 
 #include <Application.h>
 #include "TechnicData.h"
 #include "net/NetJob.h"
-#include "tasks/Task.h"
 #include "ui/pages/BasePage.h"
 
 namespace Ui {
@@ -91,4 +91,7 @@ class TechnicPage : public QWidget, public BasePage {
 
     NetJob::Ptr jobPtr;
     std::shared_ptr<QByteArray> response = std::make_shared<QByteArray>();
+
+    // Used to do instant searching with a delay to cache quick changes
+    QTimer m_search_timer;
 };
diff --git a/launcher/ui/widgets/ProjectItem.cpp b/launcher/ui/widgets/ProjectItem.cpp
index 1481c1b6..60b92b28 100644
--- a/launcher/ui/widgets/ProjectItem.cpp
+++ b/launcher/ui/widgets/ProjectItem.cpp
@@ -34,8 +34,8 @@ void ProjectItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& o
             icon_width = icon_size.width();
             icon_height = icon_size.height();
 
-            icon_x_margin = (rect.height() - icon_width) / 2;
             icon_y_margin = (rect.height() - icon_height) / 2;
+            icon_x_margin = icon_y_margin;  // use same margins for consistency
         }
 
         // Centralize icon with a margin to separate from the other elements
-- 
cgit 


From 4c52b18bdd3112b5e92de61860fd8eff8ecdde9b Mon Sep 17 00:00:00 2001
From: Trial97 <alexandru.tripon97@gmail.com>
Date: Fri, 18 Aug 2023 20:19:51 +0300
Subject: replaced removeFirst with mid

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
---
 launcher/ui/pages/modplatform/ResourceModel.cpp          | 2 +-
 launcher/ui/pages/modplatform/flame/FlameModel.cpp       | 2 +-
 launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'launcher/ui/pages/modplatform/ResourceModel.cpp')

diff --git a/launcher/ui/pages/modplatform/ResourceModel.cpp b/launcher/ui/pages/modplatform/ResourceModel.cpp
index 96803531..74c1d217 100644
--- a/launcher/ui/pages/modplatform/ResourceModel.cpp
+++ b/launcher/ui/pages/modplatform/ResourceModel.cpp
@@ -133,7 +133,7 @@ void ResourceModel::search()
         return;
 
     if (m_search_term.startsWith("#")) {
-        auto projectId = m_search_term.removeFirst();
+        auto projectId = m_search_term.mid(1);
         if (!projectId.isEmpty()) {
             ResourceAPI::ProjectInfoCallbacks callbacks;
 
diff --git a/launcher/ui/pages/modplatform/flame/FlameModel.cpp b/launcher/ui/pages/modplatform/flame/FlameModel.cpp
index e488f078..e4388c24 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModel.cpp
+++ b/launcher/ui/pages/modplatform/flame/FlameModel.cpp
@@ -164,7 +164,7 @@ void ListModel::fetchMore(const QModelIndex& parent)
 void ListModel::performPaginatedSearch()
 {
     if (currentSearchTerm.startsWith("#")) {
-        auto projectId = currentSearchTerm.removeFirst();
+        auto projectId = currentSearchTerm.mid(1);
         if (!projectId.isEmpty()) {
             ResourceAPI::ProjectInfoCallbacks callbacks;
 
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
index 16949eba..36a1c47a 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
@@ -134,7 +134,7 @@ void ModpackListModel::performPaginatedSearch()
         return;
 
     if (currentSearchTerm.startsWith("#")) {
-        auto projectId = currentSearchTerm.removeFirst();
+        auto projectId = currentSearchTerm.mid(1);
         if (!projectId.isEmpty()) {
             ResourceAPI::ProjectInfoCallbacks callbacks;
 
-- 
cgit 


From 58efd3e9e27e09d55dac1d185f8de81cf2121f23 Mon Sep 17 00:00:00 2001
From: Trial97 <alexandru.tripon97@gmail.com>
Date: Fri, 18 Aug 2023 21:43:57 +0300
Subject: fixed code scaning

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
---
 launcher/modplatform/ResourceAPI.h              | 2 +-
 launcher/ui/pages/modplatform/ResourceModel.cpp | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

(limited to 'launcher/ui/pages/modplatform/ResourceModel.cpp')

diff --git a/launcher/modplatform/ResourceAPI.h b/launcher/modplatform/ResourceAPI.h
index bd0d2824..8af5ebd1 100644
--- a/launcher/modplatform/ResourceAPI.h
+++ b/launcher/modplatform/ResourceAPI.h
@@ -108,7 +108,7 @@ class ResourceAPI {
         void operator=(ProjectInfoArgs other) { pack = other.pack; }
     };
     struct ProjectInfoCallbacks {
-        std::function<void(QJsonDocument&, ModPlatform::IndexedPack)> on_succeed;
+        std::function<void(QJsonDocument&, const ModPlatform::IndexedPack&)> on_succeed;
         std::function<void(QString const& reason)> on_fail;
         std::function<void()> on_abort;
     };
diff --git a/launcher/ui/pages/modplatform/ResourceModel.cpp b/launcher/ui/pages/modplatform/ResourceModel.cpp
index 74c1d217..018721f9 100644
--- a/launcher/ui/pages/modplatform/ResourceModel.cpp
+++ b/launcher/ui/pages/modplatform/ResourceModel.cpp
@@ -152,7 +152,7 @@ void ResourceModel::search()
                 };
 
             if (!callbacks.on_succeed)
-                callbacks.on_succeed = [this](auto& doc, auto pack) {
+                callbacks.on_succeed = [this](auto& doc, auto& pack) {
                     if (!s_running_models.constFind(this).value())
                         return;
                     searchRequestForOneSucceeded(doc);
@@ -219,9 +219,10 @@ void ResourceModel::loadEntry(QModelIndex& entry)
 
         // Use default if no callbacks are set
         if (!callbacks.on_succeed)
-            callbacks.on_succeed = [this, entry](auto& doc, auto pack) {
+            callbacks.on_succeed = [this, entry](auto& doc, auto& newpack) {
                 if (!s_running_models.constFind(this).value())
                     return;
+                auto pack = newpack;
                 infoRequestSucceeded(doc, pack, entry);
             };
         if (!callbacks.on_fail)
-- 
cgit 


From 8c607ae7348206c29a8a8ce5e2db421138bd89ff Mon Sep 17 00:00:00 2001
From: Trial97 <alexandru.tripon97@gmail.com>
Date: Sun, 27 Aug 2023 20:02:12 +0300
Subject: removed extra if

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
---
 launcher/ui/pages/modplatform/ResourceModel.cpp    | 36 ++++++++++------------
 launcher/ui/pages/modplatform/flame/FlameModel.cpp |  8 ++---
 .../pages/modplatform/modrinth/ModrinthModel.cpp   |  8 ++---
 3 files changed, 20 insertions(+), 32 deletions(-)

(limited to 'launcher/ui/pages/modplatform/ResourceModel.cpp')

diff --git a/launcher/ui/pages/modplatform/ResourceModel.cpp b/launcher/ui/pages/modplatform/ResourceModel.cpp
index 018721f9..cb8f1920 100644
--- a/launcher/ui/pages/modplatform/ResourceModel.cpp
+++ b/launcher/ui/pages/modplatform/ResourceModel.cpp
@@ -137,26 +137,22 @@ void ResourceModel::search()
         if (!projectId.isEmpty()) {
             ResourceAPI::ProjectInfoCallbacks callbacks;
 
-            // Use defaults if no callbacks are set
-            if (!callbacks.on_fail)
-                callbacks.on_fail = [this](QString reason) {
-                    if (!s_running_models.constFind(this).value())
-                        return;
-                    searchRequestFailed(reason, -1);
-                };
-            if (!callbacks.on_abort)
-                callbacks.on_abort = [this] {
-                    if (!s_running_models.constFind(this).value())
-                        return;
-                    searchRequestAborted();
-                };
-
-            if (!callbacks.on_succeed)
-                callbacks.on_succeed = [this](auto& doc, auto& pack) {
-                    if (!s_running_models.constFind(this).value())
-                        return;
-                    searchRequestForOneSucceeded(doc);
-                };
+            callbacks.on_fail = [this](QString reason) {
+                if (!s_running_models.constFind(this).value())
+                    return;
+                searchRequestFailed(reason, -1);
+            };
+            callbacks.on_abort = [this] {
+                if (!s_running_models.constFind(this).value())
+                    return;
+                searchRequestAborted();
+            };
+
+            callbacks.on_succeed = [this](auto& doc, auto& pack) {
+                if (!s_running_models.constFind(this).value())
+                    return;
+                searchRequestForOneSucceeded(doc);
+            };
             if (auto job = m_api->getProjectInfo({ projectId }, std::move(callbacks)); job)
                 runSearchJob(job);
             return;
diff --git a/launcher/ui/pages/modplatform/flame/FlameModel.cpp b/launcher/ui/pages/modplatform/flame/FlameModel.cpp
index 17875a60..8875a945 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModel.cpp
+++ b/launcher/ui/pages/modplatform/flame/FlameModel.cpp
@@ -168,12 +168,8 @@ void ListModel::performPaginatedSearch()
         if (!projectId.isEmpty()) {
             ResourceAPI::ProjectInfoCallbacks callbacks;
 
-            // Use defaults if no callbacks are set
-            if (!callbacks.on_fail)
-                callbacks.on_fail = [this](QString reason) { searchRequestFailed(reason); };
-
-            if (!callbacks.on_succeed)
-                callbacks.on_succeed = [this](auto& doc, auto& pack) { searchRequestForOneSucceeded(doc); };
+            callbacks.on_fail = [this](QString reason) { searchRequestFailed(reason); };
+            callbacks.on_succeed = [this](auto& doc, auto& pack) { searchRequestForOneSucceeded(doc); };
             static const FlameAPI api;
             if (auto job = api.getProjectInfo({ projectId }, std::move(callbacks)); job) {
                 jobPtr = job;
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
index efb1fe44..f691a185 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
@@ -138,12 +138,8 @@ void ModpackListModel::performPaginatedSearch()
         if (!projectId.isEmpty()) {
             ResourceAPI::ProjectInfoCallbacks callbacks;
 
-            // Use defaults if no callbacks are set
-            if (!callbacks.on_fail)
-                callbacks.on_fail = [this](QString reason) { searchRequestFailed(reason); };
-
-            if (!callbacks.on_succeed)
-                callbacks.on_succeed = [this](auto& doc, auto& pack) { searchRequestForOneSucceeded(doc); };
+            callbacks.on_fail = [this](QString reason) { searchRequestFailed(reason); };
+            callbacks.on_succeed = [this](auto& doc, auto& pack) { searchRequestForOneSucceeded(doc); };
             static const ModrinthAPI api;
             if (auto job = api.getProjectInfo({ projectId }, std::move(callbacks)); job) {
                 jobPtr = job;
-- 
cgit