viewer: set video and audio caches to children of the viewer

Ensures their thread gets changed along with the viewer. The project
gets loaded/created in a background thread so the GUI can remain
responsive, and is then moved to the main thread for intended event
handling. However if the caches aren't parented, the hierarchy breaks
and the caches remain in a thread whose event loop is quickly destroyed.
Now that they're parented, events can be properly queued on them once
again.
This commit is contained in:
itsmattkc
2020-07-10 18:34:16 +10:00
parent df78e88150
commit 36dd06d2dc
5 changed files with 17 additions and 7 deletions
+4 -1
View File
@@ -32,7 +32,10 @@ class PlaybackCache : public QObject
{
Q_OBJECT
public:
PlaybackCache() = default;
PlaybackCache(QObject* parent = nullptr) :
QObject(parent)
{
}
void Invalidate(const TimeRange& r);