summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-05 13:17:19 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-05 19:42:39 (GMT)
commit2b560b129b7a31fc8cc07f618e763c95a22bf832 (patch)
tree73e72cdc758b79d01485dc28dcedd48b26859ae8 /3rdParty/Boost/src/libs/signals/src/connection.cpp
parent3c560e31b0f168da917e8d566db01fd1cd997d86 (diff)
downloadswift-2b560b129b7a31fc8cc07f618e763c95a22bf832.zip
swift-2b560b129b7a31fc8cc07f618e763c95a22bf832.tar.bz2
Migrate to Boost.Signals2 from Boost.Signals
Boost.Signals was deprecated and is not improved further. This patch removes Boost.Signals from 3rdParty and adds Boost.Signals2 and its dependencies. Also removed the Qt signals compatibility file Swiften/Base/boost_bsignals.h. Test-Information: Build and ran unit tests on OS X 10.11.4. Confirmed successful login using Swift client. Change-Id: Ie6e3b2d15aac2462cda95401582f5287a479fb54
Diffstat (limited to '3rdParty/Boost/src/libs/signals/src/connection.cpp')
-rw-r--r--3rdParty/Boost/src/libs/signals/src/connection.cpp155
1 files changed, 0 insertions, 155 deletions
diff --git a/3rdParty/Boost/src/libs/signals/src/connection.cpp b/3rdParty/Boost/src/libs/signals/src/connection.cpp
deleted file mode 100644
index b4ed8b4..0000000
--- a/3rdParty/Boost/src/libs/signals/src/connection.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-// Boost.Signals library
-
-// Copyright Douglas Gregor 2001-2004. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-#define BOOST_SIGNALS_SOURCE
-
-#include <boost/signals/connection.hpp>
-#include <cassert>
-
-namespace boost {
- namespace BOOST_SIGNALS_NAMESPACE {
-
- connection::connection(const connection& other) :
- con(other.con), controlling_connection(other.controlling_connection)
- {
- }
-
- connection::~connection()
- {
- if (controlling_connection) {
- disconnect();
- }
- }
-
- void
- connection::reset(BOOST_SIGNALS_NAMESPACE::detail::basic_connection* new_con)
- {
- con.reset(new_con);
- }
-
- bool connection::operator==(const connection& other) const
- {
- return con.get() == other.con.get();
- }
-
- bool connection::operator<(const connection& other) const
- {
- return con.get() < other.con.get();
- }
-
- connection& connection::operator=(const connection& other)
- {
- connection(other).swap(*this);
- return *this;
- }
-
- void connection::swap(connection& other)
- {
- this->con.swap(other.con);
- std::swap(this->controlling_connection, other.controlling_connection);
- }
-
- void swap(connection& c1, connection& c2)
- {
- c1.swap(c2);
- }
-
- scoped_connection::scoped_connection(const connection& other) :
- connection(other),
- released(false)
- {
- }
-
- scoped_connection::scoped_connection(const scoped_connection& other) :
- connection(other),
- released(other.released)
- {
- }
-
- scoped_connection::~scoped_connection()
- {
- if (!released) {
- this->disconnect();
- }
- }
-
- connection scoped_connection::release()
- {
- released = true;
- return *this;
- }
-
- void scoped_connection::swap(scoped_connection& other)
- {
- this->connection::swap(other);
- bool other_released = other.released;
- other.released = this->released;
- this->released = other_released;
- }
-
- void swap(scoped_connection& c1, scoped_connection& c2)
- {
- c1.swap(c2);
- }
-
- scoped_connection&
- scoped_connection::operator=(const connection& other)
- {
- scoped_connection(other).swap(*this);
- return *this;
- }
-
- scoped_connection&
- scoped_connection::operator=(const scoped_connection& other)
- {
- scoped_connection(other).swap(*this);
- return *this;
- }
-
- void
- connection::add_bound_object(const BOOST_SIGNALS_NAMESPACE::detail::bound_object& b)
- {
- assert(con.get() != 0);
- con->bound_objects.push_back(b);
- }
-
-
- void connection::disconnect() const
- {
- if (this->connected()) {
- // Make sure we have a reference to the basic_connection object,
- // because 'this' may disappear
- shared_ptr<detail::basic_connection> local_con = con;
-
- void (*signal_disconnect)(void*, void*) = local_con->signal_disconnect;
-
- // Note that this connection no longer exists
- // Order is important here: we could get into an infinite loop if this
- // isn't cleared before we try the disconnect.
- local_con->signal_disconnect = 0;
-
- // Disconnect signal
- signal_disconnect(local_con->signal, local_con->signal_data);
-
- // Disconnect all bound objects
- typedef std::list<BOOST_SIGNALS_NAMESPACE::detail::bound_object>::iterator iterator;
- for (iterator i = local_con->bound_objects.begin();
- i != local_con->bound_objects.end(); ++i) {
- assert(i->disconnect != 0);
- i->disconnect(i->obj, i->data);
- }
- }
- }
- } // end namespace boost
-} // end namespace boost
-
-#ifndef BOOST_MSVC
-// Explicit instantiations to keep everything in the library
-template class std::list<boost::BOOST_SIGNALS_NAMESPACE::detail::bound_object>;
-#endif