Revision 557a043...
Go back to digest for 26th February 2012Other in Utilities
Further changes required to make the QWidget-based MSC work with the new Application
object package invalidation scheme. Application objects inside the ApplicationModel's
internal list weren't being cleared before reload, so MSC was crashing trying to get
data from stale pointers. Additionally, since the QApt Backend's refreshCache()
function used QCoreApplication::processEvents to make it sort of asynchronous, the
ApplicationModel needs to be temporarily cleared so that it doesn't try access package
data in the middle of the APT cache reload. (Which didn't matter before since we were
reloading the entire MSC view)
What happens now during a cache refresh upon the completion of an installation/removal
is that the view momentarily clears itself. Once the refresh is complete all the data
is then re-displayed, without warping the user back to the main window. I think that's
probably the best we'll be able to do, since we can't paint anything requiring
package data during the backend's reload.
I also changed it so that reviews/ratings stuff gets cleared on every cache refresh, as
their package pointers will all be stale and really do have to be reloaded. This new
refresh scheme is really an improvement on the experience since we don't have to refresh
the whole UI, thanks Aleix. :)
File Changes
- installer/ApplicationBackend.cpp
- installer/ApplicationBackend.h
- installer/ApplicationWindow.cpp
- installer/ApplicationModel/ApplicationModel.cpp
- installer/ApplicationModel/ApplicationModel.h
- installer/ApplicationModel/ApplicationProxyModel.cpp
- installer/ApplicationModel/ApplicationProxyModel.h
- installer/ApplicationModel/ApplicationViewWidget.cpp
- installer/ApplicationModel/ApplicationViewWidget.h