Don't reset model when device state changes
ClosedPublic

Authored by nicolasfella on Oct 24 2019, 1:27 PM.

Details

Summary

same resoning as in D24903

Test Plan

Toggled Wifi in plasmoid

Diff Detail

Repository
R116 Plasma Network Management Applet
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nicolasfella created this revision.Oct 24 2019, 1:27 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 24 2019, 1:27 PM
Restricted Application added a reviewer: jgrulich. · View Herald Transcript
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
nicolasfella requested review of this revision.Oct 24 2019, 1:27 PM
jgrulich accepted this revision.Oct 24 2019, 3:07 PM
jgrulich added inline comments.
libs/models/networkmodel.cpp
836

Shouldn't you add item->changedRoles() as the last parameter?

This revision is now accepted and ready to land.Oct 24 2019, 3:07 PM
jgrulich requested changes to this revision.Oct 24 2019, 3:08 PM
This revision now requires changes to proceed.Oct 24 2019, 3:08 PM
  • Only emit changed roles
jgrulich requested changes to this revision.Oct 24 2019, 3:28 PM
jgrulich added inline comments.
libs/models/networkmodel.cpp
835

Please, see the comment in one of the other PRs. You can just use updateItem(item) and it will do everything for you. Sorry for not checking that earlier.

This revision now requires changes to proceed.Oct 24 2019, 3:28 PM
  • Only emit changed roles
  • Use updateItem
jgrulich accepted this revision.Oct 24 2019, 3:32 PM
This revision is now accepted and ready to land.Oct 24 2019, 3:32 PM
This revision was automatically updated to reflect the committed changes.