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
parent ceaca903
......@@ -4,7 +4,7 @@ Version: 0.5.27
Release: 1
Group: System/Libraries
License: BSD
Source0: %{name}-%{version}.tar.bz2
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
This diff is collapsed.
......@@ -55,6 +55,7 @@ class SYSTEMSETTINGS_EXPORT DeveloperModeSettings : public QObject
Q_PROPERTY(bool developerModeEnabled READ developerModeEnabled NOTIFY developerModeEnabledChanged)
Q_PROPERTY(enum DeveloperModeSettings::Status workStatus READ workStatus NOTIFY workStatusChanged)
Q_PROPERTY(int workProgress READ workProgress NOTIFY workProgressChanged)
Q_PROPERTY(bool repositoryAccessRequired READ repositoryAccessRequired NOTIFY repositoryAccessRequiredChanged)
explicit DeveloperModeSettings(QObject *parent = NULL);
......@@ -74,6 +75,7 @@ public:
bool developerModeEnabled() const;
enum DeveloperModeSettings::Status workStatus() const;
int workProgress() const;
bool repositoryAccessRequired() const;
Q_INVOKABLE void setDeveloperMode(bool enabled);
Q_INVOKABLE void setUsbIpAddress(const QString &usbIpAddress);
......@@ -85,6 +87,7 @@ signals:
void developerModeEnabledChanged();
void workStatusChanged();
void workProgressChanged();
void repositoryAccessRequiredChanged();
private slots:
void reportTransactionErrorCode(PackageKit::Transaction::Error code, const QString &details);
......@@ -117,6 +120,8 @@ private:
PackageKit::Transaction::Role m_transactionRole;
PackageKit::Transaction::Status m_transactionStatus;
bool m_refreshedForInstall;
bool m_localInstallFailed;
QString m_localDeveloperModePackagePath;
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