Commit 13f988fe authored by Tomi Leppänen's avatar Tomi Leppänen

Allow enabling developer mode from local package.

[developermode] Implement installing from local package. Contributes to JB#47559

This allows enabling developer mode from local package and thus doesn't
require Internet or repository access. The package must not have
non-preinstalled requirements. Before installing version in package file
name is checked against -preload subpackage.

[developermode] Add repositoryAccessRequired property. Contributes to JB#47056

Repository access may be required if the local package does not exist or
it can not be installed for some reason. In that case developer mode
settings page must ask for repository access (usually some kind of
account).
parent ceaca903
...@@ -4,7 +4,7 @@ Version: 0.5.27 ...@@ -4,7 +4,7 @@ Version: 0.5.27
Release: 1 Release: 1
Group: System/Libraries Group: System/Libraries
License: BSD License: BSD
URL: https://git.merproject.org/mer-core/nemo-qml-plugin-systemsettings URL: https://git.sailfishos.org/mer-core/nemo-qml-plugin-systemsettings
Source0: %{name}-%{version}.tar.bz2 Source0: %{name}-%{version}.tar.bz2
Requires(post): /sbin/ldconfig Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig Requires(postun): /sbin/ldconfig
......
This diff is collapsed.
...@@ -55,6 +55,7 @@ class SYSTEMSETTINGS_EXPORT DeveloperModeSettings : public QObject ...@@ -55,6 +55,7 @@ class SYSTEMSETTINGS_EXPORT DeveloperModeSettings : public QObject
Q_PROPERTY(bool developerModeEnabled READ developerModeEnabled NOTIFY developerModeEnabledChanged) Q_PROPERTY(bool developerModeEnabled READ developerModeEnabled NOTIFY developerModeEnabledChanged)
Q_PROPERTY(enum DeveloperModeSettings::Status workStatus READ workStatus NOTIFY workStatusChanged) Q_PROPERTY(enum DeveloperModeSettings::Status workStatus READ workStatus NOTIFY workStatusChanged)
Q_PROPERTY(int workProgress READ workProgress NOTIFY workProgressChanged) Q_PROPERTY(int workProgress READ workProgress NOTIFY workProgressChanged)
Q_PROPERTY(bool repositoryAccessRequired READ repositoryAccessRequired NOTIFY repositoryAccessRequiredChanged)
public: public:
explicit DeveloperModeSettings(QObject *parent = NULL); explicit DeveloperModeSettings(QObject *parent = NULL);
...@@ -74,6 +75,7 @@ public: ...@@ -74,6 +75,7 @@ public:
bool developerModeEnabled() const; bool developerModeEnabled() const;
enum DeveloperModeSettings::Status workStatus() const; enum DeveloperModeSettings::Status workStatus() const;
int workProgress() const; int workProgress() const;
bool repositoryAccessRequired() const;
Q_INVOKABLE void setDeveloperMode(bool enabled); Q_INVOKABLE void setDeveloperMode(bool enabled);
Q_INVOKABLE void setUsbIpAddress(const QString &usbIpAddress); Q_INVOKABLE void setUsbIpAddress(const QString &usbIpAddress);
...@@ -85,6 +87,7 @@ signals: ...@@ -85,6 +87,7 @@ signals:
void developerModeEnabledChanged(); void developerModeEnabledChanged();
void workStatusChanged(); void workStatusChanged();
void workProgressChanged(); void workProgressChanged();
void repositoryAccessRequiredChanged();
private slots: private slots:
void reportTransactionErrorCode(PackageKit::Transaction::Error code, const QString &details); void reportTransactionErrorCode(PackageKit::Transaction::Error code, const QString &details);
...@@ -117,6 +120,8 @@ private: ...@@ -117,6 +120,8 @@ private:
PackageKit::Transaction::Role m_transactionRole; PackageKit::Transaction::Role m_transactionRole;
PackageKit::Transaction::Status m_transactionStatus; PackageKit::Transaction::Status m_transactionStatus;
bool m_refreshedForInstall; bool m_refreshedForInstall;
bool m_localInstallFailed;
QString m_localDeveloperModePackagePath;
}; };
Q_DECLARE_METATYPE(DeveloperModeSettings::Status) Q_DECLARE_METATYPE(DeveloperModeSettings::Status)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment