summaryrefslogtreecommitdiffstats
path: root/framework/src
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src')
-rw-r--r--framework/src/accounts/accountfactory.cpp4
-rw-r--r--framework/src/accounts/accountfactory.h9
2 files changed, 7 insertions, 6 deletions
diff --git a/framework/src/accounts/accountfactory.cpp b/framework/src/accounts/accountfactory.cpp
index 5d3c35fc..7f3f046d 100644
--- a/framework/src/accounts/accountfactory.cpp
+++ b/framework/src/accounts/accountfactory.cpp
@@ -68,8 +68,8 @@ void AccountFactory::loadPackage()
68 if (pluginPath.isEmpty()) { 68 if (pluginPath.isEmpty()) {
69 qWarning() << "Failed to load account package: " << "org.kube.accounts." + mAccountType; 69 qWarning() << "Failed to load account package: " << "org.kube.accounts." + mAccountType;
70 } else { 70 } else {
71 mUiPath = pluginPath + "/AccountSettings.qml"; 71 mUiPath = QUrl::fromLocalFile(pluginPath + "/AccountSettings.qml");
72 mLoginUi = pluginPath + "/Login.qml"; 72 mLoginUi = QUrl::fromLocalFile(pluginPath + "/Login.qml");
73 if (QFileInfo::exists(pluginPath + "/metadata.json")) { 73 if (QFileInfo::exists(pluginPath + "/metadata.json")) {
74 QFile file{pluginPath + "/metadata.json"}; 74 QFile file{pluginPath + "/metadata.json"};
75 file.open(QIODevice::ReadOnly); 75 file.open(QIODevice::ReadOnly);
diff --git a/framework/src/accounts/accountfactory.h b/framework/src/accounts/accountfactory.h
index 34293bb2..10acfbc1 100644
--- a/framework/src/accounts/accountfactory.h
+++ b/framework/src/accounts/accountfactory.h
@@ -22,6 +22,7 @@
22#include "kube_export.h" 22#include "kube_export.h"
23#include <QObject> 23#include <QObject>
24#include <QVariant> 24#include <QVariant>
25#include <QUrl>
25 26
26/** 27/**
27 * A factory to instantiate account-plugins. 28 * A factory to instantiate account-plugins.
@@ -31,8 +32,8 @@ class KUBE_EXPORT AccountFactory : public QObject
31 Q_OBJECT 32 Q_OBJECT
32 Q_PROPERTY(QString accountId MEMBER mAccountId WRITE setAccountId); 33 Q_PROPERTY(QString accountId MEMBER mAccountId WRITE setAccountId);
33 Q_PROPERTY(QString accountType MEMBER mAccountType WRITE setAccountType); 34 Q_PROPERTY(QString accountType MEMBER mAccountType WRITE setAccountType);
34 Q_PROPERTY(QString uiPath MEMBER mUiPath NOTIFY accountLoaded); 35 Q_PROPERTY(QUrl uiPath MEMBER mUiPath NOTIFY accountLoaded);
35 Q_PROPERTY(QString loginUi MEMBER mLoginUi NOTIFY accountLoaded); 36 Q_PROPERTY(QUrl loginUi MEMBER mLoginUi NOTIFY accountLoaded);
36 Q_PROPERTY(bool requiresKeyring MEMBER mRequiresKeyring NOTIFY accountLoaded); 37 Q_PROPERTY(bool requiresKeyring MEMBER mRequiresKeyring NOTIFY accountLoaded);
37public: 38public:
38 explicit AccountFactory(QObject *parent = Q_NULLPTR); 39 explicit AccountFactory(QObject *parent = Q_NULLPTR);
@@ -46,8 +47,8 @@ signals:
46private: 47private:
47 void loadPackage(); 48 void loadPackage();
48 QString mAccountId; 49 QString mAccountId;
49 QString mUiPath; 50 QUrl mUiPath;
50 QString mLoginUi; 51 QUrl mLoginUi;
51 QByteArray mAccountType; 52 QByteArray mAccountType;
52 bool mRequiresKeyring = true; 53 bool mRequiresKeyring = true;
53}; 54};