summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Nichols <nezticle@gmail.com>2012-04-08 15:50:02 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-10 10:38:10 +0200
commit2756101d0e3b2a044e3e13a53421512c86dc5ba5 (patch)
treedf9334c8375e75cf1183d7f62d42b5434ff55af9 /src
parent673ce6c84edd8792dbb2c7747c769084ff3a9132 (diff)
Fixed build issue when using GLEW with MSVC
MSVC does not support the #warning precompiler command and is considered an error when used. This change checks for GCC before issuing the warning. Change-Id: Iee1e27841fe77b0289e88b7b4ccaa176ab56a39d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qopenglcontext.h2
-rw-r--r--src/gui/opengl/qopenglfunctions.h2
-rw-r--r--src/opengl/qglfunctions.h2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qopenglcontext.h b/src/gui/kernel/qopenglcontext.h
index 52f94a8a10..2dc4357b00 100644
--- a/src/gui/kernel/qopenglcontext.h
+++ b/src/gui/kernel/qopenglcontext.h
@@ -51,9 +51,11 @@
#include <QtGui/QSurfaceFormat>
#ifdef __GLEW_H__
+#if defined(Q_CC_GNU)
#warning qopenglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
#warning To use GLEW with Qt, do not include <qopengl.h> or <QOpenGLFunctions> after glew.h
#endif
+#endif
#include <QtGui/qopengl.h>
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index 4e778dda66..be366a79c8 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -45,9 +45,11 @@
#ifndef QT_NO_OPENGL
#ifdef __GLEW_H__
+#if defined(Q_CC_GNU)
#warning qopenglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
#warning To use GLEW with Qt, do not include <qopengl.h> or <QOpenGLFunctions> after glew.h
#endif
+#endif
#include <QtGui/qopengl.h>
#include <QtGui/qopenglcontext.h>
diff --git a/src/opengl/qglfunctions.h b/src/opengl/qglfunctions.h
index da3ce7db4d..0cb0b712ba 100644
--- a/src/opengl/qglfunctions.h
+++ b/src/opengl/qglfunctions.h
@@ -43,9 +43,11 @@
#define QGLFUNCTIONS_H
#ifdef __GLEW_H__
+#if defined(Q_CC_GNU)
#warning qglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
#warning To use GLEW with Qt, do not include <QtOpenGL> or <QGLFunctions> after glew.h
#endif
+#endif
#include <QtOpenGL/qgl.h>
#include <QtGui/qopenglcontext.h>