From 277289db55070166cd0c59e98ffcbb021f006df5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Feb 2021 23:57:37 +0100 Subject: [PATCH] Bump lib/serialize from `130ffc3` to `7d37cbf` (#2418) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rasmus Karlsson --- lib/serialize | 2 +- src/controllers/filters/FilterRecord.hpp | 4 +++- src/controllers/highlights/HighlightBlacklistUser.hpp | 4 +++- src/controllers/highlights/HighlightPhrase.hpp | 5 ++++- src/controllers/ignores/IgnorePhrase.hpp | 4 +++- src/controllers/moderationactions/ModerationAction.hpp | 4 +++- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/lib/serialize b/lib/serialize index 130ffc3ec..7d37cbfd5 160000 --- a/lib/serialize +++ b/lib/serialize @@ -1 +1 @@ -Subproject commit 130ffc3ec722284ca454a1e70c5478a75f380144 +Subproject commit 7d37cbfd5ac3bfbe046118e1cec3d32ba4696469 diff --git a/src/controllers/filters/FilterRecord.hpp b/src/controllers/filters/FilterRecord.hpp index 76288e868..8d699f828 100644 --- a/src/controllers/filters/FilterRecord.hpp +++ b/src/controllers/filters/FilterRecord.hpp @@ -102,10 +102,12 @@ struct Serialize { template <> struct Deserialize { - static chatterino::FilterRecordPtr get(const rapidjson::Value &value) + static chatterino::FilterRecordPtr get(const rapidjson::Value &value, + bool *error = nullptr) { if (!value.IsObject()) { + PAJLADA_REPORT_ERROR(error) return std::make_shared(QString(), QString()); } diff --git a/src/controllers/highlights/HighlightBlacklistUser.hpp b/src/controllers/highlights/HighlightBlacklistUser.hpp index 04d2203a3..08a56ba4d 100644 --- a/src/controllers/highlights/HighlightBlacklistUser.hpp +++ b/src/controllers/highlights/HighlightBlacklistUser.hpp @@ -85,13 +85,15 @@ struct Serialize { template <> struct Deserialize { - static chatterino::HighlightBlacklistUser get(const rapidjson::Value &value) + static chatterino::HighlightBlacklistUser get(const rapidjson::Value &value, + bool *error = nullptr) { QString pattern; bool isRegex = false; if (!value.IsObject()) { + PAJLADA_REPORT_ERROR(error) return chatterino::HighlightBlacklistUser(pattern, isRegex); } diff --git a/src/controllers/highlights/HighlightPhrase.hpp b/src/controllers/highlights/HighlightPhrase.hpp index ace959f7c..496da667b 100644 --- a/src/controllers/highlights/HighlightPhrase.hpp +++ b/src/controllers/highlights/HighlightPhrase.hpp @@ -130,10 +130,13 @@ struct Serialize { template <> struct Deserialize { - static chatterino::HighlightPhrase get(const rapidjson::Value &value) + static chatterino::HighlightPhrase get(const rapidjson::Value &value, + bool *error = nullptr) { if (!value.IsObject()) { + PAJLADA_REPORT_ERROR(error) + return constructError(); } diff --git a/src/controllers/ignores/IgnorePhrase.hpp b/src/controllers/ignores/IgnorePhrase.hpp index 2d4987887..ffd4c09ec 100644 --- a/src/controllers/ignores/IgnorePhrase.hpp +++ b/src/controllers/ignores/IgnorePhrase.hpp @@ -157,10 +157,12 @@ struct Serialize { template <> struct Deserialize { - static chatterino::IgnorePhrase get(const rapidjson::Value &value) + static chatterino::IgnorePhrase get(const rapidjson::Value &value, + bool *error = nullptr) { if (!value.IsObject()) { + PAJLADA_REPORT_ERROR(error) return chatterino::IgnorePhrase( QString(), false, false, ::chatterino::getSettings()->ignoredPhraseReplace.getValue(), diff --git a/src/controllers/moderationactions/ModerationAction.hpp b/src/controllers/moderationactions/ModerationAction.hpp index 3b4532d91..f66d9d28f 100644 --- a/src/controllers/moderationactions/ModerationAction.hpp +++ b/src/controllers/moderationactions/ModerationAction.hpp @@ -51,10 +51,12 @@ struct Serialize { template <> struct Deserialize { - static chatterino::ModerationAction get(const rapidjson::Value &value) + static chatterino::ModerationAction get(const rapidjson::Value &value, + bool *error = nullptr) { if (!value.IsObject()) { + PAJLADA_REPORT_ERROR(error) return chatterino::ModerationAction(QString()); }