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:
2559307
)
minor Qt::convertFromPlainText() optimization
author
Ivailo Monev
<xakepa10@gmail.com>
Sun, 29 Aug 2021 15:49:36 +0000
(18:49 +0300)
committer
Ivailo Monev
<xakepa10@gmail.com>
Sun, 29 Aug 2021 15:49:36 +0000
(18:49 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/global/qglobal.cpp
patch
|
blob
|
history
diff --git
a/src/core/global/qglobal.cpp
b/src/core/global/qglobal.cpp
index
a84e1b2
..
9372e77
100644
(file)
--- a/
src/core/global/qglobal.cpp
+++ b/
src/core/global/qglobal.cpp
@@
-2126,8
+2126,7
@@
QString Qt::escape(const QString& plain)
QString Qt::convertFromPlainText(const QString &plain, Qt::WhiteSpaceMode mode)
{
int col = 0;
- QString rich;
- rich += QLatin1String("<p>");
+ QString rich(QLatin1String("<p>"));
for (int i = 0; i < plain.length(); ++i) {
if (plain[i] == QLatin1Char('\n')){
int c = 1;