summaryrefslogtreecommitdiff
path: root/src/gui/kernel/qguivariant.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-08-19 10:09:50 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-09-23 16:36:44 +0000
commitc1b1e58de8be4d012b93d78e0ce2712b3b802d1a (patch)
tree92d84e019e16a246c72e6837cadc57a6cbece716 /src/gui/kernel/qguivariant.cpp
parent0be620ac58d43d2ad977944682b24ef1df3c21e0 (diff)
downloadqtbase-c1b1e58de8be4d012b93d78e0ce2712b3b802d1a.tar.gz
QGuiVariant: use new QColor::setNamedColor(QLatin1String)
Change-Id: If36f9f3c60ee5cea3082a973a4b8ea9d2de1b62f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/gui/kernel/qguivariant.cpp')
-rw-r--r--src/gui/kernel/qguivariant.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/kernel/qguivariant.cpp b/src/gui/kernel/qguivariant.cpp
index 4ae4b209ca..bde0d20ea8 100644
--- a/src/gui/kernel/qguivariant.cpp
+++ b/src/gui/kernel/qguivariant.cpp
@@ -260,8 +260,7 @@ static bool convert(const QVariant::Private *d, int t,
static_cast<QColor *>(result)->setNamedColor(*v_cast<QString>(d));
return static_cast<QColor *>(result)->isValid();
} else if (d->type == QVariant::ByteArray) {
- static_cast<QColor *>(result)->setNamedColor(QString::fromLatin1(
- *v_cast<QByteArray>(d)));
+ static_cast<QColor *>(result)->setNamedColor(QLatin1String(*v_cast<QByteArray>(d)));
return true;
} else if (d->type == QVariant::Brush) {
if (v_cast<QBrush>(d)->style() == Qt::SolidPattern) {