OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c943213
)
convert latin1 strings via QIcuCodec::convertTo() from QString::fromLatin1()
author
Ivailo Monev
<xakepa10@gmail.com>
Fri, 17 Jun 2022 22:14:16 +0000
(
01:14
+0300)
committer
Ivailo Monev
<xakepa10@gmail.com>
Fri, 17 Jun 2022 22:14:16 +0000
(
01:14
+0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/tools/qstring.cpp
patch
|
blob
|
history
diff --git
a/src/core/tools/qstring.cpp
b/src/core/tools/qstring.cpp
index
c0e1b7c
..
2a3bc7b
100644
(file)
--- a/
src/core/tools/qstring.cpp
+++ b/
src/core/tools/qstring.cpp
@@
-3311,7
+3311,13
@@
QString::Data *QString::fromAscii_helper(const char *str, int size)
*/
QString QString::fromLatin1(const char *str, int size)
{
- return QString(fromLatin1_helper(str, size), 0);
+ if (!str) {
+ return QString();
+ }
+ if (size < 0) {
+ size = qstrlen(str);
+ }
+ return QIcuCodec::convertTo(str, size, "latin1");
}
/*!