chore: silence some deprecation warnings in Qt 6.8 (#5529)

This commit is contained in:
nerix
2024-08-04 11:23:29 +02:00
committed by GitHub
parent aed55ac1ba
commit 3257da1855
9 changed files with 55 additions and 30 deletions
+1 -1
View File
@@ -232,7 +232,7 @@ void TwitchAccount::loadUserstateEmotes(std::weak_ptr<Channel> weakChannel)
}
// filter out emote sets from userstate message, which are not in fetched emote set list
for (const auto &emoteSetKey : qAsConst(this->userstateEmoteSets_))
for (const auto &emoteSetKey : this->userstateEmoteSets_)
{
if (!existingEmoteSetKeys.contains(emoteSetKey))
{
@@ -1185,7 +1185,11 @@ void TwitchMessageBuilder::processIgnorePhrases(
QRegularExpression emoteregex(
"\\b" + emote.name.string + "\\b",
QRegularExpression::UseUnicodePropertiesOption);
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
auto match = emoteregex.matchView(midExtendedRef);
#else
auto match = emoteregex.match(midExtendedRef);
#endif
if (match.hasMatch())
{
emote.start = static_cast<int>(from + match.capturedStart());
+2 -1
View File
@@ -11,6 +11,7 @@
#include <QJsonObject>
#include <QString>
#include <QStringList>
#include <QTimeZone>
#include <QUrl>
#include <QUrlQuery>
@@ -722,7 +723,7 @@ struct HelixShieldModeStatus {
, lastActivatedAt(QDateTime::fromString(
json["last_activated_at"].toString(), Qt::ISODate))
{
this->lastActivatedAt.setTimeSpec(Qt::UTC);
this->lastActivatedAt.setTimeZone(QTimeZone::utc());
}
};