qt: keep too expensive to generate custom cover images forever in memory
If Qt can not cache them, which seems to be the case due to Qt's limited cache size and the relative size of these covers, these images often need to get re-generated.
These images are not retrieved from the disk, but generated computationally. It is quite expensive to generate these images, so we should keep them around.
We have been using a similar approach for the dialogs. Normally, dialogs are not loaded in memory when the application starts. When a dialog opens for the first time, it gets loaded in the memory and kept until the application closes (forever). This makes sense, because it is expensive to create the dialogs (especially the preferences one), and it is expected that if the user opens a dialog once there is high likelihood of opening it again. So, when a singleton dialog is closed, it gets simply hidden.
More discussion is available here !6400.
Request review @chub.