Fix Qt::SkipEmptyParts deprecation warning (#3726)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "messages/search/AuthorPredicate.hpp"
|
||||
|
||||
#include "util/Qt.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
AuthorPredicate::AuthorPredicate(const QStringList &authors)
|
||||
@@ -8,7 +10,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;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "messages/search/ChannelPredicate.hpp"
|
||||
|
||||
#include "util/Qt.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
ChannelPredicate::ChannelPredicate(const QStringList &channels)
|
||||
@@ -8,7 +10,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;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "messages/search/LinkPredicate.hpp"
|
||||
|
||||
#include "common/LinkParser.hpp"
|
||||
#include "util/Qt.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -9,8 +11,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;
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
#include "messages/search/MessageFlagsPredicate.hpp"
|
||||
|
||||
#include "util/Qt.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
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")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user