forked from qt-creator/qt-creator
QmlDesigner: Clean up singleton generation
The singleton is of type QmlDesigner::Theme and there is no reason for the QObject cast. Change-Id: I352f3e455de8233c914f37ba93e2313a3a6357fe Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -127,9 +127,9 @@ QString Theme::replaceCssColors(const QString &input)
|
||||
|
||||
void Theme::setupTheme(QQmlEngine *engine)
|
||||
{
|
||||
static const int typeIndex = qmlRegisterSingletonType<Utils::Theme>("QtQuickDesignerTheme", 1, 0,
|
||||
"Theme", [](QQmlEngine *, QJSEngine *) {
|
||||
return qobject_cast<QObject*>(new Theme(Utils::creatorTheme(), nullptr));
|
||||
static const int typeIndex = qmlRegisterSingletonType<Theme>(
|
||||
"QtQuickDesignerTheme", 1, 0, "Theme", [](QQmlEngine *engine, QJSEngine *) {
|
||||
return new Theme(Utils::creatorTheme(), nullptr);
|
||||
});
|
||||
Q_UNUSED(typeIndex)
|
||||
|
||||
|
Reference in New Issue
Block a user