mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
resolveColor() function optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
9e638071f3
commit
133e68f554
2 changed files with 3 additions and 2 deletions
|
@ -7102,7 +7102,8 @@ ownership of it, no memory is freed when instances are destroyed.
|
|||
\sa string()
|
||||
*/
|
||||
|
||||
QString QStringRef::toString() const {
|
||||
QString QStringRef::toString() const
|
||||
{
|
||||
if (!m_string)
|
||||
return QString();
|
||||
if (m_size && m_position == 0 && m_size == m_string->size())
|
||||
|
|
|
@ -704,7 +704,7 @@ static bool resolveColor(const QStringRef &colorStr, QColor &color, QSvgHandler
|
|||
return false;
|
||||
}
|
||||
|
||||
color = QColor(colorStrTr.toString());
|
||||
color.setNamedColor(colorStrTr.toString());
|
||||
return color.isValid();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue