mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
use cheaper character comparison in QColor::setNamedColor()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f204c15d1c
commit
af794f323f
1 changed files with 1 additions and 1 deletions
|
@ -694,7 +694,7 @@ bool QColor::setNamedColor(const QString &name)
|
|||
}
|
||||
|
||||
QByteArray latin = name.toLatin1();
|
||||
if (name.startsWith(QLatin1Char('#'))) {
|
||||
if (latin.startsWith('#')) {
|
||||
QRgb rgb;
|
||||
if (qt_get_hex_rgb(latin.constData(), latin.length(), &rgb)) {
|
||||
setRgb(rgb);
|
||||
|
|
Loading…
Add table
Reference in a new issue