qt: medialib: pass loader via a raw pointer
commit2e44710d0e3e344046e1a64142968d4b8e53da06
authorRomain Vimont <rom1v@videolabs.io>
Tue, 17 Nov 2020 14:30:19 +0000 (17 15:30 +0100)
committerPierre Lamot <pierre@videolabs.io>
Wed, 2 Dec 2020 17:25:41 +0000 (2 18:25 +0100)
treee61c728a1a400de410ecd84113aa0cbdde950735
parent64fbe80bbc48c697627cc1e86c49055cd0cea37d
qt: medialib: pass loader via a raw pointer

Currently, the loader is owned by MLModelCache, but in the future it
might outlive it: database queries will be executed from a separate
thread, and MLModelCache could be deleted while an asynchronous request
is running.

To prepare for this change, do not require to receive the loader via a
std::unique_ptr (let the cache wrap it).

Signed-off-by: Pierre Lamot <pierre@videolabs.io>
modules/gui/qt/medialibrary/mlbasemodel.hpp
modules/gui/qt/util/listcache.hpp