Lazily refresh the details tabs
ClosedPublic

Authored by vanini on Mar 10 2018, 11:52 AM.

Details

Summary

Refresh only the current tab when the selected package is changed.
Before, every tab was refreshed. That included getting the list of
installed files and downloading the changelog, even if that information
was not presented to the user.

The UI has a small change in that before, when a tab had nothing to show
(e.g. no alternative version available for the package) the tab itself
was hidden. After the change, the tab is still visible but it is grayed
out and cannot be selected (i.e. inactive).

BUG: 390785

Diff Detail

Repository
R550 Muon
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vanini requested review of this revision.Mar 10 2018, 11:52 AM
vanini created this revision.
sitter accepted this revision.Mar 13 2018, 11:30 AM

some suggestions, lgtm though

src/DetailsWidget.cpp
58

could use c++11 ranged based for loop here I guess?

121

qobject_cast is marginally slower than static_cast but 100% safer when dealing with qobjects.

src/PackageModel/PackageWidget.cpp
252

I'd change this to function pointer connects.

This revision is now accepted and ready to land.Mar 13 2018, 11:30 AM
This revision was automatically updated to reflect the committed changes.