diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-11-16 14:22:36 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-11-29 10:10:27 +0000 |
commit | e579076bb36e6594003b2ade7f3d062944ef6f47 (patch) | |
tree | 1c00c8a02c638582d342504f3bebd45dbcd46be1 /src/quick/items/context2d/qquickcontext2d.cpp | |
parent | 4e1463c20aa6ec52f23e1e5f6426b68edb2255f0 (diff) |
Get rid of most QT_NO_FOO usages
Instead use QT_CONFIG(foo). This change actually detected a few
mis-spelled macros and invalid usages.
Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/items/context2d/qquickcontext2d.cpp')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 2483a8eadb..bcaedd67b4 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -75,7 +75,7 @@ #include <private/qguiapplication_p.h> #include <qpa/qplatformintegration.h> -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) # include <private/qsgdefaultrendercontext_p.h> #endif @@ -3997,7 +3997,7 @@ public: ~QQuickContext2DThreadCleanup() { -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) context->makeCurrent(surface); delete texture; context->doneCurrent(); @@ -4038,7 +4038,7 @@ QQuickContext2D::~QQuickContext2D() delete m_buffer; if (m_renderTarget == QQuickCanvasItem::FramebufferObject) { -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) if (m_renderStrategy == QQuickCanvasItem::Immediate && m_glContext) { Q_ASSERT(QThread::currentThread() == m_glContext->thread()); m_glContext->makeCurrent(m_surface.data()); @@ -4115,7 +4115,7 @@ void QQuickContext2D::init(QQuickCanvasItem *canvasItem, const QVariantMap &args m_texture = new QQuickContext2DImageTexture; break; case QQuickCanvasItem::FramebufferObject: -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) m_texture = new QQuickContext2DFBOTexture; #else // It shouldn't be possible to use a FramebufferObject without OpenGL @@ -4134,7 +4134,7 @@ void QQuickContext2D::init(QQuickCanvasItem *canvasItem, const QVariantMap &args m_thread = QThread::currentThread(); QThread *renderThread = m_thread; -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) QQuickWindow *window = canvasItem->window(); QQuickWindowPrivate *wd = QQuickWindowPrivate::get(window); QThread *sceneGraphThread = wd->context->thread(); @@ -4151,7 +4151,7 @@ void QQuickContext2D::init(QQuickCanvasItem *canvasItem, const QVariantMap &args if (renderThread && renderThread != QThread::currentThread()) m_texture->moveToThread(renderThread); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) if (m_renderTarget == QQuickCanvasItem::FramebufferObject && renderThread != sceneGraphThread) { auto openglRenderContext = static_cast<const QSGDefaultRenderContext *>(QQuickWindowPrivate::get(window)->context); QOpenGLContext *cc = openglRenderContext->openglContext(); @@ -4212,7 +4212,7 @@ QImage QQuickContext2D::toImage(const QRectF& bounds) flush(); m_texture->grabImage(bounds); } else { -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) QQuickWindow *window = m_canvas->window(); QOpenGLContext *ctx = window ? window->openglContext() : 0; if (ctx && ctx->isValid()) { |