summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/src/CMakeLists.txt3
-rw-r--r--framework/src/accounts/accountfactory.cpp18
2 files changed, 13 insertions, 8 deletions
diff --git a/framework/src/CMakeLists.txt b/framework/src/CMakeLists.txt
index 09a4c22d..9d4e238e 100644
--- a/framework/src/CMakeLists.txt
+++ b/framework/src/CMakeLists.txt
@@ -12,9 +12,6 @@ set(CMAKE_CXX_VISIBILITY_PRESET default)
12 12
13include_directories(. domain/mime/mimetreeparser domain/ domain/mime) 13include_directories(. domain/mime/mimetreeparser domain/ domain/mime)
14 14
15set(SRCS
16)
17
18add_library(kubeframework SHARED 15add_library(kubeframework SHARED
19 settings/settings.cpp 16 settings/settings.cpp
20 domain/maillistmodel.cpp 17 domain/maillistmodel.cpp
diff --git a/framework/src/accounts/accountfactory.cpp b/framework/src/accounts/accountfactory.cpp
index 2babeb5d..5d3c35fc 100644
--- a/framework/src/accounts/accountfactory.cpp
+++ b/framework/src/accounts/accountfactory.cpp
@@ -21,6 +21,8 @@
21#include <QDebug> 21#include <QDebug>
22#include <QtQml> 22#include <QtQml>
23#include <QFileInfo> 23#include <QFileInfo>
24#include <QJsonDocument>
25#include <QFile>
24 26
25#include <sink/store.h> 27#include <sink/store.h>
26 28
@@ -60,16 +62,22 @@ void AccountFactory::loadPackage()
60 } 62 }
61 return QString{}; 63 return QString{};
62 }(); 64 }();
65 mUiPath.clear();
66 mLoginUi.clear();
67 mRequiresKeyring = false;
63 if (pluginPath.isEmpty()) { 68 if (pluginPath.isEmpty()) {
64 qWarning() << "Failed to load account package: " << "org.kube.accounts." + mAccountType; 69 qWarning() << "Failed to load account package: " << "org.kube.accounts." + mAccountType;
65 mUiPath.clear();
66 mLoginUi.clear();
67 mRequiresKeyring = true;
68 } else { 70 } else {
69 mUiPath = pluginPath + "/AccountSettings.qml"; 71 mUiPath = pluginPath + "/AccountSettings.qml";
70 mLoginUi = pluginPath + "/Login.qml"; 72 mLoginUi = pluginPath + "/Login.qml";
71 //FIXME 73 if (QFileInfo::exists(pluginPath + "/metadata.json")) {
72 mRequiresKeyring = true; 74 QFile file{pluginPath + "/metadata.json"};
75 file.open(QIODevice::ReadOnly);
76 auto json = QJsonDocument::fromJson(file.readAll());
77 mRequiresKeyring = json.object().value("RequiresKeyring").toBool(true);
78 } else {
79 mRequiresKeyring = true;
80 }
73 } 81 }
74 emit accountLoaded(); 82 emit accountLoaded();
75} 83}