summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-06-02 19:05:00 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-06-02 19:05:00 (GMT)
commitf5bc852eb47384f2319ac5e3d4b9d33f4c14ce9a (patch)
tree39405180234f30fbc09458fa1c5f79602e5236f5 /Swiften/Base
parent9a0d8edbcb89c8d83839c4131425c1a1c598fca4 (diff)
downloadswift-f5bc852eb47384f2319ac5e3d4b9d33f4c14ce9a.zip
swift-f5bc852eb47384f2319ac5e3d4b9d33f4c14ce9a.tar.bz2
Add missing boost_signalslib.h file.
Diffstat (limited to 'Swiften/Base')
-rw-r--r--Swiften/Base/boost_signalslib.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/Swiften/Base/boost_signalslib.h b/Swiften/Base/boost_signalslib.h
new file mode 100644
index 0000000..7609c94
--- /dev/null
+++ b/Swiften/Base/boost_signalslib.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