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
PIM
KTnef
Commits
a5b64e68
Commit
a5b64e68
authored
Apr 29, 2021
by
Laurent Montel
Browse files
Use QstringView here
parent
c5189ba8
Pipeline
#60199
passed with stage
in 3 minutes and 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/formatter.cpp
View file @
a5b64e68
...
@@ -59,12 +59,13 @@ static QString sNamedProp(KTNEFMessage *tnefMsg, const QString &name, const QStr
...
@@ -59,12 +59,13 @@ static QString sNamedProp(KTNEFMessage *tnefMsg, const QString &name, const QStr
static
QDateTime
pureISOToLocalQDateTime
(
const
QString
&
dtStr
)
static
QDateTime
pureISOToLocalQDateTime
(
const
QString
&
dtStr
)
{
{
const
int
year
=
dtStr
.
leftRef
(
4
).
toInt
();
const
QStringView
dtView
{
dtStr
};
const
int
month
=
dtStr
.
midRef
(
4
,
2
).
toInt
();
const
int
year
=
dtView
.
left
(
4
).
toInt
();
const
int
day
=
dtStr
.
midRef
(
6
,
2
).
toInt
();
const
int
month
=
dtView
.
mid
(
4
,
2
).
toInt
();
const
int
hour
=
dtStr
.
midRef
(
9
,
2
).
toInt
();
const
int
day
=
dtView
.
mid
(
6
,
2
).
toInt
();
const
int
minute
=
dtStr
.
midRef
(
11
,
2
).
toInt
();
const
int
hour
=
dtView
.
mid
(
9
,
2
).
toInt
();
const
int
second
=
dtStr
.
midRef
(
13
,
2
).
toInt
();
const
int
minute
=
dtView
.
mid
(
11
,
2
).
toInt
();
const
int
second
=
dtView
.
mid
(
13
,
2
).
toInt
();
QDate
tmpDate
;
QDate
tmpDate
;
tmpDate
.
setDate
(
year
,
month
,
day
);
tmpDate
.
setDate
(
year
,
month
,
day
);
QTime
tmpTime
;
QTime
tmpTime
;
...
...
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