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
KAlarm
Commits
8b9852af
Commit
8b9852af
authored
Aug 26, 2019
by
Laurent Montel
Browse files
Use QLatin1String overload for QString::operator ==/!=
parent
bdd4624f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kadatetime.cpp
View file @
8b9852af
...
...
@@ -1593,16 +1593,16 @@ QString KADateTime::toString(const QString &format) const
case
'P'
:
{
// am/pm
bool
am
=
(
d
->
time
().
hour
()
<
12
);
QString
text
=
am
?
locale
.
amText
()
:
locale
.
pmText
();
if
(
text
==
QString
Literal
(
"a.m."
))
text
=
QStringLiteral
(
"am"
);
else
if
(
text
==
QString
Literal
(
"p.m."
))
text
=
QStringLiteral
(
"pm"
);
if
(
text
==
Q
Latin1
String
(
"a.m."
))
text
=
QStringLiteral
(
"am"
);
else
if
(
text
==
Q
Latin1
String
(
"p.m."
))
text
=
QStringLiteral
(
"pm"
);
result
+=
text
.
toLower
();
break
;
}
case
'p'
:
{
// AM/PM
bool
am
=
(
d
->
time
().
hour
()
<
12
);
QString
text
=
am
?
locale
.
amText
()
:
locale
.
pmText
();
if
(
text
==
QString
Literal
(
"a.m."
))
text
=
QStringLiteral
(
"am"
);
else
if
(
text
==
QString
Literal
(
"p.m."
))
text
=
QStringLiteral
(
"pm"
);
if
(
text
==
Q
Latin1
String
(
"a.m."
))
text
=
QStringLiteral
(
"am"
);
else
if
(
text
==
Q
Latin1
String
(
"p.m."
))
text
=
QStringLiteral
(
"pm"
);
result
+=
text
.
toUpper
();
break
;
}
...
...
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