From a12a943c99ba4aba122f91c93b078d2e87146b32 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 12 Jun 2025 00:27:33 +0200 Subject: Use a new UISignal which checks thread safety slightly. This adds a wrapper around signals2::signal which checks that emission happens from the GUI thread, for signals whose handlers must be called in the UI thread. I'm not sure how helpful it really is but maybe it catches some bad situations. --- src/lib/film.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/film.cc') diff --git a/src/lib/film.cc b/src/lib/film.cc index 09378696e..d7cb05930 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -1310,7 +1310,7 @@ Film::signal_change(ChangeType type, FilmProperty p) if (type == ChangeType::DONE) { set_dirty(true); - emit(boost::bind(boost::ref(Change), type, p)); + Change.emit_ui(this, type, p); if (p == FilmProperty::VIDEO_FRAME_RATE || p == FilmProperty::SEQUENCE) { /* We want to call Playlist::maybe_sequence but this must happen after the @@ -1577,7 +1577,7 @@ Film::playlist_content_change(ChangeType type, weak_ptr c, int p, bool } if (type == ChangeType::DONE) { - emit(boost::bind(boost::ref(ContentChange), type, c, p, frequent)); + ContentChange.emit_ui(this, type, c, p, frequent); if (!frequent) { check_settings_consistency(); } @@ -2325,7 +2325,7 @@ Film::set_dirty(bool dirty) auto const changed = dirty != _dirty; _dirty = dirty; if (changed) { - emit(boost::bind(boost::ref(DirtyChange), _dirty)); + DirtyChange.emit_ui(this, _dirty); } } -- cgit v1.2.3