diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-17 14:23:37 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-08-17 14:23:37 +0300 |
commit | 4a1d85f99913d0bacf8cdd118c81401378c758b6 (patch) | |
tree | e8389ba64e1b1a303545f1dad242c9a9124ddca9 /tests | |
parent | 939a2d67ed75be714e9f3b1b918250d006b3860a (diff) | |
parent | 85f36ebed7e1295547cd2324d1baf7834be89c31 (diff) | |
download | PrismLauncher-4a1d85f99913d0bacf8cdd118c81401378c758b6.tar.gz PrismLauncher-4a1d85f99913d0bacf8cdd118c81401378c758b6.tar.bz2 PrismLauncher-4a1d85f99913d0bacf8cdd118c81401378c758b6.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into develop
Diffstat (limited to 'tests')
-rw-r--r-- | tests/DummyResourceAPI.h | 2 | ||||
-rw-r--r-- | tests/FileSystem_test.cpp | 8 | ||||
-rw-r--r-- | tests/GZip_test.cpp | 2 | ||||
-rw-r--r-- | tests/ResourceModel_test.cpp | 10 | ||||
-rw-r--r-- | tests/Task_test.cpp | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/tests/DummyResourceAPI.h b/tests/DummyResourceAPI.h index 0cc90958..35de9515 100644 --- a/tests/DummyResourceAPI.h +++ b/tests/DummyResourceAPI.h @@ -32,7 +32,7 @@ class DummyResourceAPI : public ResourceAPI { } DummyResourceAPI() : ResourceAPI() {} - [[nodiscard]] auto getSortingMethods() const -> QList<SortingMethod> override { return {}; }; + [[nodiscard]] auto getSortingMethods() const -> QList<SortingMethod> override { return {}; } [[nodiscard]] Task::Ptr searchProjects(SearchArgs&&, SearchCallbacks&& callbacks) const override { diff --git a/tests/FileSystem_test.cpp b/tests/FileSystem_test.cpp index 3adcd343..e1941042 100644 --- a/tests/FileSystem_test.cpp +++ b/tests/FileSystem_test.cpp @@ -81,10 +81,10 @@ class LinkTask : public Task { } else { emitSucceeded(); } - }; + } FS::create_link* m_lnk; - bool m_useHard = false; + [[maybe_unused]] bool m_useHard = false; bool m_linkRecursive = true; }; @@ -361,7 +361,7 @@ class FileSystemTest : public QObject { void test_link() { QString folder = QFINDTESTDATA("testdata/FileSystem/test_folder"); - auto f = [&folder, this]() { + auto f = [&folder]() { QTemporaryDir tempDir; tempDir.setAutoRemove(true); qDebug() << "From:" << folder << "To:" << tempDir.path(); @@ -630,7 +630,7 @@ class FileSystemTest : public QObject { void test_link_with_max_depth() { QString folder = QFINDTESTDATA("testdata/FileSystem/test_folder"); - auto f = [&folder, this]() { + auto f = [&folder]() { QTemporaryDir tempDir; tempDir.setAutoRemove(true); qDebug() << "From:" << folder << "To:" << tempDir.path(); diff --git a/tests/GZip_test.cpp b/tests/GZip_test.cpp index 4c1259c2..c11ba271 100644 --- a/tests/GZip_test.cpp +++ b/tests/GZip_test.cpp @@ -26,7 +26,7 @@ class GZipTest : public QObject { // initialize random buffer for (int i = 0; i < size; i++) { - random.append((char)idis(eng)); + random.append(static_cast<char>(idis(eng))); } // initialize fibonacci diff --git a/tests/ResourceModel_test.cpp b/tests/ResourceModel_test.cpp index 9626c64e..b589758a 100644 --- a/tests/ResourceModel_test.cpp +++ b/tests/ResourceModel_test.cpp @@ -40,17 +40,17 @@ class DummyResourceModel : public ResourceModel { DummyResourceModel() : ResourceModel(new DummyResourceAPI) {} ~DummyResourceModel() {} - [[nodiscard]] auto metaEntryBase() const -> QString override { return ""; }; + [[nodiscard]] auto metaEntryBase() const -> QString override { return ""; } - ResourceAPI::SearchArgs createSearchArguments() override { return {}; }; - ResourceAPI::VersionSearchArgs createVersionsArguments(QModelIndex&) override { return {}; }; - ResourceAPI::ProjectInfoArgs createInfoArguments(QModelIndex&) override { return {}; }; + ResourceAPI::SearchArgs createSearchArguments() override { return {}; } + ResourceAPI::VersionSearchArgs createVersionsArguments(QModelIndex&) override { return {}; } + ResourceAPI::ProjectInfoArgs createInfoArguments(QModelIndex&) override { return {}; } QJsonArray documentToArray(QJsonDocument& doc) const override { return doc.object().value("hits").toArray(); } void loadIndexedPack(ModPlatform::IndexedPack& pack, QJsonObject& obj) override { - pack.authors.append({ Json::requireString(obj, "author") }); + pack.authors.append({ Json::requireString(obj, "author"), "" }); pack.description = Json::requireString(obj, "description"); pack.addonId = Json::requireString(obj, "project_id"); } diff --git a/tests/Task_test.cpp b/tests/Task_test.cpp index 95d927c6..abc9be90 100644 --- a/tests/Task_test.cpp +++ b/tests/Task_test.cpp @@ -19,7 +19,7 @@ class BasicTask : public Task { BasicTask(bool show_debug_log = true) : Task(nullptr, show_debug_log) {} private: - void executeTask() override { emitSucceeded(); }; + void executeTask() override { emitSucceeded(); } }; /* Does nothing. Only used for testing. */ @@ -31,7 +31,7 @@ class BasicTask_MultiStep : public Task { private: auto isMultiStep() const -> bool override { return true; } - void executeTask() override{}; + void executeTask() override {} }; class BigConcurrentTask : public ConcurrentTask { |