diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-15 11:27:15 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-05-15 11:27:38 +0200 |
commit | d353ec997f06891455dce9b51333687da670a03e (patch) | |
tree | 5e305f2c613782d028da3853bdb49aad5e12fa4c /framework | |
parent | a4156dec117a8ebc4e810b026c489f2c6b2ec48f (diff) | |
download | kube-d353ec997f06891455dce9b51333687da670a03e.tar.gz kube-d353ec997f06891455dce9b51333687da670a03e.zip |
Use QUrl for paths
so windows gets it as well
Diffstat (limited to 'framework')
-rw-r--r-- | framework/src/accounts/accountfactory.cpp | 4 | ||||
-rw-r--r-- | framework/src/accounts/accountfactory.h | 9 |
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); |
37 | public: | 38 | public: |
38 | explicit AccountFactory(QObject *parent = Q_NULLPTR); | 39 | explicit AccountFactory(QObject *parent = Q_NULLPTR); |
@@ -46,8 +47,8 @@ signals: | |||
46 | private: | 47 | private: |
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 | }; |