diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-23 00:09:08 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-23 00:09:08 -0600 |
commit | 825fa078e90bb961fe08602b8c84162022fef0d1 (patch) | |
tree | 15ba86ab2a09b32fee62bfc856fb08ff378b2116 | |
parent | 514337f3189ba455b782e758e917c1349d45dda5 (diff) | |
download | kube-825fa078e90bb961fe08602b8c84162022fef0d1.tar.gz kube-825fa078e90bb961fe08602b8c84162022fef0d1.zip |
Clear the account if we failed to load the plugin
Otherwise the last plugin just remains.
-rw-r--r-- | framework/src/accounts/accountfactory.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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() | |||
63 | auto package = KPackage::PackageLoader::self()->loadPackage("KPackage/GenericQML", "org.kube.accounts." + mAccountType); | 63 | auto package = KPackage::PackageLoader::self()->loadPackage("KPackage/GenericQML", "org.kube.accounts." + mAccountType); |
64 | if (!package.isValid()) { | 64 | if (!package.isValid()) { |
65 | qWarning() << "Failed to load account package: " << "org.kube.accounts." + mAccountType; | 65 | qWarning() << "Failed to load account package: " << "org.kube.accounts." + mAccountType; |
66 | mUiPath.clear(); | ||
67 | mName.clear(); | ||
68 | mIcon.clear(); | ||
69 | emit accountLoaded(); | ||
66 | return; | 70 | return; |
67 | } | 71 | } |
68 | Q_ASSERT(package.isValid()); | 72 | Q_ASSERT(package.isValid()); |