diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-06-02 19:17:35 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-06-02 19:17:35 (GMT) |
commit | 97ec7b0861c282c687e9c5bb8aa8bce871b482ba (patch) | |
tree | 00ddc8605579043ff6dfe0a859753757da1d2962 /Swiften/Base/boost_bsignals.h | |
parent | 3362805ffb92452a82b6ca5866377cd85fae764f (diff) | |
download | swift-contrib-97ec7b0861c282c687e9c5bb8aa8bce871b482ba.zip swift-contrib-97ec7b0861c282c687e9c5bb8aa8bce871b482ba.tar.bz2 |
Rename boost_signalslib.h to boost_bsignals.
Diffstat (limited to 'Swiften/Base/boost_bsignals.h')
-rw-r--r-- | Swiften/Base/boost_bsignals.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Swiften/Base/boost_bsignals.h b/Swiften/Base/boost_bsignals.h new file mode 100644 index 0000000..7609c94 --- /dev/null +++ b/Swiften/Base/boost_bsignals.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2010 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +// Work around for the boost::signals / Qt signals keyword clash. +// Based on an example from Frank Hess, improved by Niels Dekker + +#pragma once + +#if defined(signals) && defined(Q_SIGNALS) && !defined(QT_MOC_CPP) +#undef signals +#define signals signals +#endif + +#include <boost/signal.hpp> + +namespace boost { + namespace bsignals = signals; +} + +#if defined(signals) && defined(Q_SIGNALS) && !defined(QT_MOC_CPP) +#undef signals +#define signals Q_SIGNALS +#endif |