Quantcast
Channel: PowerDevil activity
Viewing all articles
Browse latest Browse all 2193

Jakob Petsovits commented on merge request !583 at Plasma / PowerDevil

$
0
0

I don't quite understand how this makes things work.

BatteryController has its own internal m_acAdapterState, which is what m_batteryController->acAdapterState() returns. Whenever that m_acAdapterState is changed, BatteryController immediately follows up with Q_EMIT acAdapterStateChanged(m_acAdapterState);.

Then in Core::onAcAdapterStateChanged(), you set m_lastSeenAcAdapterState = state;. Taken together with the above paragraph, it would seem to me that m_lastSeenAcAdapterState thus becomes an exact copy of BatteryController::m_acAdapterState.

So how would we end up with a situation where in this function, m_batteryController->acAdapterState() is actually different from m_lastSeenAcAdapterState and needs another manual Q_EMIT? Would this Q_EMIT not have happened already when m_batteryController->acAdapterState() changed itself?


Viewing all articles
Browse latest Browse all 2193

Trending Articles