]> git.lyx.org Git - lyx.git/blobdiff - src/support/signals.h
Let paragraph::requestSpellcheck() consider contained insets
[lyx.git] / src / support / signals.h
index ceca3709c67c16f058e9245a5e73a86321cb47a0..269b20699f8486dd052747c3d8e0a12ec8ee376b 100644 (file)
 
 #include <nod.hpp>
 
-#include <memory>
-
 namespace lyx {
 
-namespace signals2 = ::nod;
-
-namespace support {
-
-/// A small utility to use with signals2::slot_type::track_foreign when the
-/// parent object is not handled by a shared_ptr, or to track the lifetime of an
-/// object. Using Trackable to track lifetimes is less thread-safe than tracking
-/// their parents directly with a shared_ptr as recommended by signals2, but it
-/// makes it easier for transitioning old code. (Essentially because Trackable
-/// will not prevent the deletion of the parent by a concurrent thread.)
-class Trackable {
-public:
-       Trackable() : p_(std::make_shared<int>(0)) {}
-       Trackable(Trackable const &) : Trackable() {}
-       Trackable(Trackable &&) : Trackable() {}
-       Trackable & operator=(Trackable const &) { return *this; }
-       Trackable & operator=(Trackable &&) { return *this; }
-       // This weak pointer lets you know if the parent object has been destroyed
-       std::weak_ptr<void> p() const { return p_; }
-private:
-       std::shared_ptr<void> const p_;
-};
-
-} // namespace support
+using nod::signal;
+using nod::connection;
+using nod::scoped_connection;
 
 } // namespace lyx
 
-
 #endif