Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Krusader
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Utilities
Krusader
Commits
39444740
Commit
39444740
authored
Jun 04, 2020
by
Davide Gianforte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace deprecated QString::SkipEmptyParts
parent
cc8484d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
krusader/GUI/krremoteencodingmenu.cpp
krusader/GUI/krremoteencodingmenu.cpp
+2
-1
krusader/Konfigurator/kgdependencies.cpp
krusader/Konfigurator/kgdependencies.cpp
+2
-1
krusader/compat.h
krusader/compat.h
+14
-0
No files found.
krusader/GUI/krremoteencodingmenu.cpp
View file @
39444740
...
...
@@ -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
());
...
...
krusader/Konfigurator/kgdependencies.cpp
View file @
39444740
...
...
@@ -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
]);
...
...
krusader/compat.h
View file @
39444740
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment