]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Port to non-deprecated QString::split() variant
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Wed, 14 Oct 2020 21:26:05 +0000 (23:26 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Wed, 14 Oct 2020 23:22:00 +0000 (01:22 +0200)
This requires Qt 5.14, which we now depend on.

src/kitemviews/kfileitemmodel.cpp
src/views/dolphinremoteencoding.cpp

index 28376c5d0c3c0ef841589b049661f42358fbc551..a3a2bef32d959c414a00d6a620b7d7b2fa99070f 100644 (file)
@@ -626,7 +626,7 @@ void KFileItemModel::expandParentDirectories(const QUrl &url)
     // first subdir can be empty, if m_dirLister->url().path() does not end with '/'
     // this happens if baseUrl is not root but a home directory, see FoldersPanel,
     // so using QString::SkipEmptyParts
-    const QStringList subDirs = url.path().mid(pos).split(QDir::separator(), QString::SkipEmptyParts);
+    const QStringList subDirs = url.path().mid(pos).split(QDir::separator(), Qt::SkipEmptyParts);
     for (int i = 0; i < subDirs.count() - 1; ++i) {
         QString path = urlToExpand.path();
         if (!path.endsWith(QLatin1Char('/'))) {
index 4f006df5991a9c0854124027ba86bde588e69d07..fee3db1c190da13bee2c6d4b7b8e925ab34e812e 100644 (file)
@@ -175,7 +175,7 @@ void DolphinRemoteEncoding::slotDefault()
     // settings here since it affects what will be matched.
     KConfig config(("kio_" + m_currentURL.scheme() + "rc").toLatin1());
 
-    QStringList partList = m_currentURL.host().split('.', QString::SkipEmptyParts);
+    QStringList partList = m_currentURL.host().split('.', Qt::SkipEmptyParts);
     if (!partList.isEmpty()) {
         partList.erase(partList.begin());