summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgberg <gberg@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-10-23 19:30:38 (GMT)
committergberg <gberg@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-10-23 19:30:38 (GMT)
commitd365e901a749961b5c55a26db76bef26b0555579 (patch)
treed76e7175da308f25487db654a853399635c7ac9a
parent652924394f810d8b80fd6b3b59613261999c8fc1 (diff)
downloadkrfb-d365e901a749961b5c55a26db76bef26b0555579.tar.gz
krfb-d365e901a749961b5c55a26db76bef26b0555579.tar.xz
Make a wrapper for rfb.h to workaround the problems with TRUE and FALSE being redefined.
Fixes the last of gkiagia's review comments. git-svn-id: svn+ssh://svn.kde.org/home/kde/trunk/KDE/kdenetwork/krfb@1189036 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--abstractconnectioncontroller.cpp1
-rw-r--r--abstractconnectioncontroller.h2
-rw-r--r--abstractrfbserver.cpp1
-rw-r--r--abstractrfbserver.h2
-rw-r--r--framebuffer.h2
-rw-r--r--krfbserver.cpp1
-rw-r--r--rfb.h15
-rw-r--r--servermanager.cpp2
8 files changed, 19 insertions, 7 deletions
diff --git a/abstractconnectioncontroller.cpp b/abstractconnectioncontroller.cpp
index 53379e0..2980bb9 100644
--- a/abstractconnectioncontroller.cpp
+++ b/abstractconnectioncontroller.cpp
@@ -20,7 +20,6 @@
* Boston, MA 02110-1301, USA.
*/
-// RFB.H Why do you have to redefine the whole of fscking c++???
#include <KDebug>
#include "abstractconnectioncontroller.h"
diff --git a/abstractconnectioncontroller.h b/abstractconnectioncontroller.h
index 2fa53be..f7ad390 100644
--- a/abstractconnectioncontroller.h
+++ b/abstractconnectioncontroller.h
@@ -24,7 +24,7 @@
#include <QtCore/QObject>
-#include <rfb/rfb.h>
+#include "rfb.h"
class AbstractRfbServer;
diff --git a/abstractrfbserver.cpp b/abstractrfbserver.cpp
index 1d856a6..3c61330 100644
--- a/abstractrfbserver.cpp
+++ b/abstractrfbserver.cpp
@@ -18,7 +18,6 @@
* Boston, MA 02110-1301, USA.
*/
-// FUCKING RFB.H DIE DAMMIT
#include "servermanager.h"
#include "abstractrfbserver.h"
diff --git a/abstractrfbserver.h b/abstractrfbserver.h
index 39291bf..db40c60 100644
--- a/abstractrfbserver.h
+++ b/abstractrfbserver.h
@@ -27,7 +27,7 @@
#include <QtCore/QObject>
#include <QtCore/QSharedPointer>
-#include <rfb/rfb.h>
+#include "rfb.h"
class AbstractConnectionController;
diff --git a/framebuffer.h b/framebuffer.h
index abaf83f..1f8363c 100644
--- a/framebuffer.h
+++ b/framebuffer.h
@@ -17,7 +17,7 @@
#include <kdemacros.h>
-#include <rfb/rfb.h>
+#include "rfb.h"
class FrameBuffer;
/**
diff --git a/krfbserver.cpp b/krfbserver.cpp
index 2f35b32..db6e220 100644
--- a/krfbserver.cpp
+++ b/krfbserver.cpp
@@ -8,7 +8,6 @@
version 2 of the License, or (at your option) any later version.
*/
-// FUCKING RFB.H POS FUCK YOU
#include "servermanager.h"
#include "krfbserver.h"
diff --git a/rfb.h b/rfb.h
new file mode 100644
index 0000000..1386439
--- /dev/null
+++ b/rfb.h
@@ -0,0 +1,15 @@
+/**
+ * This file should always be included instead of <rfb/rfb.h> because otherwise it's redefinition
+ * of TRUE and FALSE plays havoc with other things.
+ */
+
+#ifndef KRFB_RFB_H
+#define KRFB_RFB_H
+
+#include <rfb/rfb.h>
+
+#undef TRUE
+#undef FALSE
+
+#endif // Header guard
+
diff --git a/servermanager.cpp b/servermanager.cpp
index 1e235b9..22141b7 100644
--- a/servermanager.cpp
+++ b/servermanager.cpp
@@ -22,7 +22,7 @@
#include "sockethelpers.h"
-#include <rfb/rfb.h>
+#include "rfb.h"
#include <KDebug>
#include <KGlobal>