Don't reset model when adding an active connection
ClosedPublic

Authored by nicolasfella on Oct 24 2019, 2:09 PM.

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, 2:09 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 24 2019, 2:09 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, 2:09 PM
jgrulich accepted this revision.Oct 24 2019, 3:04 PM
This revision is now accepted and ready to land.Oct 24 2019, 3:04 PM
jgrulich requested changes to this revision.Oct 24 2019, 3:08 PM
jgrulich added inline comments.
libs/models/networkmodel.cpp
313

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

This revision now requires changes to proceed.Oct 24 2019, 3:08 PM
  • Only emit changed roles
jgrulich accepted this revision.Oct 24 2019, 3:19 PM
This revision is now accepted and ready to land.Oct 24 2019, 3:19 PM
jgrulich requested changes to this revision.Oct 24 2019, 3:20 PM

Actually, I just checked our code and we use updateItem(item) function, which does the emitting and will clear the roles automatically.

This revision now requires changes to proceed.Oct 24 2019, 3:20 PM

Actually, I just checked our code and we use updateItem(item) function, which does the emitting and will clear the roles automatically.

Can you change it in other PRs too and even in the one you pushed in the morning?

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