aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2013-08-28 08:44:52 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-28 11:00:51 +0200
commit8ecb5288c96ede33970536d0f819c16a78f18238 (patch)
treec54bdfe991b3526f1aa0dfe187c7f5438a658b60 /src
parentfb608dfa5b6b8a6467ae6a7ff106c9182598169b (diff)
wince: Build fix, CONST conflicts with Windows macros.
Don't #undef system macros in header files, they propagate quickly through other headers and make it very difficult to fix these problems. Change-Id: Id5efdfa69d0eefa8c740b14f839194039bd9752b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/compiler/qv4jsir.cpp4
-rw-r--r--src/qml/compiler/qv4jsir_p.h10
2 files changed, 12 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4jsir.cpp b/src/qml/compiler/qv4jsir.cpp
index 5ad5cf0131..0dacaabc63 100644
--- a/src/qml/compiler/qv4jsir.cpp
+++ b/src/qml/compiler/qv4jsir.cpp
@@ -48,6 +48,10 @@
#include <cmath>
#include <cassert>
+#ifdef CONST
+#undef CONST
+#endif
+
QT_BEGIN_NAMESPACE
namespace QQmlJS {
diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h
index 14daff0fb6..9d70e044bb 100644
--- a/src/qml/compiler/qv4jsir_p.h
+++ b/src/qml/compiler/qv4jsir_p.h
@@ -60,9 +60,11 @@
#include <QtCore/QString>
#include <QtCore/QBitArray>
#include <QtCore/qurl.h>
+#include <qglobal.h>
-#ifdef CONST
-#undef CONST
+#if defined(CONST) && defined(Q_OS_WIN)
+# pragma push_macro("CONST")
+# undef CONST // CONST conflicts with our own identifier
#endif
QT_BEGIN_NAMESPACE
@@ -914,4 +916,8 @@ private:
QT_END_NAMESPACE
+#if defined(Q_OS_WIN)
+# pragma pop_macro("CONST") // Restore peace
+#endif
+
#endif // QV4IR_P_H