Move QOpenGLWidget from QtWidgets to QtOpenGL

Task-number: QTBUG-74409
Change-Id: I98a4f8a9e1d439bfdc24eb2910385273cedecd29
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Johan Klokkhammer Helsing 2019-12-11 10:52:31 +01:00
parent 026a8ec802
commit d107706ab9
14 changed files with 24 additions and 22 deletions

View File

@ -1,4 +1,4 @@
QT += widgets
QT += widgets opengl
HEADERS = glwidget.h \
helper.h \

View File

@ -1,4 +1,4 @@
QT += core gui widgets
QT += core gui widgets opengl
TARGET = cube
TEMPLATE = app

View File

@ -8,7 +8,7 @@ SOURCES = glwidget.cpp \
mainwindow.cpp \
logo.cpp
QT += widgets
QT += widgets opengl
# install
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/hellogl2

View File

@ -1,4 +1,4 @@
QT += widgets
QT += widgets opengl
SOURCES += main.cpp \
glwidget.cpp \

View File

@ -6,7 +6,7 @@ SOURCES = glwidget.cpp \
RESOURCES = textures.qrc
QT += widgets
QT += widgets opengl
# install
target.path = $$[QT_INSTALL_EXAMPLES]/opengl/textures

View File

@ -1,4 +1,4 @@
QT += widgets
QT += widgets opengl
SOURCES += main.cpp \
glwidget.cpp \

View File

@ -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)

View File

@ -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.

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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))

View File

@ -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

View File

@ -26,7 +26,7 @@
**
****************************************************************************/
#include <QtWidgets/QOpenGLWidget>
#include <QtOpenGL/QOpenGLWidget>
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QPainter>
#include <QtGui/QScreen>