QmlJS: Fix palette support

Fixes false positive warnings of having no members
and allows to auto-complete its members.

Fixes: QTCREATORBUG-23659
Change-Id: I4da43b9d3f005f9c6cc759ec424bf67062beff78
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Christian Stenger
2020-04-22 16:06:07 +02:00
parent 63db0f271f
commit 20b095c6b4
3 changed files with 31 additions and 0 deletions

View File

@@ -395,6 +395,8 @@ const Value *CppComponentValue::valueForCppName(const QString &typeName) const
return valueOwner()->realValue();
} else if (typeName == QLatin1String("QFont")) {
return valueOwner()->qmlFontObject();
} else if (typeName == QLatin1String("QPalette")) {
return valueOwner()->qmlPaletteObject();
} else if (typeName == QLatin1String("QPoint")
|| typeName == QLatin1String("QPointF")
|| typeName == QLatin1String("QVector2D")) {