Commit 80eddd69 authored by Nicolas Fella's avatar Nicolas Fella Committed by Nate Graham
Browse files

Create an instance of Configuration per QML engine

When using the global instance there were errors about the CConfiguration having the wrong thread affinity
parent 802a3067
......@@ -65,11 +65,9 @@ void QmlPlugins::registerTypes(const char* uri)
// @uri org.kde.plasma.networkmanagement.MobileProxyModel
qmlRegisterType<MobileProxyModel>(uri, 0, 2, "MobileProxyModel");
QQmlEngine::setObjectOwnership(&Configuration::self(), QQmlEngine::CppOwnership);
qmlRegisterSingletonType<Configuration>(uri, 0, 2, "Configuration", [](QQmlEngine *engine, QJSEngine *scriptEngine) -> QObject * {
return &Configuration::self();
return new Configuration;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment