summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/opengl/2dpainting/2dpainting.pro2
-rw-r--r--examples/opengl/cube/cube.pro2
-rw-r--r--examples/opengl/hellogl2/hellogl2.pro2
-rw-r--r--examples/opengl/qopenglwidget/qopenglwidget.pro2
-rw-r--r--examples/opengl/textures/textures.pro2
-rw-r--r--examples/opengl/threadedqopenglwidget/threadedqopenglwidget.pro2
-rw-r--r--src/opengl/opengl.pro6
-rw-r--r--src/opengl/qopenglwidget.cpp (renamed from src/widgets/kernel/qopenglwidget.cpp)4
-rw-r--r--src/opengl/qopenglwidget.h (renamed from src/widgets/kernel/qopenglwidget.h)6
-rw-r--r--src/widgets/kernel/kernel.pri5
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro1
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp8
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro2
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp2
14 files changed, 24 insertions, 22 deletions
diff --git a/examples/opengl/2dpainting/2dpainting.pro b/examples/opengl/2dpainting/2dpainting.pro
index b9611f5b40..20fe4739a5 100644
--- a/examples/opengl/2dpainting/2dpainting.pro
+++ b/examples/opengl/2dpainting/2dpainting.pro
@@ -1,4 +1,4 @@
-QT += widgets
+QT += widgets opengl
HEADERS = glwidget.h \
helper.h \
diff --git a/examples/opengl/cube/cube.pro b/examples/opengl/cube/cube.pro
index b9416f1a9d..07724e247e 100644
--- a/examples/opengl/cube/cube.pro
+++ b/examples/opengl/cube/cube.pro
@@ -1,4 +1,4 @@
-QT += core gui widgets
+QT += core gui widgets opengl
TARGET = cube
TEMPLATE = app
diff --git a/examples/opengl/hellogl2/hellogl2.pro b/examples/opengl/hellogl2/hellogl2.pro
index 3a52e04d74..834ae82e1f 100644
--- a/examples/opengl/hellogl2/hellogl2.pro
+++ b/examples/opengl/hellogl2/hellogl2.pro
@@ -8,7 +8,7 @@ SOURCES = glwidget.cpp \
mainwindow.cpp \
logo.cpp
-QT += widgets
+QT += widgets opengl
# install
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl2
diff --git a/examples/opengl/qopenglwidget/qopenglwidget.pro b/examples/opengl/qopenglwidget/qopenglwidget.pro
index 0165285c02..1df3de1290 100644
--- a/examples/opengl/qopenglwidget/qopenglwidget.pro
+++ b/examples/opengl/qopenglwidget/qopenglwidget.pro
@@ -1,4 +1,4 @@
-QT += widgets
+QT += widgets opengl
SOURCES += main.cpp \
glwidget.cpp \
diff --git a/examples/opengl/textures/textures.pro b/examples/opengl/textures/textures.pro
index 7a7d19bee6..ae1ae4d34c 100644
--- a/examples/opengl/textures/textures.pro
+++ b/examples/opengl/textures/textures.pro
@@ -6,7 +6,7 @@ SOURCES = glwidget.cpp \
RESOURCES = textures.qrc
-QT += widgets
+QT += widgets opengl
# install
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/textures
diff --git a/examples/opengl/threadedqopenglwidget/threadedqopenglwidget.pro b/examples/opengl/threadedqopenglwidget/threadedqopenglwidget.pro
index 4e941b28c4..70694459b2 100644
--- a/examples/opengl/threadedqopenglwidget/threadedqopenglwidget.pro
+++ b/examples/opengl/threadedqopenglwidget/threadedqopenglwidget.pro
@@ -1,4 +1,4 @@
-QT += widgets
+QT += widgets opengl
SOURCES += main.cpp \
glwidget.cpp \
diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
index 820e46ed79..eaa10de22a 100644
--- a/src/opengl/opengl.pro
+++ b/src/opengl/opengl.pro
@@ -1,5 +1,6 @@
TARGET = QtOpenGL
QT = core-private gui-private
+qtConfig(widgets): QT += widgets widgets-private
DEFINES += QT_NO_USING_NAMESPACE QT_NO_FOREACH
@@ -23,4 +24,9 @@ SOURCES += \
SOURCES += qopengltimerquery.cpp
}
+qtConfig(widgets) {
+ HEADERS += qopenglwidget.h
+ SOURCES += qopenglwidget.cpp
+}
+
load(qt_module)
diff --git a/src/widgets/kernel/qopenglwidget.cpp b/src/opengl/qopenglwidget.cpp
index 90622fd21e..a6c63ae034 100644
--- a/src/widgets/kernel/qopenglwidget.cpp
+++ b/src/opengl/qopenglwidget.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
-** This file is part of the QtWidgets module of the Qt Toolkit.
+** This file is part of the QtOpenGL module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
/*!
\class QOpenGLWidget
- \inmodule QtWidgets
+ \inmodule QtOpenGL
\since 5.4
\brief The QOpenGLWidget class is a widget for rendering OpenGL graphics.
diff --git a/src/widgets/kernel/qopenglwidget.h b/src/opengl/qopenglwidget.h
index 9eb4a9ba5a..b331880b5d 100644
--- a/src/widgets/kernel/qopenglwidget.h
+++ b/src/opengl/qopenglwidget.h
@@ -3,7 +3,7 @@
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
-** This file is part of the QtWidgets module of the Qt Toolkit.
+** This file is part of the QtOpenGL module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -40,7 +40,7 @@
#ifndef QOPENGLWIDGET_H
#define QOPENGLWIDGET_H
-#include <QtWidgets/qtwidgetsglobal.h>
+#include <QtOpenGL/qtopenglglobal.h>
#ifndef QT_NO_OPENGL
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
class QOpenGLWidgetPrivate;
-class Q_WIDGETS_EXPORT QOpenGLWidget : public QWidget
+class Q_OPENGL_EXPORT QOpenGLWidget : public QWidget
{
Q_OBJECT
Q_DECLARE_PRIVATE(QOpenGLWidget)
diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri
index 58107973d8..a960280959 100644
--- a/src/widgets/kernel/kernel.pri
+++ b/src/widgets/kernel/kernel.pri
@@ -68,11 +68,6 @@ qtConfig(action) {
kernel/qwidgetaction.cpp
}
-qtConfig(opengl) {
- HEADERS += kernel/qopenglwidget.h
- SOURCES += kernel/qopenglwidget.cpp
-}
-
qtConfig(formlayout) {
HEADERS += kernel/qformlayout.h
SOURCES += kernel/qformlayout.cpp
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro
index 8ed19697a4..e95cdcf7d8 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/qgraphicsview.pro
@@ -4,6 +4,7 @@ TARGET = tst_qgraphicsview
QT += widgets widgets-private testlib
QT += core-private gui-private testlib-private
+qtConfig(opengl): QT += opengl
SOURCES += tst_qgraphicsview.cpp tst_qgraphicsview_2.cpp
HEADERS += tst_qgraphicsview.h
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index ea89e2422b..d521c6f11c 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -48,8 +48,8 @@
#include <QtWidgets/QBoxLayout>
#include <QtWidgets/QStyle>
#include <QtWidgets/QPushButton>
-#ifndef QT_NO_OPENGL
-#include <QtWidgets/QOpenGLWidget>
+#if QT_CONFIG(opengl)
+#include <QtOpenGL/QOpenGLWidget>
#endif
#include <private/qgraphicsscene_p.h>
#include <private/qgraphicsview_p.h>
@@ -154,7 +154,7 @@ private slots:
void sceneRect_growing();
void setSceneRect();
void viewport();
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
void openGLViewport();
#endif
void dragMode_scrollHand();
@@ -659,7 +659,7 @@ void tst_QGraphicsView::viewport()
QVERIFY(QTest::qWaitForWindowExposed(&view));
}
-#ifndef QT_NO_OPENGL
+#if QT_CONFIG(opengl)
void tst_QGraphicsView::openGLViewport()
{
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL))
diff --git a/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro b/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro
index 2d4cff9e10..039f5a71b8 100644
--- a/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro
+++ b/tests/auto/widgets/widgets/qopenglwidget/qopenglwidget.pro
@@ -1,5 +1,5 @@
CONFIG += testcase
TARGET = tst_qopenglwidget
-QT += gui-private core-private testlib widgets
+QT += opengl gui-private core-private testlib widgets
SOURCES += tst_qopenglwidget.cpp
diff --git a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
index 17a5fe2cd9..e96e292525 100644
--- a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
+++ b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
@@ -26,7 +26,7 @@
**
****************************************************************************/
-#include <QtWidgets/QOpenGLWidget>
+#include <QtOpenGL/QOpenGLWidget>
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QPainter>
#include <QtGui/QScreen>