From d4b8143d552ccd8adf196afccac32985ea4bb7cb Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Fri, 22 Jul 2016 16:34:41 +0100 Subject: [PATCH] Fix loading if KActivities is in state NotRunning Summary: Used to work, then patch f7ef6ee87b8957bebc976b6fc9e0df279cea05f1 changed it. Docs above edited code say: "it is valid for KAMD to not be running." This fixes that but keeps the objective of patch f7ef6ee, of delaying load() if we're still loading KAMD. Test Plan: Reviewers: #plasma Subscribers: --- shell/shellcorona.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp index 8b873aa8a..57ee10d2c 100644 --- a/shell/shellcorona.cpp +++ b/shell/shellcorona.cpp @@ -302,7 +302,7 @@ void ShellCorona::setShell(const QString &shell) connect(m_activityController, &KActivities::Controller::serviceStatusChanged, this, &ShellCorona::load, Qt::UniqueConnection); - if (m_activityController->serviceStatus() == KActivities::Controller::Running) { + if (m_activityController->serviceStatus() != KActivities::Controller::Unknown) { load(); } } @@ -332,7 +332,7 @@ static QList sortOutputs(const QList &outputs) void ShellCorona::load() { if (m_shell.isEmpty() || - m_activityController->serviceStatus() != KActivities::Controller::Running) { + m_activityController->serviceStatus() == KActivities::Controller::Unknown) { return; }