summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp4
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h56
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h16
-rw-r--r--src/opengl/opengl.pro1
-rw-r--r--src/opengl/qgl.h30
-rw-r--r--src/opengl/qgl_p.h8
-rw-r--r--src/opengl/qglbuffer.h2
-rw-r--r--src/opengl/qglcolormap.h2
-rw-r--r--src/opengl/qglframebufferobject.h6
-rw-r--r--src/opengl/qglframebufferobject_p.h10
-rw-r--r--src/opengl/qglfunctions.cpp4
-rw-r--r--src/opengl/qglfunctions.h6
-rw-r--r--src/opengl/qglpaintdevice_p.h14
-rw-r--r--src/opengl/qglpixelbuffer.h10
-rw-r--r--src/opengl/qglshaderprogram.h12
-rw-r--r--src/opengl/qgraphicsshadereffect.cpp2
-rw-r--r--src/opengl/qgraphicsshadereffect_p.h2
17 files changed, 92 insertions, 93 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
index ec673e8726..47e8531959 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
@@ -68,13 +68,13 @@ public:
delete m_shaders;
}
- void invalidateResource() Q_DECL_OVERRIDE
+ void invalidateResource() override
{
delete m_shaders;
m_shaders = 0;
}
- void freeResource(QOpenGLContext *) Q_DECL_OVERRIDE
+ void freeResource(QOpenGLContext *) override
{
}
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index 0f96732278..d1ed621790 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -108,37 +108,37 @@ public:
QGL2PaintEngineEx();
~QGL2PaintEngineEx();
- bool begin(QPaintDevice *device) Q_DECL_OVERRIDE;
+ bool begin(QPaintDevice *device) override;
void ensureActive();
- bool end() Q_DECL_OVERRIDE;
-
- virtual void clipEnabledChanged() Q_DECL_OVERRIDE;
- virtual void penChanged() Q_DECL_OVERRIDE;
- virtual void brushChanged() Q_DECL_OVERRIDE;
- virtual void brushOriginChanged() Q_DECL_OVERRIDE;
- virtual void opacityChanged() Q_DECL_OVERRIDE;
- virtual void compositionModeChanged() Q_DECL_OVERRIDE;
- virtual void renderHintsChanged() Q_DECL_OVERRIDE;
- virtual void transformChanged() Q_DECL_OVERRIDE;
-
- virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) Q_DECL_OVERRIDE;
+ bool end() override;
+
+ virtual void clipEnabledChanged() override;
+ virtual void penChanged() override;
+ virtual void brushChanged() override;
+ virtual void brushOriginChanged() override;
+ virtual void opacityChanged() override;
+ virtual void compositionModeChanged() override;
+ virtual void renderHintsChanged() override;
+ virtual void transformChanged() override;
+
+ virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) override;
virtual void drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap,
- QPainter::PixmapFragmentHints hints) Q_DECL_OVERRIDE;
+ QPainter::PixmapFragmentHints hints) override;
virtual void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr,
- Qt::ImageConversionFlags flags = Qt::AutoColor) Q_DECL_OVERRIDE;
- virtual void drawTextItem(const QPointF &p, const QTextItem &textItem) Q_DECL_OVERRIDE;
- virtual void fill(const QVectorPath &path, const QBrush &brush) Q_DECL_OVERRIDE;
- virtual void stroke(const QVectorPath &path, const QPen &pen) Q_DECL_OVERRIDE;
- virtual void clip(const QVectorPath &path, Qt::ClipOperation op) Q_DECL_OVERRIDE;
+ Qt::ImageConversionFlags flags = Qt::AutoColor) override;
+ virtual void drawTextItem(const QPointF &p, const QTextItem &textItem) override;
+ virtual void fill(const QVectorPath &path, const QBrush &brush) override;
+ virtual void stroke(const QVectorPath &path, const QPen &pen) override;
+ virtual void clip(const QVectorPath &path, Qt::ClipOperation op) override;
- virtual void drawStaticTextItem(QStaticTextItem *textItem) Q_DECL_OVERRIDE;
+ virtual void drawStaticTextItem(QStaticTextItem *textItem) override;
bool drawTexture(const QRectF &r, GLuint textureId, const QSize &size, const QRectF &sr);
- Type type() const Q_DECL_OVERRIDE { return OpenGL2; }
+ Type type() const override { return OpenGL2; }
- virtual void setState(QPainterState *s) Q_DECL_OVERRIDE;
- virtual QPainterState *createState(QPainterState *orig) const Q_DECL_OVERRIDE;
+ virtual void setState(QPainterState *s) override;
+ virtual QPainterState *createState(QPainterState *orig) const override;
inline QGL2PaintEngineState *state() {
return static_cast<QGL2PaintEngineState *>(QPaintEngineEx::state());
}
@@ -146,16 +146,16 @@ public:
return static_cast<const QGL2PaintEngineState *>(QPaintEngineEx::state());
}
- void beginNativePainting() Q_DECL_OVERRIDE;
- void endNativePainting() Q_DECL_OVERRIDE;
+ void beginNativePainting() override;
+ void endNativePainting() override;
void invalidateState();
void setRenderTextActive(bool);
bool isNativePaintingActive() const;
- bool requiresPretransformedGlyphPositions(QFontEngine *, const QTransform &) const Q_DECL_OVERRIDE { return false; }
- bool shouldDrawCachedGlyphs(QFontEngine *, const QTransform &) const Q_DECL_OVERRIDE;
+ bool requiresPretransformedGlyphPositions(QFontEngine *, const QTransform &) const override { return false; }
+ bool shouldDrawCachedGlyphs(QFontEngine *, const QTransform &) const override;
void setTranslateZ(GLfloat z);
@@ -244,7 +244,7 @@ public:
void updateClipScissorTest();
void setScissor(const QRect &rect);
void regenerateClip();
- void systemStateChanged() Q_DECL_OVERRIDE;
+ void systemStateChanged() override;
static QGLEngineShaderManager* shaderManagerForEngine(QGL2PaintEngineEx *engine) { return engine->d_func()->shaderManager; }
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
index 95401d10c1..e76216ef5d 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
@@ -79,7 +79,7 @@ struct QGLGlyphTexture : public QOpenGLSharedResource
#endif
}
- void freeResource(QOpenGLContext *context) Q_DECL_OVERRIDE
+ void freeResource(QOpenGLContext *context) override
{
const QGLContext *ctx = QGLContext::fromOpenGLContext(context);
#ifdef QT_GL_TEXTURE_GLYPH_CACHE_DEBUG
@@ -93,7 +93,7 @@ struct QGLGlyphTexture : public QOpenGLSharedResource
ctx->contextHandle()->functions()->glDeleteTextures(1, &m_texture);
}
- void invalidateResource() Q_DECL_OVERRIDE
+ void invalidateResource() override
{
m_texture = 0;
m_fbo = 0;
@@ -113,12 +113,12 @@ public:
QGLTextureGlyphCache(QFontEngine::GlyphFormat format, const QTransform &matrix);
~QGLTextureGlyphCache();
- virtual void createTextureData(int width, int height) Q_DECL_OVERRIDE;
- virtual void resizeTextureData(int width, int height) Q_DECL_OVERRIDE;
- virtual void fillTexture(const Coord &c, glyph_t glyph, QFixed subPixelPosition) Q_DECL_OVERRIDE;
- virtual int glyphPadding() const Q_DECL_OVERRIDE;
- virtual int maxTextureWidth() const Q_DECL_OVERRIDE;
- virtual int maxTextureHeight() const Q_DECL_OVERRIDE;
+ virtual void createTextureData(int width, int height) override;
+ virtual void resizeTextureData(int width, int height) override;
+ virtual void fillTexture(const Coord &c, glyph_t glyph, QFixed subPixelPosition) override;
+ virtual int glyphPadding() const override;
+ virtual int maxTextureWidth() const override;
+ virtual int maxTextureHeight() const override;
inline GLuint texture() const {
QGLTextureGlyphCache *that = const_cast<QGLTextureGlyphCache *>(this);
diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
index 016db46405..077b190d3e 100644
--- a/src/opengl/opengl.pro
+++ b/src/opengl/opengl.pro
@@ -5,7 +5,6 @@ DEFINES += QT_NO_USING_NAMESPACE QT_NO_FOREACH
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x63000000
solaris-cc*:QMAKE_CXXFLAGS_RELEASE -= -O2
-irix-cc*:QMAKE_CXXFLAGS += -no_prelink -ptused
QMAKE_DOCS = $$PWD/doc/qtopengl.qdocconf
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index ab418c191a..902a2a2104 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -250,7 +250,7 @@ public:
QGLContext(const QGLFormat& format);
virtual ~QGLContext();
- virtual bool create(const QGLContext* shareContext = Q_NULLPTR);
+ virtual bool create(const QGLContext* shareContext = nullptr);
bool isValid() const;
bool isSharing() const;
void reset();
@@ -318,7 +318,7 @@ public:
QOpenGLContext *contextHandle() const;
protected:
- virtual bool chooseContext(const QGLContext* shareContext = Q_NULLPTR);
+ virtual bool chooseContext(const QGLContext* shareContext = nullptr);
bool deviceIsPixmap() const;
bool windowCreated() const;
@@ -371,12 +371,12 @@ class Q_OPENGL_EXPORT QGLWidget : public QWidget
Q_OBJECT
Q_DECLARE_PRIVATE(QGLWidget)
public:
- explicit QGLWidget(QWidget* parent=Q_NULLPTR,
- const QGLWidget* shareWidget = Q_NULLPTR, Qt::WindowFlags f=Qt::WindowFlags());
- explicit QGLWidget(QGLContext *context, QWidget* parent=Q_NULLPTR,
- const QGLWidget* shareWidget = Q_NULLPTR, Qt::WindowFlags f=Qt::WindowFlags());
- explicit QGLWidget(const QGLFormat& format, QWidget* parent=Q_NULLPTR,
- const QGLWidget* shareWidget = Q_NULLPTR, Qt::WindowFlags f=Qt::WindowFlags());
+ explicit QGLWidget(QWidget* parent=nullptr,
+ const QGLWidget* shareWidget = nullptr, Qt::WindowFlags f=Qt::WindowFlags());
+ explicit QGLWidget(QGLContext *context, QWidget* parent=nullptr,
+ const QGLWidget* shareWidget = nullptr, Qt::WindowFlags f=Qt::WindowFlags());
+ explicit QGLWidget(const QGLFormat& format, QWidget* parent=nullptr,
+ const QGLWidget* shareWidget = nullptr, Qt::WindowFlags f=Qt::WindowFlags());
~QGLWidget();
void qglColor(const QColor& c) const;
@@ -395,7 +395,7 @@ public:
void setFormat(const QGLFormat& format);
QGLContext* context() const;
- void setContext(QGLContext* context, const QGLContext* shareContext = Q_NULLPTR,
+ void setContext(QGLContext* context, const QGLContext* shareContext = nullptr,
bool deleteOldContext = true);
QPixmap renderPixmap(int w = 0, int h = 0, bool useContext = false);
@@ -413,7 +413,7 @@ public:
const QFont & fnt = QFont());
void renderText(double x, double y, double z, const QString & str,
const QFont & fnt = QFont());
- QPaintEngine *paintEngine() const Q_DECL_OVERRIDE;
+ QPaintEngine *paintEngine() const override;
GLuint bindTexture(const QImage &image, GLenum target, GLint format,
QGLContext::BindOptions options);
@@ -437,7 +437,7 @@ public Q_SLOTS:
virtual void updateOverlayGL();
protected:
- bool event(QEvent *) Q_DECL_OVERRIDE;
+ bool event(QEvent *) override;
virtual void initializeGL();
virtual void resizeGL(int w, int h);
virtual void paintGL();
@@ -449,16 +449,16 @@ protected:
void setAutoBufferSwap(bool on);
bool autoBufferSwap() const;
- void paintEvent(QPaintEvent*) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent*) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent*) override;
+ void resizeEvent(QResizeEvent*) override;
virtual void glInit();
virtual void glDraw();
QGLWidget(QGLWidgetPrivate &dd,
const QGLFormat &format = QGLFormat(),
- QWidget *parent = Q_NULLPTR,
- const QGLWidget* shareWidget = Q_NULLPTR,
+ QWidget *parent = nullptr,
+ const QGLWidget* shareWidget = nullptr,
Qt::WindowFlags f = Qt::WindowFlags());
private:
Q_DISABLE_COPY(QGLWidget)
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 9ab5cd36a2..6b4d83888f 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -140,7 +140,7 @@ public:
void initContext(QGLContext *context, const QGLWidget* shareWidget);
bool renderCxPm(QPixmap *pixmap);
void cleanupColormaps();
- void aboutToDestroy() Q_DECL_OVERRIDE {
+ void aboutToDestroy() override {
if (glcx && !parent_changing)
glcx->reset();
}
@@ -488,12 +488,12 @@ public:
}
protected:
- void invalidateResource() Q_DECL_OVERRIDE
+ void invalidateResource() override
{
m_id = 0;
}
- void freeResource(QOpenGLContext *context) Q_DECL_OVERRIDE
+ void freeResource(QOpenGLContext *context) override
{
if (m_id) {
freeResource(QGLContext::fromOpenGLContext(context), m_id);
@@ -517,7 +517,7 @@ public:
}
protected:
- void freeResource(QGLContext *ctx, GLuint id) Q_DECL_OVERRIDE
+ void freeResource(QGLContext *ctx, GLuint id) override
{
m_func(ctx, id);
}
diff --git a/src/opengl/qglbuffer.h b/src/opengl/qglbuffer.h
index 454036a938..daf5227c66 100644
--- a/src/opengl/qglbuffer.h
+++ b/src/opengl/qglbuffer.h
@@ -109,7 +109,7 @@ public:
void write(int offset, const void *data, int count);
void allocate(const void *data, int count);
- inline void allocate(int count) { allocate(Q_NULLPTR, count); }
+ inline void allocate(int count) { allocate(nullptr, count); }
void *map(QGLBuffer::Access access);
bool unmap();
diff --git a/src/opengl/qglcolormap.h b/src/opengl/qglcolormap.h
index 199ed82534..772e327e34 100644
--- a/src/opengl/qglcolormap.h
+++ b/src/opengl/qglcolormap.h
@@ -69,7 +69,7 @@ public:
int findNearest(QRgb color) const;
protected:
- Qt::HANDLE handle() { return d ? d->cmapHandle : Q_NULLPTR; }
+ Qt::HANDLE handle() { return d ? d->cmapHandle : nullptr; }
void setHandle(Qt::HANDLE ahandle) { d->cmapHandle = ahandle; }
private:
diff --git a/src/opengl/qglframebufferobject.h b/src/opengl/qglframebufferobject.h
index f4b6d1ddc1..c88063cbb5 100644
--- a/src/opengl/qglframebufferobject.h
+++ b/src/opengl/qglframebufferobject.h
@@ -84,7 +84,7 @@ public:
QImage toImage() const;
Attachment attachment() const;
- QPaintEngine *paintEngine() const Q_DECL_OVERRIDE;
+ QPaintEngine *paintEngine() const override;
GLuint handle() const;
static bool bindDefault();
@@ -101,8 +101,8 @@ public:
GLenum filter = GL_NEAREST);
protected:
- int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE;
- int devType() const Q_DECL_OVERRIDE { return QInternal::FramebufferObject; }
+ int metric(PaintDeviceMetric metric) const override;
+ int devType() const override { return QInternal::FramebufferObject; }
private:
Q_DISABLE_COPY(QGLFramebufferObject)
diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h
index d3af1fdbaa..bf5e21cf0b 100644
--- a/src/opengl/qglframebufferobject_p.h
+++ b/src/opengl/qglframebufferobject_p.h
@@ -106,11 +106,11 @@ public:
class QGLFBOGLPaintDevice : public QGLPaintDevice
{
public:
- virtual QPaintEngine* paintEngine() const Q_DECL_OVERRIDE {return fbo->paintEngine();}
- virtual QSize size() const Q_DECL_OVERRIDE {return fbo->size();}
- virtual QGLContext* context() const Q_DECL_OVERRIDE;
- virtual QGLFormat format() const Q_DECL_OVERRIDE {return fboFormat;}
- virtual bool alphaRequested() const Q_DECL_OVERRIDE { return reqAlpha; }
+ virtual QPaintEngine* paintEngine() const override {return fbo->paintEngine();}
+ virtual QSize size() const override {return fbo->size();}
+ virtual QGLContext* context() const override;
+ virtual QGLFormat format() const override {return fboFormat;}
+ virtual bool alphaRequested() const override { return reqAlpha; }
void setFBO(QGLFramebufferObject* f,
QGLFramebufferObject::Attachment attachment);
diff --git a/src/opengl/qglfunctions.cpp b/src/opengl/qglfunctions.cpp
index a1ea1b1e56..07e1194342 100644
--- a/src/opengl/qglfunctions.cpp
+++ b/src/opengl/qglfunctions.cpp
@@ -159,12 +159,12 @@ struct QGLFunctionsPrivateEx : public QGLFunctionsPrivate, public QOpenGLSharedR
delete funcs;
}
- void invalidateResource() Q_DECL_OVERRIDE
+ void invalidateResource() override
{
m_features = -1;
}
- void freeResource(QOpenGLContext *) Q_DECL_OVERRIDE
+ void freeResource(QOpenGLContext *) override
{
// no gl resources to free
}
diff --git a/src/opengl/qglfunctions.h b/src/opengl/qglfunctions.h
index 211212125e..d8c5249a1a 100644
--- a/src/opengl/qglfunctions.h
+++ b/src/opengl/qglfunctions.h
@@ -76,7 +76,7 @@ public:
QGLFunctions::OpenGLFeatures openGLFeatures() const;
bool hasOpenGLFeature(QGLFunctions::OpenGLFeature feature) const;
- void initializeGLFunctions(const QGLContext *context = Q_NULLPTR);
+ void initializeGLFunctions(const QGLContext *context = nullptr);
void glActiveTexture(GLenum texture);
void glAttachShader(GLuint program, GLuint shader);
@@ -178,14 +178,14 @@ public:
private:
QGLFunctionsPrivate *d_ptr;
- static bool isInitialized(const QGLFunctionsPrivate *d) { return d != Q_NULLPTR; }
+ static bool isInitialized(const QGLFunctionsPrivate *d) { return d != nullptr; }
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QGLFunctions::OpenGLFeatures)
struct QGLFunctionsPrivate
{
- QGLFunctionsPrivate(const QGLContext *context = Q_NULLPTR);
+ QGLFunctionsPrivate(const QGLContext *context = nullptr);
QOpenGLFunctions *funcs;
};
diff --git a/src/opengl/qglpaintdevice_p.h b/src/opengl/qglpaintdevice_p.h
index 3b34b2d244..bfecdabd53 100644
--- a/src/opengl/qglpaintdevice_p.h
+++ b/src/opengl/qglpaintdevice_p.h
@@ -64,7 +64,7 @@ public:
QGLPaintDevice();
virtual ~QGLPaintDevice();
- int devType() const Q_DECL_OVERRIDE {return QInternal::OpenGL;}
+ int devType() const override {return QInternal::OpenGL;}
virtual void beginPaint();
virtual void ensureActiveTarget();
@@ -80,7 +80,7 @@ public:
static QGLPaintDevice* getDevice(QPaintDevice*);
protected:
- int metric(QPaintDevice::PaintDeviceMetric metric) const Q_DECL_OVERRIDE;
+ int metric(QPaintDevice::PaintDeviceMetric metric) const override;
GLuint m_previousFBO;
GLuint m_thisFBO;
};
@@ -93,13 +93,13 @@ class Q_OPENGL_EXPORT QGLWidgetGLPaintDevice : public QGLPaintDevice
public:
QGLWidgetGLPaintDevice();
- virtual QPaintEngine* paintEngine() const Q_DECL_OVERRIDE;
+ virtual QPaintEngine* paintEngine() const override;
// QGLWidgets need to do swapBufers in endPaint:
- virtual void beginPaint() Q_DECL_OVERRIDE;
- virtual void endPaint() Q_DECL_OVERRIDE;
- virtual QSize size() const Q_DECL_OVERRIDE;
- virtual QGLContext* context() const Q_DECL_OVERRIDE;
+ virtual void beginPaint() override;
+ virtual void endPaint() override;
+ virtual QSize size() const override;
+ virtual QGLContext* context() const override;
void setWidget(QGLWidget*);
diff --git a/src/opengl/qglpixelbuffer.h b/src/opengl/qglpixelbuffer.h
index bd30ca2663..f5d7929c35 100644
--- a/src/opengl/qglpixelbuffer.h
+++ b/src/opengl/qglpixelbuffer.h
@@ -53,9 +53,9 @@ class Q_OPENGL_EXPORT QGLPixelBuffer : public QPaintDevice
Q_DECLARE_PRIVATE(QGLPixelBuffer)
public:
QGLPixelBuffer(const QSize &size, const QGLFormat &format = QGLFormat::defaultFormat(),
- QGLWidget *shareWidget = Q_NULLPTR);
+ QGLWidget *shareWidget = nullptr);
QGLPixelBuffer(int width, int height, const QGLFormat &format = QGLFormat::defaultFormat(),
- QGLWidget *shareWidget = Q_NULLPTR);
+ QGLWidget *shareWidget = nullptr);
virtual ~QGLPixelBuffer();
bool isValid() const;
@@ -81,14 +81,14 @@ public:
Qt::HANDLE handle() const;
QImage toImage() const;
- QPaintEngine *paintEngine() const Q_DECL_OVERRIDE;
+ QPaintEngine *paintEngine() const override;
QGLFormat format() const;
static bool hasOpenGLPbuffers();
protected:
- int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE;
- int devType() const Q_DECL_OVERRIDE { return QInternal::Pbuffer; }
+ int metric(PaintDeviceMetric metric) const override;
+ int devType() const override { return QInternal::Pbuffer; }
private:
Q_DISABLE_COPY(QGLPixelBuffer)
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h
index f95017d09c..3ce88197d2 100644
--- a/src/opengl/qglshaderprogram.h
+++ b/src/opengl/qglshaderprogram.h
@@ -64,8 +64,8 @@ public:
};
Q_DECLARE_FLAGS(ShaderType, ShaderTypeBit)
- explicit QGLShader(QGLShader::ShaderType type, QObject *parent = Q_NULLPTR);
- QGLShader(QGLShader::ShaderType type, const QGLContext *context, QObject *parent = Q_NULLPTR);
+ explicit QGLShader(QGLShader::ShaderType type, QObject *parent = nullptr);
+ QGLShader(QGLShader::ShaderType type, const QGLContext *context, QObject *parent = nullptr);
virtual ~QGLShader();
QGLShader::ShaderType shaderType() const;
@@ -82,7 +82,7 @@ public:
GLuint shaderId() const;
- static bool hasOpenGLShaders(ShaderType type, const QGLContext *context = Q_NULLPTR);
+ static bool hasOpenGLShaders(ShaderType type, const QGLContext *context = nullptr);
private:
friend class QGLShaderProgram;
@@ -100,8 +100,8 @@ class Q_OPENGL_EXPORT QGLShaderProgram : public QObject
{
Q_OBJECT
public:
- explicit QGLShaderProgram(QObject *parent = Q_NULLPTR);
- explicit QGLShaderProgram(const QGLContext *context, QObject *parent = Q_NULLPTR);
+ explicit QGLShaderProgram(QObject *parent = nullptr);
+ explicit QGLShaderProgram(const QGLContext *context, QObject *parent = nullptr);
virtual ~QGLShaderProgram();
bool addShader(QGLShader *shader);
@@ -286,7 +286,7 @@ public:
void setUniformValueArray(const char *name, const QMatrix4x3 *values, int count);
void setUniformValueArray(const char *name, const QMatrix4x4 *values, int count);
- static bool hasOpenGLShaderPrograms(const QGLContext *context = Q_NULLPTR);
+ static bool hasOpenGLShaderPrograms(const QGLContext *context = nullptr);
private Q_SLOTS:
void shaderDestroyed();
diff --git a/src/opengl/qgraphicsshadereffect.cpp b/src/opengl/qgraphicsshadereffect.cpp
index 218f4af866..cf3d307d71 100644
--- a/src/opengl/qgraphicsshadereffect.cpp
+++ b/src/opengl/qgraphicsshadereffect.cpp
@@ -143,7 +143,7 @@ public:
setSource(source);
}
- void setUniforms(QGLShaderProgram *program) Q_DECL_OVERRIDE;
+ void setUniforms(QGLShaderProgram *program) override;
QGraphicsShaderEffect *effect;
};
diff --git a/src/opengl/qgraphicsshadereffect_p.h b/src/opengl/qgraphicsshadereffect_p.h
index d7e0ec51d4..9efcecd25f 100644
--- a/src/opengl/qgraphicsshadereffect_p.h
+++ b/src/opengl/qgraphicsshadereffect_p.h
@@ -74,7 +74,7 @@ public:
void setPixelShaderFragment(const QByteArray& code);
protected:
- void draw(QPainter *painter) Q_DECL_OVERRIDE;
+ void draw(QPainter *painter) override;
void setUniformsDirty();
virtual void setUniforms(QGLShaderProgram *program);