mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Update to Qt::SkipEmptyParts
This commit is contained in:
parent
1520398984
commit
0933d68111
|
@ -182,7 +182,7 @@ bool appendWhisperMessageWordsLocally(const QStringList &words)
|
|||
bool appendWhisperMessageStringLocally(const QString &textNoEmoji)
|
||||
{
|
||||
QString text = getApp()->emotes->emojis.replaceShortCodes(textNoEmoji);
|
||||
QStringList words = text.split(' ', QString::SkipEmptyParts);
|
||||
QStringList words = text.split(' ', Qt::SkipEmptyParts);
|
||||
|
||||
if (words.length() == 0)
|
||||
{
|
||||
|
@ -832,7 +832,7 @@ QString CommandController::execCommand(const QString &textNoEmoji,
|
|||
ChannelPtr channel, bool dryRun)
|
||||
{
|
||||
QString text = getApp()->emotes->emojis.replaceShortCodes(textNoEmoji);
|
||||
QStringList words = text.split(' ', QString::SkipEmptyParts);
|
||||
QStringList words = text.split(' ', Qt::SkipEmptyParts);
|
||||
|
||||
if (words.length() == 0)
|
||||
{
|
||||
|
@ -866,7 +866,7 @@ QString CommandController::execCommand(const QString &textNoEmoji,
|
|||
text = getApp()->emotes->emojis.replaceShortCodes(
|
||||
this->execCustomCommand(words, it.value(), dryRun));
|
||||
|
||||
words = text.split(' ', QString::SkipEmptyParts);
|
||||
words = text.split(' ', Qt::SkipEmptyParts);
|
||||
|
||||
if (words.length() == 0)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ AuthorPredicate::AuthorPredicate(const QStringList &authors)
|
|||
// Check if any comma-seperated values were passed and transform those
|
||||
for (const auto &entry : authors)
|
||||
{
|
||||
for (const auto &author : entry.split(',', QString::SkipEmptyParts))
|
||||
for (const auto &author : entry.split(',', Qt::SkipEmptyParts))
|
||||
{
|
||||
this->authors_ << author;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ ChannelPredicate::ChannelPredicate(const QStringList &channels)
|
|||
// Check if any comma-seperated values were passed and transform those
|
||||
for (const auto &entry : channels)
|
||||
{
|
||||
for (const auto &channel : entry.split(',', QString::SkipEmptyParts))
|
||||
for (const auto &channel : entry.split(',', Qt::SkipEmptyParts))
|
||||
{
|
||||
this->channels_ << channel;
|
||||
}
|
||||
|
|
|
@ -9,8 +9,7 @@ LinkPredicate::LinkPredicate()
|
|||
|
||||
bool LinkPredicate::appliesTo(const Message &message)
|
||||
{
|
||||
for (const auto &word :
|
||||
message.messageText.split(' ', QString::SkipEmptyParts))
|
||||
for (const auto &word : message.messageText.split(' ', Qt::SkipEmptyParts))
|
||||
{
|
||||
if (LinkParser(word).hasMatch())
|
||||
return true;
|
||||
|
|
|
@ -6,7 +6,7 @@ MessageFlagsPredicate::MessageFlagsPredicate(const QString &flags)
|
|||
: flags_()
|
||||
{
|
||||
// Check if any comma-seperated values were passed and transform those
|
||||
for (const auto &flag : flags.split(',', QString::SkipEmptyParts))
|
||||
for (const auto &flag : flags.split(',', Qt::SkipEmptyParts))
|
||||
{
|
||||
if (flag == "deleted" || flag == "disabled")
|
||||
{
|
||||
|
|
|
@ -167,7 +167,7 @@ std::vector<std::unique_ptr<MessagePredicate>> SearchPopup::parsePredicates(
|
|||
static QRegularExpression predicateRegex(R"(^(\w+):([\w,]+)$)");
|
||||
|
||||
std::vector<std::unique_ptr<MessagePredicate>> predicates;
|
||||
auto words = input.split(' ', QString::SkipEmptyParts);
|
||||
auto words = input.split(' ', Qt::SkipEmptyParts);
|
||||
QStringList authors;
|
||||
QStringList channels;
|
||||
|
||||
|
|
|
@ -59,9 +59,9 @@ CommandPage::CommandPage()
|
|||
QObject::connect(button, &QPushButton::clicked, this, [] {
|
||||
QFile c1settings = c1settingsPath();
|
||||
c1settings.open(QIODevice::ReadOnly);
|
||||
for (auto line : QString(c1settings.readAll())
|
||||
.split(QRegularExpression("[\r\n]"),
|
||||
QString::SkipEmptyParts))
|
||||
for (auto line :
|
||||
QString(c1settings.readAll())
|
||||
.split(QRegularExpression("[\r\n]"), Qt::SkipEmptyParts))
|
||||
{
|
||||
if (int index = line.indexOf(' '); index != -1)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue