diff --git a/.clang-tidy b/.clang-tidy index 11ddc9cfc..436dcf244 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,5 @@ Checks: - modernize-use-using + - readability-avoid-const-params-in-decls SystemHeaders: false diff --git a/launcher/DataMigrationTask.h b/launcher/DataMigrationTask.h index 6cc23b1a8..aba9f2399 100644 --- a/launcher/DataMigrationTask.h +++ b/launcher/DataMigrationTask.h @@ -18,7 +18,7 @@ class DataMigrationTask : public Task { Q_OBJECT public: - explicit DataMigrationTask(QObject* parent, const QString& sourcePath, const QString& targetPath, const IPathMatcher::Ptr pathmatcher); + explicit DataMigrationTask(QObject* parent, const QString& sourcePath, const QString& targetPath, IPathMatcher::Ptr pathmatcher); ~DataMigrationTask() override = default; protected: diff --git a/launcher/InstanceImportTask.cpp b/launcher/InstanceImportTask.cpp index bc139e4f1..9f0cf7460 100644 --- a/launcher/InstanceImportTask.cpp +++ b/launcher/InstanceImportTask.cpp @@ -59,7 +59,7 @@ #include -InstanceImportTask::InstanceImportTask(const QUrl sourceUrl, QWidget* parent, QMap&& extra_info) +InstanceImportTask::InstanceImportTask(const QUrl& sourceUrl, QWidget* parent, QMap&& extra_info) : m_sourceUrl(sourceUrl), m_extra_info(extra_info), m_parent(parent) {} diff --git a/launcher/InstanceImportTask.h b/launcher/InstanceImportTask.h index ca3d30ad6..a1cf2560b 100644 --- a/launcher/InstanceImportTask.h +++ b/launcher/InstanceImportTask.h @@ -54,7 +54,7 @@ class FileResolvingTask; class InstanceImportTask : public InstanceTask { Q_OBJECT public: - explicit InstanceImportTask(const QUrl sourceUrl, QWidget* parent = nullptr, QMap&& extra_info = {}); + explicit InstanceImportTask(const QUrl& sourceUrl, QWidget* parent = nullptr, QMap&& extra_info = {}); bool abort() override; const QVector& getBlockedFiles() const { return m_blockedMods; } diff --git a/launcher/MMCZip.cpp b/launcher/MMCZip.cpp index 3bfe16ab5..ce2573329 100644 --- a/launcher/MMCZip.cpp +++ b/launcher/MMCZip.cpp @@ -50,7 +50,7 @@ namespace MMCZip { // ours -bool mergeZipFiles(QuaZip* into, QFileInfo from, QSet& contained, const FilterFunction filter) +bool mergeZipFiles(QuaZip* into, QFileInfo from, QSet& contained, const FilterFunction& filter) { QuaZip modZip(from.filePath()); modZip.open(QuaZip::mdUnzip); diff --git a/launcher/MMCZip.h b/launcher/MMCZip.h index 45b1df0b3..93692d0d2 100644 --- a/launcher/MMCZip.h +++ b/launcher/MMCZip.h @@ -60,7 +60,7 @@ using FilterFunction = std::function; /** * Merge two zip files, using a filter function */ -bool mergeZipFiles(QuaZip* into, QFileInfo from, QSet& contained, const FilterFunction filter = nullptr); +bool mergeZipFiles(QuaZip* into, QFileInfo from, QSet& contained, const FilterFunction& filter = nullptr); /** * Compress directory, by providing a list of files to compress diff --git a/launcher/RecursiveFileSystemWatcher.h b/launcher/RecursiveFileSystemWatcher.h index ec3ed804e..7f96f5cd0 100644 --- a/launcher/RecursiveFileSystemWatcher.h +++ b/launcher/RecursiveFileSystemWatcher.h @@ -13,7 +13,7 @@ class RecursiveFileSystemWatcher : public QObject { QDir rootDir() const { return m_root; } // WARNING: setting this to true may be bad for performance - void setWatchFiles(const bool watchFiles); + void setWatchFiles(bool watchFiles); bool watchFiles() const { return m_watchFiles; } void setMatcher(IPathMatcher::Ptr matcher) { m_matcher = matcher; } diff --git a/launcher/ResourceDownloadTask.h b/launcher/ResourceDownloadTask.h index 2baddf8a8..f686e819a 100644 --- a/launcher/ResourceDownloadTask.h +++ b/launcher/ResourceDownloadTask.h @@ -32,7 +32,7 @@ class ResourceDownloadTask : public SequentialTask { public: explicit ResourceDownloadTask(ModPlatform::IndexedPack::Ptr pack, ModPlatform::IndexedVersion version, - const std::shared_ptr packs, + std::shared_ptr packs, bool is_indexed = true, QString custom_target_folder = {}); const QString& getFilename() const { return m_pack_version.fileName; } diff --git a/launcher/VersionProxyModel.h b/launcher/VersionProxyModel.h index 57c711d58..0863a7c80 100644 --- a/launcher/VersionProxyModel.h +++ b/launcher/VersionProxyModel.h @@ -28,7 +28,7 @@ class VersionProxyModel : public QAbstractProxyModel { const FilterMap& filters() const; const QString& search() const; - void setFilter(const BaseVersionList::ModelRoles column, Filter* filter); + void setFilter(BaseVersionList::ModelRoles column, Filter* filter); void setSearch(const QString& search); void clearFilters(); QModelIndex getRecommended() const; diff --git a/launcher/icons/IconList.h b/launcher/icons/IconList.h index 8afd05574..c51826057 100644 --- a/launcher/icons/IconList.h +++ b/launcher/icons/IconList.h @@ -67,7 +67,7 @@ class IconList : public QAbstractListModel { virtual Qt::ItemFlags flags(const QModelIndex& index) const override; bool addThemeIcon(const QString& key); - bool addIcon(const QString& key, const QString& name, const QString& path, const IconType type); + bool addIcon(const QString& key, const QString& name, const QString& path, IconType type); void saveIcon(const QString& key, const QString& path, const char* format) const; bool deleteIcon(const QString& key); bool trashIcon(const QString& key); diff --git a/launcher/meta/Index.h b/launcher/meta/Index.h index 41fdfcea9..2c650ce2f 100644 --- a/launcher/meta/Index.h +++ b/launcher/meta/Index.h @@ -55,6 +55,6 @@ class Index : public QAbstractListModel, public BaseEntity { QVector m_lists; QHash m_uids; - void connectVersionList(const int row, const VersionList::Ptr& list); + void connectVersionList(int row, const VersionList::Ptr& list); }; } // namespace Meta diff --git a/launcher/meta/Version.h b/launcher/meta/Version.h index 07dcafb01..24da12d6d 100644 --- a/launcher/meta/Version.h +++ b/launcher/meta/Version.h @@ -64,7 +64,7 @@ class Version : public QObject, public BaseVersion, public BaseEntity { public: // for usage by format parsers only void setType(const QString& type); - void setTime(const qint64 time); + void setTime(qint64 time); void setRequires(const Meta::RequireSet& reqs, const Meta::RequireSet& conflicts); void setVolatile(bool volatile_); void setRecommended(bool recommended); diff --git a/launcher/meta/VersionList.h b/launcher/meta/VersionList.h index 5e587f204..2c5624701 100644 --- a/launcher/meta/VersionList.h +++ b/launcher/meta/VersionList.h @@ -79,7 +79,7 @@ class VersionList : public BaseVersionList, public BaseEntity { Version::Ptr m_recommended; - void setupAddedVersion(const int row, const Version::Ptr& version); + void setupAddedVersion(int row, const Version::Ptr& version); }; } // namespace Meta Q_DECLARE_METATYPE(Meta::VersionList::Ptr) diff --git a/launcher/minecraft/OneSixVersionFormat.h b/launcher/minecraft/OneSixVersionFormat.h index 9bdc4a4a3..9024d41e4 100644 --- a/launcher/minecraft/OneSixVersionFormat.h +++ b/launcher/minecraft/OneSixVersionFormat.h @@ -9,7 +9,7 @@ class OneSixVersionFormat { public: // version files / profile patches - static VersionFilePtr versionFileFromJson(const QJsonDocument& doc, const QString& filename, const bool requireOrder); + static VersionFilePtr versionFileFromJson(const QJsonDocument& doc, const QString& filename, bool requireOrder); static QJsonDocument versionFileToJson(const VersionFilePtr& patch); // libraries diff --git a/launcher/minecraft/PackProfile.cpp b/launcher/minecraft/PackProfile.cpp index 9e706ae0a..180f8aa30 100644 --- a/launcher/minecraft/PackProfile.cpp +++ b/launcher/minecraft/PackProfile.cpp @@ -430,7 +430,7 @@ bool PackProfile::remove(const int index) return true; } -bool PackProfile::remove(const QString id) +bool PackProfile::remove(const QString& id) { int i = 0; for (auto patch : d->components) { diff --git a/launcher/minecraft/PackProfile.h b/launcher/minecraft/PackProfile.h index e72b6ebfe..e58e9ae9a 100644 --- a/launcher/minecraft/PackProfile.h +++ b/launcher/minecraft/PackProfile.h @@ -89,13 +89,13 @@ class PackProfile : public QAbstractListModel { enum MoveDirection { MoveUp, MoveDown }; /// move component file # up or down the list - void move(const int index, const MoveDirection direction); + void move(int index, MoveDirection direction); /// remove component file # - including files/records - bool remove(const int index); + bool remove(int index); /// remove component file by id - including files/records - bool remove(const QString id); + bool remove(const QString& id); bool customize(int index); diff --git a/launcher/minecraft/ProfileUtils.cpp b/launcher/minecraft/ProfileUtils.cpp index d56ed14bd..f81d6cb7f 100644 --- a/launcher/minecraft/ProfileUtils.cpp +++ b/launcher/minecraft/ProfileUtils.cpp @@ -140,7 +140,7 @@ VersionFilePtr parseJsonFile(const QFileInfo& fileInfo, const bool requireOrder) return guardedParseJson(doc, fileInfo.completeBaseName(), fileInfo.absoluteFilePath(), requireOrder); } -bool saveJsonFile(const QJsonDocument doc, const QString& filename) +bool saveJsonFile(const QJsonDocument& doc, const QString& filename) { auto data = doc.toJson(); QSaveFile jsonFile(filename); diff --git a/launcher/minecraft/ProfileUtils.h b/launcher/minecraft/ProfileUtils.h index edabe0bf0..11e44485f 100644 --- a/launcher/minecraft/ProfileUtils.h +++ b/launcher/minecraft/ProfileUtils.h @@ -47,10 +47,10 @@ bool readOverrideOrders(QString path, PatchOrder& order); bool writeOverrideOrders(QString path, const PatchOrder& order); /// Parse a version file in JSON format -VersionFilePtr parseJsonFile(const QFileInfo& fileInfo, const bool requireOrder); +VersionFilePtr parseJsonFile(const QFileInfo& fileInfo, bool requireOrder); /// Save a JSON file (in any format) -bool saveJsonFile(const QJsonDocument doc, const QString& filename); +bool saveJsonFile(const QJsonDocument& doc, const QString& filename); /// Remove LWJGL from a patch file. This is applied to all Mojang-like profile files. void removeLwjglFromPatch(VersionFilePtr patch); diff --git a/launcher/minecraft/auth/AccountList.h b/launcher/minecraft/auth/AccountList.h index 051d8f958..039730739 100644 --- a/launcher/minecraft/auth/AccountList.h +++ b/launcher/minecraft/auth/AccountList.h @@ -75,7 +75,7 @@ class AccountList : public QAbstractListModel { virtual Qt::ItemFlags flags(const QModelIndex& index) const override; virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override; - void addAccount(const MinecraftAccountPtr account); + void addAccount(MinecraftAccountPtr account); void removeAccount(QModelIndex index); int findAccountByProfileId(const QString& profileId) const; MinecraftAccountPtr getAccountByProfileName(const QString& profileName) const; diff --git a/launcher/minecraft/mod/ResourceFolderModel.cpp b/launcher/minecraft/mod/ResourceFolderModel.cpp index 0503b660b..0f97eb73a 100644 --- a/launcher/minecraft/mod/ResourceFolderModel.cpp +++ b/launcher/minecraft/mod/ResourceFolderModel.cpp @@ -45,7 +45,7 @@ ResourceFolderModel::~ResourceFolderModel() QCoreApplication::processEvents(); } -bool ResourceFolderModel::startWatching(const QStringList paths) +bool ResourceFolderModel::startWatching(const QStringList& paths) { if (m_is_watching) return false; @@ -64,7 +64,7 @@ bool ResourceFolderModel::startWatching(const QStringList paths) return m_is_watching; } -bool ResourceFolderModel::stopWatching(const QStringList paths) +bool ResourceFolderModel::stopWatching(const QStringList& paths) { if (!m_is_watching) return false; diff --git a/launcher/minecraft/mod/ResourceFolderModel.h b/launcher/minecraft/mod/ResourceFolderModel.h index 60b8879c0..be92bf4ac 100644 --- a/launcher/minecraft/mod/ResourceFolderModel.h +++ b/launcher/minecraft/mod/ResourceFolderModel.h @@ -39,14 +39,14 @@ class ResourceFolderModel : public QAbstractListModel { * Returns whether starting to watch all the paths was successful. * If one or more fails, it returns false. */ - bool startWatching(const QStringList paths); + bool startWatching(const QStringList& paths); /** Stops watching the paths for changes. * * Returns whether stopping to watch all the paths was successful. * If one or more fails, it returns false. */ - bool stopWatching(const QStringList paths); + bool stopWatching(const QStringList& paths); /* Helper methods for subclasses, using a predetermined list of paths. */ virtual bool startWatching() { return startWatching({ m_dir.absolutePath() }); } diff --git a/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp b/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp index df8c690af..661901782 100644 --- a/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp +++ b/launcher/minecraft/mod/tasks/GetModDependenciesTask.cpp @@ -238,7 +238,7 @@ Task::Ptr GetModDependenciesTask::prepareDependencyTask(const ModPlatform::Depen return tasks; } -void GetModDependenciesTask::removePack(const QVariant addonId) +void GetModDependenciesTask::removePack(const QVariant& addonId) { auto pred = [addonId](const std::shared_ptr& v) { return v->pack->addonId == addonId; }; #if QT_VERSION >= QT_VERSION_CHECK(6, 1, 0) diff --git a/launcher/minecraft/mod/tasks/GetModDependenciesTask.h b/launcher/minecraft/mod/tasks/GetModDependenciesTask.h index 2580f8077..e88204bdc 100644 --- a/launcher/minecraft/mod/tasks/GetModDependenciesTask.h +++ b/launcher/minecraft/mod/tasks/GetModDependenciesTask.h @@ -65,13 +65,13 @@ class GetModDependenciesTask : public SequentialTask { QHash getRequiredBy(); protected slots: - Task::Ptr prepareDependencyTask(const ModPlatform::Dependency&, const ModPlatform::ResourceProvider, int); + Task::Ptr prepareDependencyTask(const ModPlatform::Dependency&, ModPlatform::ResourceProvider, int); QList getDependenciesForVersion(const ModPlatform::IndexedVersion&, - const ModPlatform::ResourceProvider providerName); + ModPlatform::ResourceProvider providerName); void prepare(); Task::Ptr getProjectInfoTask(std::shared_ptr pDep); - ModPlatform::Dependency getOverride(const ModPlatform::Dependency&, const ModPlatform::ResourceProvider providerName); - void removePack(const QVariant addonId); + ModPlatform::Dependency getOverride(const ModPlatform::Dependency&, ModPlatform::ResourceProvider providerName); + void removePack(const QVariant& addonId); private: QList> m_pack_dependencies; diff --git a/launcher/modplatform/modrinth/ModrinthPackExportTask.h b/launcher/modplatform/modrinth/ModrinthPackExportTask.h index 33c42e817..81c2f25bf 100644 --- a/launcher/modplatform/modrinth/ModrinthPackExportTask.h +++ b/launcher/modplatform/modrinth/ModrinthPackExportTask.h @@ -68,7 +68,7 @@ class ModrinthPackExportTask : public Task { void collectFiles(); void collectHashes(); void makeApiRequest(); - void parseApiResponse(const std::shared_ptr response); + void parseApiResponse(std::shared_ptr response); void buildZip(); QByteArray generateIndex(); diff --git a/launcher/modplatform/technic/TechnicPackProcessor.h b/launcher/modplatform/technic/TechnicPackProcessor.h index 466bce596..08e117fd8 100644 --- a/launcher/modplatform/technic/TechnicPackProcessor.h +++ b/launcher/modplatform/technic/TechnicPackProcessor.h @@ -33,6 +33,6 @@ class TechnicPackProcessor : public QObject { const QString& instIcon, const QString& stagingPath, const QString& minecraftVersion = QString(), - const bool isSolder = false); + bool isSolder = false); }; } // namespace Technic diff --git a/launcher/ui/dialogs/ModUpdateDialog.h b/launcher/ui/dialogs/ModUpdateDialog.h index b79aa4943..7737dd625 100644 --- a/launcher/ui/dialogs/ModUpdateDialog.h +++ b/launcher/ui/dialogs/ModUpdateDialog.h @@ -16,10 +16,7 @@ class ConcurrentTask; class ModUpdateDialog final : public ReviewMessageBox { Q_OBJECT public: - explicit ModUpdateDialog(QWidget* parent, - BaseInstance* instance, - const std::shared_ptr mod_model, - QList& search_for); + explicit ModUpdateDialog(QWidget* parent, BaseInstance* instance, std::shared_ptr mod_model, QList& search_for); void checkCandidates(); diff --git a/launcher/ui/dialogs/ResourceDownloadDialog.h b/launcher/ui/dialogs/ResourceDownloadDialog.h index e9d2cfbe6..a6efca138 100644 --- a/launcher/ui/dialogs/ResourceDownloadDialog.h +++ b/launcher/ui/dialogs/ResourceDownloadDialog.h @@ -50,7 +50,7 @@ class ResourceDownloadDialog : public QDialog, public BasePageProvider { public: using DownloadTaskPtr = shared_qobject_ptr; - ResourceDownloadDialog(QWidget* parent, const std::shared_ptr base_model); + ResourceDownloadDialog(QWidget* parent, std::shared_ptr base_model); void initializeContainer(); void connectButtons(); diff --git a/launcher/ui/instanceview/InstanceView.h b/launcher/ui/instanceview/InstanceView.h index 3d4d56208..30be411a8 100644 --- a/launcher/ui/instanceview/InstanceView.h +++ b/launcher/ui/instanceview/InstanceView.h @@ -65,7 +65,7 @@ class InstanceView : public QAbstractItemView { /// get the model index at the specified visual point virtual QModelIndex indexAt(const QPoint& point) const override; QString groupNameAt(const QPoint& point); - void setSelection(const QRect& rect, const QItemSelectionModel::SelectionFlags commands) override; + void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags commands) override; virtual int horizontalOffset() const override; virtual int verticalOffset() const override; diff --git a/launcher/ui/pages/instance/OtherLogsPage.h b/launcher/ui/pages/instance/OtherLogsPage.h index 4b3b122b0..de42f5a23 100644 --- a/launcher/ui/pages/instance/OtherLogsPage.h +++ b/launcher/ui/pages/instance/OtherLogsPage.h @@ -65,7 +65,7 @@ class OtherLogsPage : public QWidget, public BasePage { private slots: void populateSelectLogBox(); - void on_selectLogBox_currentIndexChanged(const int index); + void on_selectLogBox_currentIndexChanged(int index); void on_btnReload_clicked(); void on_btnPaste_clicked(); void on_btnCopy_clicked(); @@ -78,7 +78,7 @@ class OtherLogsPage : public QWidget, public BasePage { void findPreviousActivated(); private: - void setControlsEnabled(const bool enabled); + void setControlsEnabled(bool enabled); private: Ui::OtherLogsPage* ui; diff --git a/launcher/ui/pages/modplatform/ModPage.h b/launcher/ui/pages/modplatform/ModPage.h index 5a43e49a6..f3660dd48 100644 --- a/launcher/ui/pages/modplatform/ModPage.h +++ b/launcher/ui/pages/modplatform/ModPage.h @@ -49,9 +49,7 @@ class ModPage : public ResourcePage { [[nodiscard]] QMap urlHandlers() const override; - void addResourceToPage(ModPlatform::IndexedPack::Ptr, - ModPlatform::IndexedVersion&, - const std::shared_ptr) override; + void addResourceToPage(ModPlatform::IndexedPack::Ptr, ModPlatform::IndexedVersion&, std::shared_ptr) override; virtual auto validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, diff --git a/launcher/ui/pages/modplatform/ResourceModel.h b/launcher/ui/pages/modplatform/ResourceModel.h index ecf4f8f79..12db49080 100644 --- a/launcher/ui/pages/modplatform/ResourceModel.h +++ b/launcher/ui/pages/modplatform/ResourceModel.h @@ -88,7 +88,7 @@ class ResourceModel : public QAbstractListModel { void addPack(ModPlatform::IndexedPack::Ptr pack, ModPlatform::IndexedVersion& version, - const std::shared_ptr packs, + std::shared_ptr packs, bool is_indexed = false, QString custom_target_folder = {}); void removePack(const QString& rem); diff --git a/launcher/ui/pages/modplatform/ResourcePage.h b/launcher/ui/pages/modplatform/ResourcePage.h index 7bec0a375..235b44412 100644 --- a/launcher/ui/pages/modplatform/ResourcePage.h +++ b/launcher/ui/pages/modplatform/ResourcePage.h @@ -78,7 +78,7 @@ class ResourcePage : public QWidget, public BasePage { void addResourceToDialog(ModPlatform::IndexedPack::Ptr, ModPlatform::IndexedVersion&); void removeResourceFromDialog(const QString& pack_name); virtual void removeResourceFromPage(const QString& name); - virtual void addResourceToPage(ModPlatform::IndexedPack::Ptr, ModPlatform::IndexedVersion&, const std::shared_ptr); + virtual void addResourceToPage(ModPlatform::IndexedPack::Ptr, ModPlatform::IndexedVersion&, std::shared_ptr); QList selectedPacks() { return m_model->selectedPacks(); } bool hasSelectedPacks() { return !(m_model->selectedPacks().isEmpty()); } diff --git a/launcher/ui/pages/modplatform/ShaderPackPage.h b/launcher/ui/pages/modplatform/ShaderPackPage.h index fcf6d4a7c..c29317e15 100644 --- a/launcher/ui/pages/modplatform/ShaderPackPage.h +++ b/launcher/ui/pages/modplatform/ShaderPackPage.h @@ -38,9 +38,7 @@ class ShaderPackResourcePage : public ResourcePage { [[nodiscard]] bool supportsFiltering() const override { return false; }; - void addResourceToPage(ModPlatform::IndexedPack::Ptr, - ModPlatform::IndexedVersion&, - const std::shared_ptr) override; + void addResourceToPage(ModPlatform::IndexedPack::Ptr, ModPlatform::IndexedVersion&, std::shared_ptr) override; [[nodiscard]] QMap urlHandlers() const override; diff --git a/launcher/ui/pages/modplatform/flame/FlameModel.h b/launcher/ui/pages/modplatform/flame/FlameModel.h index 5a07ef6bb..9b6d70fec 100644 --- a/launcher/ui/pages/modplatform/flame/FlameModel.h +++ b/launcher/ui/pages/modplatform/flame/FlameModel.h @@ -38,7 +38,7 @@ class ListModel : public QAbstractListModel { void fetchMore(const QModelIndex& parent) override; void getLogo(const QString& logo, const QString& logoUrl, LogoCallback callback); - void searchWithTerm(const QString& term, const int sort); + void searchWithTerm(const QString& term, int sort); [[nodiscard]] bool hasActiveSearchJob() const { return jobPtr && jobPtr->isRunning(); } [[nodiscard]] Task::Ptr activeSearchJob() { return hasActiveSearchJob() ? jobPtr : nullptr; } diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.h b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.h index 2a9d62261..514ee4484 100644 --- a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.h +++ b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.h @@ -71,7 +71,7 @@ class ModpackListModel : public QAbstractListModel { /* Ask the API for more information */ void fetchMore(const QModelIndex& parent) override; void refresh(); - void searchWithTerm(const QString& term, const int sort); + void searchWithTerm(const QString& term, int sort); [[nodiscard]] bool hasActiveSearchJob() const { return jobPtr && jobPtr->isRunning(); } [[nodiscard]] Task::Ptr activeSearchJob() { return hasActiveSearchJob() ? jobPtr : nullptr; } diff --git a/launcher/ui/widgets/LanguageSelectionWidget.cpp b/launcher/ui/widgets/LanguageSelectionWidget.cpp index 37d053478..481547b5b 100644 --- a/launcher/ui/widgets/LanguageSelectionWidget.cpp +++ b/launcher/ui/widgets/LanguageSelectionWidget.cpp @@ -76,7 +76,7 @@ void LanguageSelectionWidget::languageRowChanged(const QModelIndex& current, con translations->updateLanguage(key); } -void LanguageSelectionWidget::languageSettingChanged(const Setting&, const QVariant) +void LanguageSelectionWidget::languageSettingChanged(const Setting&, const QVariant&) { auto translations = APPLICATION->translations(); auto index = translations->selectedIndex(); diff --git a/launcher/ui/widgets/LanguageSelectionWidget.h b/launcher/ui/widgets/LanguageSelectionWidget.h index 5e86a288f..f034853dd 100644 --- a/launcher/ui/widgets/LanguageSelectionWidget.h +++ b/launcher/ui/widgets/LanguageSelectionWidget.h @@ -34,7 +34,7 @@ class LanguageSelectionWidget : public QWidget { protected slots: void languageRowChanged(const QModelIndex& current, const QModelIndex& previous); - void languageSettingChanged(const Setting&, const QVariant); + void languageSettingChanged(const Setting&, const QVariant&); private: QVBoxLayout* verticalLayout = nullptr;