Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Akonadi Search
Commits
29af5fb8
Commit
29af5fb8
authored
Feb 20, 2022
by
Laurent Montel
😁
Browse files
Make it compile against qt6
parent
7d91678f
Pipeline
#140127
failed with stage
in 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
agent/tests/emailtest.cpp
View file @
29af5fb8
...
...
@@ -163,25 +163,41 @@ void App::slotIndexed()
QString
rchar
(
QStringLiteral
(
"rchar: "
));
if
(
str
.
startsWith
(
rchar
))
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ulong
amt
=
str
.
midRef
(
rchar
.
size
()).
toULong
();
#else
ulong
amt
=
QStringView
(
str
).
mid
(
rchar
.
size
()).
toULong
();
#endif
qDebug
()
<<
"Read:"
<<
amt
/
1024
<<
"kb"
;
}
QString
wchar
(
QStringLiteral
(
"wchar: "
));
if
(
str
.
startsWith
(
wchar
))
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ulong
amt
=
str
.
midRef
(
wchar
.
size
()).
toULong
();
#else
ulong
amt
=
QStringView
(
str
).
mid
(
wchar
.
size
()).
toULong
();
#endif
qDebug
()
<<
"Write:"
<<
amt
/
1024
<<
"kb"
;
}
QString
read
(
QStringLiteral
(
"read_bytes: "
));
if
(
str
.
startsWith
(
read
))
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ulong
amt
=
str
.
midRef
(
read
.
size
()).
toULong
();
#else
ulong
amt
=
QStringView
(
str
).
mid
(
read
.
size
()).
toULong
();
#endif
qDebug
()
<<
"Actual Reads:"
<<
amt
/
1024
<<
"kb"
;
}
QString
write
(
QStringLiteral
(
"write_bytes: "
));
if
(
str
.
startsWith
(
write
))
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ulong
amt
=
str
.
midRef
(
write
.
size
()).
toULong
();
#else
ulong
amt
=
QStringView
(
str
).
mid
(
write
.
size
()).
toULong
();
#endif
qDebug
()
<<
"Actual Writes:"
<<
amt
/
1024
<<
"kb"
;
}
}
...
...
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