chore: remove old Qt 5.12 code, update docs and FreeBSD runner (#5396)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2024-06-23 14:26:59 +02:00
committed by GitHub
parent 4421b6c90a
commit 189be8c68f
30 changed files with 35 additions and 138 deletions
@@ -37,7 +37,6 @@
#include "util/Helpers.hpp"
#include "util/IrcHelpers.hpp"
#include "util/QStringHash.hpp"
#include "util/Qt.hpp"
#include "widgets/Window.hpp"
#include <boost/variant.hpp>
@@ -382,13 +381,7 @@ namespace {
dst.reserve(newLength);
for (const QStringView &chunk : std::as_const(chunks))
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 2)
static_assert(sizeof(QChar) == sizeof(decltype(*chunk.utf16())));
dst.append(reinterpret_cast<const QChar *>(chunk.utf16()),
chunk.length());
#else
dst += chunk;
#endif
}
return dst;
}
@@ -1178,13 +1171,8 @@ void TwitchMessageBuilder::processIgnorePhrases(
shiftIndicesAfter(static_cast<int>(from + length),
static_cast<int>(replacement.length() - length));
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
auto midExtendedRef =
QStringView{originalMessage}.mid(wordStart, wordEnd - wordStart);
#else
auto midExtendedRef =
originalMessage.midRef(wordStart, wordEnd - wordStart);
#endif
for (auto &emote : removedEmotes)
{