Connect to backend signals to catch cache reload.
Review Request #127107 - Created Feb. 18, 2016 and submitted
| Information | |
|---|---|
| Carlo Vanini | |
| muon | |
| master | |
| 332530 | |
| 7660dc9... | |
| Reviewers | |
| kubuntu, muon | |
When the cache is reloaded libqapt deletes Package objects and creates them anew. This results in dangling pointers in muon models.
When "Preview Changes" is shown we have two models with lists of packages, and both should be cleared and repopulated.
The cache reload can be triggered by pinning/unpinning (lock/unlock) a package.
- mark a package for install/remove
- click on "Preview Changes"
- right-click on a package and select "Lock at Current Version"
Without patch: clicking on "Back" crashes muon
With patch: no crash, but as a side effect all changes to packages are lost when the cache is reloaded.
Other than that, and from my ignorance on the code-base looks good.
(also implicit +1 on the other patch in libqapt).
-
src/PackageModel/PackageWidget.cpp (Diff revision 1) -
Maybe you can leave the setSourceModel call after the calling for sortPackages.
-
src/PackageModel/PackageWidget.cpp (Diff revision 1) -
Why is
startSearch()needed now?
Commit: |
|
||||
|---|---|---|---|---|---|
Diff: |
Revision 2 (+19 -1) |
