Fix qv4jsir_p.h warnings
authorJ-P Nurmi <jpnurmi@digia.com>
Wed, 4 Sep 2013 08:56:00 +0000 (10:56 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 4 Sep 2013 14:50:40 +0000 (16:50 +0200)
Apparently CONST is not defined on MSVC 2010, so the unbalanced
push/pop macro usage leads to tons of such warnings:

qv4jsir_p.h(922) : warning C4602: #pragma pop_macro : 'CONST' no
previous #pragma push_macro for this identifier

Change-Id: Ia34ef00e79b4f7a3abf682e1e78dfa3193e30838
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
src/qml/compiler/qv4jsir_p.h

index 74c683b..1e046b8 100644 (file)
@@ -63,6 +63,7 @@
 #include <qglobal.h>
 
 #if defined(CONST) && defined(Q_OS_WIN)
+# define QT_POP_CONST
 # pragma push_macro("CONST")
 # undef CONST // CONST conflicts with our own identifier
 #endif
@@ -918,8 +919,9 @@ private:
 
 QT_END_NAMESPACE
 
-#if defined(Q_OS_WIN)
+#if defined(QT_POP_CONST)
 # pragma pop_macro("CONST") // Restore peace
+# undef QT_POP_CONST
 #endif
 
 #endif // QV4IR_P_H