]> git.lyx.org Git - features.git/commit
Properly track the lifetime of signals2::slots (#8261)
authorGuillaume MM <gm@lyx.org>
Sun, 28 May 2017 11:25:53 +0000 (13:25 +0200)
committerGuillaume MM <gm@lyx.org>
Sun, 11 Jun 2017 17:51:17 +0000 (19:51 +0200)
commitdb58111360d68f76c5797069a7b80967447d1379
tree23dfe072ad13e35c6332a2238d2f016b768c0994
parent3f61375bc390fcd9dbe6e643b71ca121cf68ebe4
Properly track the lifetime of signals2::slots (#8261)

Starting at 61b2bd5e, boost::bind was progressively replaced with
std::bind. They are not interchangeable though. boost::bind implements
the tracking of boost::signals{,2}::trackable objects. Now that
std::bind has completely replaced boost::bind, tracking never occurred.

This commit replaces boost::signals2::trackable with the new preferred
boost::signals2 methods: scoped_connections or slot::track_foreign. The
support::Trackable class introduced is less safe but easier for transitioning
old code.

Fixes the crash at #8261.
26 files changed:
src/Converter.cpp
src/LaTeX.h
src/Server.cpp
src/Server.h
src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiWorkArea.cpp
src/graphics/GraphicsCacheItem.cpp
src/graphics/GraphicsCacheItem.h
src/graphics/GraphicsConverter.cpp
src/graphics/GraphicsConverter.h
src/graphics/GraphicsLoader.cpp
src/graphics/GraphicsLoader.h
src/graphics/PreviewImage.cpp
src/graphics/PreviewLoader.cpp
src/graphics/PreviewLoader.h
src/insets/InsetExternal.cpp
src/insets/InsetExternal.h
src/insets/RenderPreview.cpp
src/insets/RenderPreview.h
src/support/FileMonitor.cpp
src/support/FileMonitor.h
src/support/ForkedCalls.cpp
src/support/ForkedCalls.h
src/support/Makefile.am
src/support/Timeout.h
src/support/signals.h [new file with mode: 0644]