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:
700e6ce
)
prefer QColor::name() over QString::arg() cascade
author
Ivailo Monev
<xakepa10@gmail.com>
Sat, 7 Aug 2021 13:23:10 +0000
(16:23 +0300)
committer
Ivailo Monev
<xakepa10@gmail.com>
Sat, 7 Aug 2021 13:23:10 +0000
(16:23 +0300)
upstream commit:
https://github.com/qt/qtsvg/commit/
96d6354cf7e13797ab419ca9e74b89dd33f68ffe
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/svg/qsvggenerator.cpp
patch
|
blob
|
history
diff --git
a/src/svg/qsvggenerator.cpp
b/src/svg/qsvggenerator.cpp
index
d2c8cf7
..
f7308b6
100644
(file)
--- a/
src/svg/qsvggenerator.cpp
+++ b/
src/svg/qsvggenerator.cpp
@@
-45,11
+45,7
@@
static void translate_color(const QColor &color, QString *color_string,
Q_ASSERT(color_string);
Q_ASSERT(opacity_string);
- *color_string =
- QString::fromLatin1("#%1%2%3")
- .arg(color.red(), 2, 16, QLatin1Char('0'))
- .arg(color.green(), 2, 16, QLatin1Char('0'))
- .arg(color.blue(), 2, 16, QLatin1Char('0'));
+ *color_string = color.name();
*opacity_string = QString::number(color.alphaF());
}