Commit 17e4fd44 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Add missing role changes

Summary: A few roles were not marked as changed properly.

Test Plan: Builds

Reviewers: jgrulich

Reviewed By: jgrulich

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24920
parent ba142dd7
......@@ -484,7 +484,10 @@ qulonglong NetworkModelItem::rxBytes() const
void NetworkModelItem::setRxBytes(qulonglong bytes)
{
m_rxBytes = bytes;
if (m_rxBytes != bytes) {
m_rxBytes = bytes;
m_changedRoles << NetworkModel::RxBytesRole;
}
}
qulonglong NetworkModelItem::txBytes() const
......@@ -494,7 +497,10 @@ qulonglong NetworkModelItem::txBytes() const
void NetworkModelItem::setTxBytes(qulonglong bytes)
{
m_txBytes = bytes;
if (m_txBytes != bytes) {
m_txBytes = bytes;
m_changedRoles << NetworkModel::TxBytesRole;
}
}
bool NetworkModelItem::operator==(const NetworkModelItem *item) const
......@@ -515,6 +521,7 @@ bool NetworkModelItem::operator==(const NetworkModelItem *item) const
void NetworkModelItem::invalidateDetails()
{
m_detailsValid = false;
m_changedRoles << NetworkModel::ConnectionDetailsRole;
}
void NetworkModelItem::updateDetails() const
......
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