Prevent leaking IdxTreeModels
Examining the Recoll GUI with GammaRay I noticed that IdxTreeModel
instances were building up in the process. A new one would be spawned every time I went into the GUI settings dialog, and they stuck around indefinitely.
RclMain::populateSideFilters()
is called whenever the preferences
dialog is accepted (and possibly at other times as well), and
allocates a new model instance which it sets on the tree widget.
A previous model will be leaked unless it's cleaned up afterwards.
There is a remaining issue/caveat, preexisting but unaddressed in these changes. It's involved so I'll open an issue for that, instead of polluting this MR.