@@ -23,26 +23,12 @@
2323
2424#include <QtQml/qqml.h>
2525
26−static QObject *system_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
27−{
28− Q_UNUSED(engine)
29− Q_UNUSED(scriptEngine)
30− return new MockSystem();
31−}
32−
33−static QObject *status_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
34−{
35− Q_UNUSED(engine)
36− Q_UNUSED(scriptEngine)
37− return new Status();
38−}
39−
4026void MockWizardPlugin::registerTypes(const char *uri)
4127{
4228 Q_ASSERT(uri == QLatin1String("Wizard"));
4329 qmlRegisterType<PageList>(uri, 0, 1, "PageList");
44− qmlRegisterSingletonType<MockSystem>(uri, 0, 1, "System", system_provider);
45− qmlRegisterSingletonType<Status>(uri, 0, 1, "Status", status_provider);
30+ qmlRegisterSingletonType<MockSystem>(uri, 0, 1, "System", [](QQmlEngine*, QJSEngine*) -> QObject* { return new MockSystem; });
31+ qmlRegisterSingletonType<Status>(uri, 0, 1, "Status", [](QQmlEngine*, QJSEngine*) -> QObject* { return new Status; });
4632 qmlRegisterType<TimeZoneModel>(uri, 0, 1, "TimeZoneModel");
4733 qmlRegisterType<TimeZoneFilterModel>(uri, 0, 1, "TimeZoneFilterModel");
4834 qmlRegisterType<LocalePlugin>(uri, 0, 1, "LocalePlugin");