From 53c6c90c44812c981217e21247388b08358e8098 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 26 Jun 2014 14:32:47 +0200 Subject: Disable some more qtbase examples for dynamic gl builds Examples using OpenGL 1.x cannot be migrated. Therefore, similarly to ES builds, we just disable them. Change-Id: I76e888d2ecfb2582ae35853d9dcdd0cb686fddc6 Reviewed-by: Friedemann Kleint Reviewed-by: Gunnar Sletta --- examples/widgets/graphicsview/graphicsview.pro | 2 +- examples/widgets/painting/composition/composition.cpp | 12 ++++++------ examples/widgets/painting/composition/composition.pro | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/widgets/graphicsview/graphicsview.pro b/examples/widgets/graphicsview/graphicsview.pro index 9d6d7a75f6..06a7ce8071 100644 --- a/examples/widgets/graphicsview/graphicsview.pro +++ b/examples/widgets/graphicsview/graphicsview.pro @@ -15,6 +15,6 @@ SUBDIRS = \ contains(DEFINES, QT_NO_CURSOR)|contains(DEFINES, QT_NO_DRAGANDDROP): SUBDIRS -= dragdroprobot -qtHaveModule(opengl):!contains(QT_CONFIG, opengles.) { +qtHaveModule(opengl):!contains(QT_CONFIG, opengles.):!contains(QT_CONFIG,dynamicgl) { SUBDIRS += boxes } diff --git a/examples/widgets/painting/composition/composition.cpp b/examples/widgets/painting/composition/composition.cpp index d89f9d5fb1..a591cafd06 100644 --- a/examples/widgets/painting/composition/composition.cpp +++ b/examples/widgets/painting/composition/composition.cpp @@ -127,7 +127,7 @@ CompositionWidget::CompositionWidget(QWidget *parent) QPushButton *showSourceButton = new QPushButton(mainGroup); showSourceButton->setText(tr("Show Source")); -#if defined(QT_OPENGL_SUPPORT) && !defined(QT_OPENGL_ES) +#if defined(USE_OPENGL) && !defined(QT_OPENGL_ES) QPushButton *enableOpenGLButton = new QPushButton(mainGroup); enableOpenGLButton->setText(tr("Use OpenGL")); enableOpenGLButton->setCheckable(true); @@ -157,7 +157,7 @@ CompositionWidget::CompositionWidget(QWidget *parent) mainGroupLayout->addWidget(animateButton); mainGroupLayout->addWidget(whatsThisButton); mainGroupLayout->addWidget(showSourceButton); -#if defined(QT_OPENGL_SUPPORT) && !defined(QT_OPENGL_ES) +#if defined(USE_OPENGL) && !defined(QT_OPENGL_ES) mainGroupLayout->addWidget(enableOpenGLButton); #endif @@ -201,7 +201,7 @@ CompositionWidget::CompositionWidget(QWidget *parent) connect(whatsThisButton, SIGNAL(clicked(bool)), view, SLOT(setDescriptionEnabled(bool))); connect(view, SIGNAL(descriptionEnabledChanged(bool)), whatsThisButton, SLOT(setChecked(bool))); connect(showSourceButton, SIGNAL(clicked()), view, SLOT(showSource())); -#if defined(QT_OPENGL_SUPPORT) && !defined(QT_OPENGL_ES) +#if defined(USE_OPENGL) && !defined(QT_OPENGL_ES) connect(enableOpenGLButton, SIGNAL(clicked(bool)), view, SLOT(enableOpenGL(bool))); #endif connect(animateButton, SIGNAL(toggled(bool)), view, SLOT(setAnimationEnabled(bool))); @@ -249,7 +249,7 @@ CompositionRenderer::CompositionRenderer(QWidget *parent) m_circle_pos = QPoint(200, 100); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); -#ifdef QT_OPENGL_SUPPORT +#ifdef USE_OPENGL m_pbuffer = 0; m_pbuffer_size = 1024; #endif @@ -341,7 +341,7 @@ void CompositionRenderer::drawSource(QPainter &p) void CompositionRenderer::paint(QPainter *painter) { -#if defined(QT_OPENGL_SUPPORT) && !defined(QT_OPENGL_ES) +#if defined(USE_OPENGL) && !defined(QT_OPENGL_ES) if (usesOpenGL()) { int new_pbuf_size = m_pbuffer_size; @@ -511,7 +511,7 @@ void CompositionRenderer::setCirclePos(const QPointF &pos) const QRect oldRect = rectangle_around(m_circle_pos).toAlignedRect(); m_circle_pos = pos; const QRect newRect = rectangle_around(m_circle_pos).toAlignedRect(); -#if defined(QT_OPENGL_SUPPORT) && !defined(QT_OPENGL_ES) +#if defined(USE_OPENGL) && !defined(QT_OPENGL_ES) if (usesOpenGL()) { update(); return; diff --git a/examples/widgets/painting/composition/composition.pro b/examples/widgets/painting/composition/composition.pro index 0269945ac8..332291c2a4 100644 --- a/examples/widgets/painting/composition/composition.pro +++ b/examples/widgets/painting/composition/composition.pro @@ -6,9 +6,9 @@ SHARED_FOLDER = ../shared include($$SHARED_FOLDER/shared.pri) RESOURCES += composition.qrc -qtHaveModule(opengl) { - DEFINES += QT_OPENGL_SUPPORT - QT += opengl +qtHaveModule(opengl): !contains(QT_CONFIG,dynamicgl) { + DEFINES += USE_OPENGL + QT += opengl } QT += widgets -- cgit v1.2.3