Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[nemo-qml-plugin-systemsettings] Don't queue multiple refreshes. Cont…
…ributes to JB#41856

Explicit checks from different places ended up queueing their own
refreshes. This should now combine into just one.
Calls while initial check is ongoing bump that into a normal check.
  • Loading branch information
pvuorela committed May 21, 2018
1 parent 24f7dea commit 87889c2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/developermodesettings.cpp
Expand Up @@ -55,9 +55,6 @@
/* A file that is provided by the developer mode package */
#define DEVELOPER_MODE_PROVIDED_FILE "/usr/bin/devel-su"

/* The service name for developer mode services offered by an account provider */
#define DEVELOPER_MODE_ACCOUNT_SERVICE "developermode"

/* D-Bus service */
#define USB_MODED_SERVICE "com.meego.usb_moded"
#define USB_MODED_PATH "/com/meego/usb_moded"
Expand Down Expand Up @@ -266,8 +263,15 @@ void DeveloperModeSettings::checkDeveloperModeStatus(bool initial)
{
if (!m_developerModeEnabled) {
Status oldStatus = m_workerStatus;
if (oldStatus != Idle && oldStatus != InitialCheckingStatus) {
qCWarning(lcDeveloperModeLog) << Q_FUNC_INFO << "called while action ongoing, ignoring.";
return;
}

m_workerStatus = initial ? InitialCheckingStatus : CheckingStatus;
resolveDeveloperModePackageId(NoCommand);
if (oldStatus == Idle) {
resolveDeveloperModePackageId(NoCommand);
}

if (oldStatus != m_workerStatus) {
emit workerStatusChanged();
Expand Down

0 comments on commit 87889c2

Please sign in to comment.