Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Ark
Commits
acaa9962
Commit
acaa9962
authored
Oct 06, 2022
by
Kai Uwe Broulik
🍇
Browse files
Port clijplugin from QStringRef
It's gone in Qt 6.
parent
35b64dea
Pipeline
#242761
passed with stage
in 3 minutes and 36 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
plugins/cliarjplugin/cliplugin.cpp
View file @
acaa9962
...
...
@@ -9,6 +9,7 @@
#include
<QDateTime>
#include
<QFileInfo>
#include
<QStringView>
#include
<KLocalizedString>
#include
<KPluginFactory>
...
...
@@ -246,17 +247,29 @@ bool CliPlugin::tryAddCurFileProperties(const QString &line)
return
false
;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_currentParsedFile
->
m_origSize
=
line
.
midRef
(
13
,
10
).
toULongLong
(
&
ok
);
#else
m_currentParsedFile
->
m_origSize
=
QStringView
(
line
).
mid
(
13
,
10
).
toULongLong
(
&
ok
);
#endif
if
(
!
ok
)
{
return
false
;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_currentParsedFile
->
m_compressedSize
=
line
.
midRef
(
24
,
10
).
toULongLong
(
&
ok
);
#else
m_currentParsedFile
->
m_compressedSize
=
QStringView
(
line
).
mid
(
24
,
10
).
toULongLong
(
&
ok
);
#endif
if
(
!
ok
)
{
return
false
;
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_currentParsedFile
->
m_ratio
=
line
.
midRef
(
35
,
5
).
toDouble
(
&
ok
);
#else
m_currentParsedFile
->
m_ratio
=
QStringView
(
line
).
mid
(
35
,
5
).
toDouble
(
&
ok
);
#endif
if
(
!
ok
)
{
return
false
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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