From 2a60a0723257cfd6855233b9af27dc9735915435 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 22 Sep 2017 10:23:44 +0200 Subject: Keyring fixes * Avoid double free * track unlocked state * Ensure we bring up the login screen on startup and after saving the configuration. --- framework/src/frameworkplugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'framework/src/frameworkplugin.cpp') diff --git a/framework/src/frameworkplugin.cpp b/framework/src/frameworkplugin.cpp index 1e1a169e..c4f7e85d 100644 --- a/framework/src/frameworkplugin.cpp +++ b/framework/src/frameworkplugin.cpp @@ -60,7 +60,9 @@ static QObject *keyring_singletontype_provider(QQmlEngine *engine, QJSEngine *sc { Q_UNUSED(engine) Q_UNUSED(scriptEngine) - return new Kube::Keyring; + auto instance = Kube::Keyring::instance(); + QQmlEngine::setObjectOwnership(instance, QQmlEngine::CppOwnership); + return instance; } void FrameworkPlugin::registerTypes (const char *uri) -- cgit v1.2.3