GNOME Bugzilla – Bug 633579
Extension.Fixup does not clear its internal cache on problemtype-change
Last modified: 2010-11-02 00:21:44 UTC
Created attachment 173568 [details] [review] Implements ClearCache() method in MigoModelProvider, adds method to ProblemModel.Clear() When switching between Problem Types, Banshee would still list problems of the old type, e.g. switching from artist to genre would still list artist problems, altough they were cleared from the database. The bug was caused by MigoModelProvider's internal cache, which was not cleared when the problemtype was changed, thus causing it to still return old data. Attached is a patch that fixes this issue. Two things to note: 1. Fixup currently doesnt work properly because of some issues with the GUI, but this doesn't affect this bug directly 2. The primary index seems to be reset everytime the problemtype is cleared, is this wanted? This indirectly caused this malfunction, as the ProblemID is used as the primary key for the internal cache
Review of attachment 173568 [details] [review]: Please see `git log` for examples of commit msgs. The first line should be <= 50 chars, then two line breaks, then the rest of your message, which should include the bgo#. Besides that and the space issues below, this looks good. Please resubmit fixed and I'll push it. ::: src/Extensions/Banshee.Fixup/Banshee.Fixup/ProblemModel.cs @@ +140,3 @@ selected_count = 0; ServiceManager.DbConnection.Execute ("DELETE FROM MetadataProblems"); + Problem.Provider.ClearCache(); We put a space between the method name and argument list. See HACKING for our full code style guide.
Created attachment 173653 [details] [review] Better Patch ;-P
Review of attachment 173653 [details] [review]: Committed, thanks!