Fix Qt6 building (#4393)
This commit is contained in:
@@ -821,14 +821,14 @@ void TwitchMessageBuilder::runIgnoreReplaces(
|
||||
};
|
||||
|
||||
auto addReplEmotes = [&twitchEmotes](const IgnorePhrase &phrase,
|
||||
const QStringRef &midrepl,
|
||||
const auto &midrepl,
|
||||
int startIndex) mutable {
|
||||
if (!phrase.containsEmote())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QVector<QStringRef> words = midrepl.split(' ');
|
||||
auto words = midrepl.split(' ');
|
||||
int pos = 0;
|
||||
for (const auto &word : words)
|
||||
{
|
||||
@@ -843,7 +843,7 @@ void TwitchMessageBuilder::runIgnoreReplaces(
|
||||
}
|
||||
twitchEmotes.push_back(TwitchEmoteOccurrence{
|
||||
startIndex + pos,
|
||||
startIndex + pos + emote.first.string.length(),
|
||||
startIndex + pos + (int)emote.first.string.length(),
|
||||
emote.second,
|
||||
emote.first,
|
||||
});
|
||||
@@ -904,8 +904,13 @@ void TwitchMessageBuilder::runIgnoreReplaces(
|
||||
|
||||
shiftIndicesAfter(from + len, midsize - len);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
auto midExtendedRef =
|
||||
QStringView{this->originalMessage_}.mid(pos1, pos2 - pos1);
|
||||
#else
|
||||
auto midExtendedRef =
|
||||
this->originalMessage_.midRef(pos1, pos2 - pos1);
|
||||
#endif
|
||||
|
||||
for (auto &tup : vret)
|
||||
{
|
||||
@@ -969,8 +974,13 @@ void TwitchMessageBuilder::runIgnoreReplaces(
|
||||
|
||||
shiftIndicesAfter(from + len, replacesize - len);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
auto midExtendedRef =
|
||||
QStringView{this->originalMessage_}.mid(pos1, pos2 - pos1);
|
||||
#else
|
||||
auto midExtendedRef =
|
||||
this->originalMessage_.midRef(pos1, pos2 - pos1);
|
||||
#endif
|
||||
|
||||
for (auto &tup : vret)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user