Commit 074d6837 authored by David Faure's avatar David Faure

Answer the "Why?" question in the code.

parent d8e1adb3
......@@ -73,9 +73,8 @@ void AgentProgressMonitor::Private::instanceProgressChanged(const AgentInstance
return;
}
if (agent == instance) {
//Why ? agent = instance if agent == instance.
agent = instance;
if (agent == instance) { // compares identifiers
agent = instance; // keeps copy of current status
const int progress = agent.progress();
if (progress >= 0) {
item.data()->setProgress(progress);
......@@ -89,9 +88,8 @@ void AgentProgressMonitor::Private::instanceStatusChanged(const AgentInstance &i
return;
}
if (agent == instance) {
//Why ? agent = instance if agent == instance.
agent = instance;
if (agent == instance) { // compares identifiers
agent = instance; // keeps copy of current status
item.data()->setStatus(agent.statusMessage());
switch (agent.status()) {
case AgentInstance::Idle:
......
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