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:
39b54d8
)
optimize QColor::name()
author
Ivailo Monev
<xakepa10@gmail.com>
Sat, 7 Aug 2021 13:46:24 +0000
(16:46 +0300)
committer
Ivailo Monev
<xakepa10@gmail.com>
Sat, 7 Aug 2021 13:46:24 +0000
(16:46 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/painting/qcolor.cpp
patch
|
blob
|
history
diff --git
a/src/gui/painting/qcolor.cpp
b/src/gui/painting/qcolor.cpp
index
116276e
..
7007020
100644
(file)
--- a/
src/gui/painting/qcolor.cpp
+++ b/
src/gui/painting/qcolor.cpp
@@
-26,6
+26,7
@@
#include "qdatastream.h"
#include "qvariant.h"
#include "qdebug.h"
+#include "qcorecommon_p.h"
#ifdef Q_WS_X11
# include "qapplication.h"
@@
-643,9
+644,9
@@
QColor::QColor(Spec spec)
QString QColor::name() const
{
- QS
tring s
;
-
s.sprintf(
"#%02x%02x%02x", red(), green(), blue());
- return
s
;
+ QS
TACKARRAY(char, sprintfbuf, 8)
;
+
::sprintf(sprintfbuf,
"#%02x%02x%02x", red(), green(), blue());
+ return
QString::fromLatin1(sprintfbuf)
;
}
/*!