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 <rasmus.karlsson@pajlada.com>
This commit is contained in:
dependabot[bot] 2021-02-17 23:57:37 +01:00 committed by GitHub
parent 7d9f4c2b0c
commit 277289db55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 6 deletions

@ -1 +1 @@
Subproject commit 130ffc3ec722284ca454a1e70c5478a75f380144 Subproject commit 7d37cbfd5ac3bfbe046118e1cec3d32ba4696469

View file

@ -102,10 +102,12 @@ struct Serialize<chatterino::FilterRecordPtr> {
template <> template <>
struct Deserialize<chatterino::FilterRecordPtr> { struct Deserialize<chatterino::FilterRecordPtr> {
static chatterino::FilterRecordPtr get(const rapidjson::Value &value) static chatterino::FilterRecordPtr get(const rapidjson::Value &value,
bool *error = nullptr)
{ {
if (!value.IsObject()) if (!value.IsObject())
{ {
PAJLADA_REPORT_ERROR(error)
return std::make_shared<chatterino::FilterRecord>(QString(), return std::make_shared<chatterino::FilterRecord>(QString(),
QString()); QString());
} }

View file

@ -85,13 +85,15 @@ struct Serialize<chatterino::HighlightBlacklistUser> {
template <> template <>
struct Deserialize<chatterino::HighlightBlacklistUser> { struct Deserialize<chatterino::HighlightBlacklistUser> {
static chatterino::HighlightBlacklistUser get(const rapidjson::Value &value) static chatterino::HighlightBlacklistUser get(const rapidjson::Value &value,
bool *error = nullptr)
{ {
QString pattern; QString pattern;
bool isRegex = false; bool isRegex = false;
if (!value.IsObject()) if (!value.IsObject())
{ {
PAJLADA_REPORT_ERROR(error)
return chatterino::HighlightBlacklistUser(pattern, isRegex); return chatterino::HighlightBlacklistUser(pattern, isRegex);
} }

View file

@ -130,10 +130,13 @@ struct Serialize<chatterino::HighlightPhrase> {
template <> template <>
struct Deserialize<chatterino::HighlightPhrase> { struct Deserialize<chatterino::HighlightPhrase> {
static chatterino::HighlightPhrase get(const rapidjson::Value &value) static chatterino::HighlightPhrase get(const rapidjson::Value &value,
bool *error = nullptr)
{ {
if (!value.IsObject()) if (!value.IsObject())
{ {
PAJLADA_REPORT_ERROR(error)
return constructError(); return constructError();
} }

View file

@ -157,10 +157,12 @@ struct Serialize<chatterino::IgnorePhrase> {
template <> template <>
struct Deserialize<chatterino::IgnorePhrase> { struct Deserialize<chatterino::IgnorePhrase> {
static chatterino::IgnorePhrase get(const rapidjson::Value &value) static chatterino::IgnorePhrase get(const rapidjson::Value &value,
bool *error = nullptr)
{ {
if (!value.IsObject()) if (!value.IsObject())
{ {
PAJLADA_REPORT_ERROR(error)
return chatterino::IgnorePhrase( return chatterino::IgnorePhrase(
QString(), false, false, QString(), false, false,
::chatterino::getSettings()->ignoredPhraseReplace.getValue(), ::chatterino::getSettings()->ignoredPhraseReplace.getValue(),

View file

@ -51,10 +51,12 @@ struct Serialize<chatterino::ModerationAction> {
template <> template <>
struct Deserialize<chatterino::ModerationAction> { struct Deserialize<chatterino::ModerationAction> {
static chatterino::ModerationAction get(const rapidjson::Value &value) static chatterino::ModerationAction get(const rapidjson::Value &value,
bool *error = nullptr)
{ {
if (!value.IsObject()) if (!value.IsObject())
{ {
PAJLADA_REPORT_ERROR(error)
return chatterino::ModerationAction(QString()); return chatterino::ModerationAction(QString());
} }