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:
1976447
)
pre-allocate result based on the converted domain in QString QUrl::fromAce()
author
Ivailo Monev
<xakepa10@gmail.com>
Sun, 24 Jan 2021 13:24:17 +0000
(15:24 +0200)
committer
Ivailo Monev
<xakepa10@gmail.com>
Sun, 24 Jan 2021 13:24:17 +0000
(15:24 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/io/qurl.cpp
patch
|
blob
|
history
diff --git
a/src/core/io/qurl.cpp
b/src/core/io/qurl.cpp
index
9c1c4c5
..
0e6fcb4
100644
(file)
--- a/
src/core/io/qurl.cpp
+++ b/
src/core/io/qurl.cpp
@@
-3497,7
+3497,7
@@
QString QUrl::fromAce(const QByteArray &domain)
const QString utf8 = QString::fromUtf8(domain);
UErrorCode error = U_ZERO_ERROR;
UIDNAInfo info = UIDNA_INFO_INITIALIZER;
- QString result(
domain
.size() * 4, Qt::Uninitialized);
+ QString result(
utf8
.size() * 4, Qt::Uninitialized);
const int idnaresult = uidna_nameToUnicode(globalidna,
reinterpret_cast<const UChar*>(utf8.unicode()), utf8.size(),
reinterpret_cast<UChar*>(result.data()), result.size(),