From 825fa078e90bb961fe08602b8c84162022fef0d1 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 23 Aug 2017 00:09:08 -0600 Subject: Clear the account if we failed to load the plugin Otherwise the last plugin just remains. --- framework/src/accounts/accountfactory.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/src/accounts/accountfactory.cpp b/framework/src/accounts/accountfactory.cpp index c7f3855b..f1c4e29c 100644 --- a/framework/src/accounts/accountfactory.cpp +++ b/framework/src/accounts/accountfactory.cpp @@ -63,6 +63,10 @@ void AccountFactory::loadPackage() auto package = KPackage::PackageLoader::self()->loadPackage("KPackage/GenericQML", "org.kube.accounts." + mAccountType); if (!package.isValid()) { qWarning() << "Failed to load account package: " << "org.kube.accounts." + mAccountType; + mUiPath.clear(); + mName.clear(); + mIcon.clear(); + emit accountLoaded(); return; } Q_ASSERT(package.isValid()); -- cgit v1.2.3