Commit 4d5c1c5b authored by Laurent Montel's avatar Laurent Montel 😁

Port deprecated method

parent b8406259
......@@ -87,7 +87,11 @@ QQmlContext* PreviewPlugin::context()
void PreviewPlugin::highlight(const QTextDocument* doc) const
{
QTextCursor cursor;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
Q_FOREACH (const QString& text, highlight().split(QLatin1Char(' '), QString::SkipEmptyParts)) {
#else
Q_FOREACH (const QString& text, highlight().split(QLatin1Char(' '), Qt::SkipEmptyParts)) {
#endif
while (1) {
cursor = doc->find(text, cursor);
if (cursor.isNull())
......
......@@ -52,7 +52,11 @@ public:
~SortProxyModel() override = default;
void setQueryString(const QString &queryString) {
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList words = queryString.split(QLatin1Char(' '), QString::SkipEmptyParts);
#else
const QStringList words = queryString.split(QLatin1Char(' '), Qt::SkipEmptyParts);
#endif
if (m_words != words) {
m_words = words;
invalidate();
......
......@@ -272,7 +272,11 @@ void SourcesModel::slotMatchesChanged(const QList<Plasma::QueryMatch>& l)
// that do not
// The rest are given the same preference as given by the runners.
const QString simplifiedQuery = m_queryString.simplified();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const auto words = simplifiedQuery.splitRef(QLatin1Char(' '), QString::SkipEmptyParts);
#else
const auto words = simplifiedQuery.splitRef(QLatin1Char(' '), Qt::SkipEmptyParts);
#endif
QSet<QString> higherTypes;
foreach (const QString &type, m_types) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment