Commit b33dd4a4 authored by Andrew den Exter's avatar Andrew den Exter Committed by Bea Lam

Remove the workerWorking property.

parent e1e8189f
......@@ -198,12 +198,6 @@ DeveloperModeSettings::remoteLoginEnabled() const
return m_remoteLoginEnabled;
}
bool
DeveloperModeSettings::workerWorking() const
{
return m_workerStatus == Installing || m_workerStatus == Removing;
}
enum DeveloperModeSettings::Status
DeveloperModeSettings::workerStatus() const
{
......@@ -237,7 +231,6 @@ DeveloperModeSettings::setDeveloperMode(bool enabled)
m_packageKitCommand = nullptr;
}
emit workerStatusChanged();
emit workerWorkingChanged();
}
}
......@@ -428,17 +421,15 @@ void DeveloperModeSettings::executePackageKitCommand(
if (!reply.isValid()) {
qWarning() << "Failed to call PackageKit method" << reply.error().message();
m_workerStatus = Failure;
m_workerStatus = Idle;
emit workerStatusChanged();
emit workerWorkingChanged();
}
});
} else {
qWarning() << "Failed to create PackageKit transaction" << reply.error().message();
m_workerStatus = Failure;
m_workerStatus = Idle;
emit workerStatusChanged();
emit workerWorkingChanged();
}
});
}
......@@ -460,22 +451,6 @@ void DeveloperModeSettings::transactionPackage(uint, const QString &packageId)
}
}
void DeveloperModeSettings::transactionResolveFinished(uint exit, uint)
{
if (exit != 1) {
m_packageKitTransaction = QDBusObjectPath();
m_workerStatus = m_packageKitCommand ? Failure : Idle;
m_workerProgress = PROGRESS_INDETERMINATE;
m_packageKitCommand = nullptr;
emit workerStatusChanged();
emit workerWorkingChanged();
emit workerProgressChanged();
}
}
void DeveloperModeSettings::transactionItemProgress(const QString &, uint, uint progress)
{
// Ignore package and status. Progress will proceed from 0 to 100 multiple times.
......@@ -503,13 +478,12 @@ void DeveloperModeSettings::transactionFinished(uint exit, uint)
const bool enabled = m_developerModeEnabled;
m_developerModeEnabled = QFile::exists(DEVELOPER_MODE_PROVIDED_FILE);
m_workerStatus = exit == 1 ? Success : Failure;
m_workerStatus = Idle;
m_workerProgress = PROGRESS_INDETERMINATE;
if (m_developerModeEnabled != enabled) {
emit developerModeEnabledChanged();
}
emit workerStatusChanged();
emit workerWorkingChanged();
emit workerProgressChanged();
}
......@@ -72,10 +72,6 @@ class SYSTEMSETTINGS_EXPORT DeveloperModeSettings : public QObject
READ remoteLoginEnabled
NOTIFY remoteLoginEnabledChanged)
Q_PROPERTY(bool workerWorking
READ workerWorking
NOTIFY workerWorkingChanged)
Q_PROPERTY(enum DeveloperModeSettings::Status workerStatus
READ workerStatus
NOTIFY workerStatusChanged)
......@@ -92,9 +88,7 @@ public:
Idle = 0,
CheckingStatus,
Installing,
Removing,
Success,
Failure,
Removing
};
QString wlanIpAddress() const;
......@@ -103,7 +97,6 @@ public:
bool developerModeAvailable() const;
bool developerModeEnabled() const;
bool remoteLoginEnabled() const;
bool workerWorking() const;
enum DeveloperModeSettings::Status workerStatus() const;
int workerProgress() const;
......@@ -124,7 +117,6 @@ signals:
private slots:
void transactionPackage(uint info, const QString &packageId);
void transactionResolveFinished(uint exit, uint runtime);
void transactionItemProgress(const QString &package, uint status, uint progress);
void transactionErrorCode(uint code, const QString &message);
void transactionFinished(uint exit, uint runtime);
......
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