Commit 39444740 authored by Davide Gianforte's avatar Davide Gianforte

replace deprecated QString::SkipEmptyParts

parent cc8484d9
......@@ -36,6 +36,7 @@
#include <KIOCore/KProtocolManager>
#include "../krglobal.h"
#include "../compat.h"
#include "../icon.h"
#include "../Panel/krpanel.h"
#include "../Panel/panelfunc.h"
......@@ -182,7 +183,7 @@ void KrRemoteEncodingMenu::chooseDefault()
// settings here since it affects what will be matched.
KConfig config(("kio_" + currentURL.scheme() + "rc").toLatin1());
QStringList partList = currentURL.host().split('.', QString::SkipEmptyParts);
QStringList partList = currentURL.host().split('.', SKIP_EMPTY_PARTS);
if (!partList.isEmpty()) {
partList.erase(partList.begin());
......
......@@ -21,6 +21,7 @@
#include "kgdependencies.h"
#include "../krservices.h"
#include "../krglobal.h"
#include "../compat.h"
// QtCore
#include <QUrl>
......@@ -127,7 +128,7 @@ void KgDependencies::addApplication(const QString& name, QGridLayout *grid, int
QString defaultValue = KrServices::fullPathName(name);
if (defaultValue.isEmpty()) {
QStringList list = additionalList.split(',', QString::SkipEmptyParts);
QStringList list = additionalList.split(',', SKIP_EMPTY_PARTS);
for (int i = 0; i != list.count(); i++)
if (!KrServices::fullPathName(list[ i ]).isEmpty()) {
defaultValue = KrServices::fullPathName(list[ i ]);
......
......@@ -28,6 +28,20 @@
#define UDS_ENTRY_INSERT(A, B) UDSEntry::insert((A), (B));
#endif
/**
* QString::split(QChar sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs = Qt::CaseSensitive)
* was made obsoleted in QT 5.15 in favor of the namespaced Qt::endl
*
* https://doc.qt.io/qt-5.15/qstring-obsolete.html#split-2
*
* This can be removed when the qt minimum version required will be >= 5.15
*/
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
#define SKIP_EMPTY_PARTS Qt::SkipEmptyParts
#else
#define SKIP_EMPTY_PARTS QString::SkipEmptyParts
#endif
/**
* QTextSteam::endl() was made obsoleted in QT 5.15 in
* favor of the namespaced Qt::endl
......
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