Move QOpenGLWindow from QtGui to QtOpenGL

Task-number: QTBUG-74409
Change-Id: If7d27cdfa2c6cd5b167887ad77b9cfe413cb106a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Johan Klokkhammer Helsing 2019-12-11 12:20:06 +01:00
parent d14fd32d40
commit 4772a2da15
12 changed files with 25 additions and 13 deletions

View File

@ -1,3 +1,5 @@
QT += opengl
HEADERS = $$PWD/glwindow.h HEADERS = $$PWD/glwindow.h
SOURCES = $$PWD/glwindow.cpp \ SOURCES = $$PWD/glwindow.cpp \

View File

@ -1,3 +1,5 @@
QT += opengl
HEADERS = $$PWD/glwindow.h \ HEADERS = $$PWD/glwindow.h \
$$PWD/../hellogl2/logo.h $$PWD/../hellogl2/logo.h

View File

@ -1,6 +1,7 @@
TEMPLATE = app TEMPLATE = app
TARGET = qopenglwindow TARGET = qopenglwindow
INCLUDEPATH += . INCLUDEPATH += .
QT += opengl
RESOURCES += shaders.qrc RESOURCES += shaders.qrc

View File

@ -63,7 +63,9 @@
#include <QOffscreenSurface> #include <QOffscreenSurface>
#include <QOpenGLContext> #include <QOpenGLContext>
#include <QOpenGLPaintDevice> #include <QOpenGLPaintDevice>
#include <QOpenGLWindow> #if QT_CONFIG(opengl)
#include <QtOpenGL/QOpenGLWindow>
#endif
extern QPixmap cached(const QString &img); extern QPixmap cached(const QString &img);

View File

@ -53,6 +53,10 @@
#include <algorithm> #include <algorithm>
#if QT_CONFIG(opengl)
#include <QtOpenGL/QOpenGLWindow>
#endif
#define printf #define printf
HoverPoints::HoverPoints(QWidget *widget, PointShape shape) HoverPoints::HoverPoints(QWidget *widget, PointShape shape)

View File

@ -1,6 +1,7 @@
INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD
qtConfig(opengl) { qtConfig(opengl) {
QT += opengl
SOURCES += $$PWD/fbopaintdevice.cpp SOURCES += $$PWD/fbopaintdevice.cpp
HEADERS += $$PWD/fbopaintdevice.h HEADERS += $$PWD/fbopaintdevice.h
} }

View File

@ -158,13 +158,11 @@ qtConfig(opengl) {
HEADERS += \ HEADERS += \
kernel/qplatformopenglcontext.h \ kernel/qplatformopenglcontext.h \
kernel/qopenglcontext.h \ kernel/qopenglcontext.h \
kernel/qopenglcontext_p.h \ kernel/qopenglcontext_p.h
kernel/qopenglwindow.h
SOURCES += \ SOURCES += \
kernel/qplatformopenglcontext.cpp \ kernel/qplatformopenglcontext.cpp \
kernel/qopenglcontext.cpp \ kernel/qopenglcontext.cpp
kernel/qopenglwindow.cpp
} }
qtConfig(shortcut) { qtConfig(shortcut) {

View File

@ -11,9 +11,11 @@ qtConfig(opengles2): CONFIG += opengles2
HEADERS += \ HEADERS += \
qopengldebug.h \ qopengldebug.h \
qopenglwindow.h \
qtopenglglobal.h qtopenglglobal.h
SOURCES += \ SOURCES += \
qopenglwindow.cpp \
qopengldebug.cpp qopengldebug.cpp
!qtConfig(opengles2) { !qtConfig(opengles2) {

View File

@ -3,7 +3,7 @@
** Copyright (C) 2016 The Qt Company Ltd. ** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the QtGui module of the Qt Toolkit. ** This file is part of the QtOpenGL module of the Qt Toolkit.
** **
** $QT_BEGIN_LICENSE:LGPL$ ** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage ** Commercial License Usage
@ -38,11 +38,11 @@
****************************************************************************/ ****************************************************************************/
#include "qopenglwindow.h" #include "qopenglwindow.h"
#include "qpaintdevicewindow_p.h"
#include <QtGui/QOpenGLFramebufferObject> #include <QtGui/QOpenGLFramebufferObject>
#include <QtGui/QOpenGLPaintDevice> #include <QtGui/QOpenGLPaintDevice>
#include <QtGui/QOpenGLFunctions> #include <QtGui/QOpenGLFunctions>
#include <QtGui/QOpenGLTextureBlitter> #include <QtGui/QOpenGLTextureBlitter>
#include <QtGui/private/qpaintdevicewindow_p.h>
#include <QtGui/private/qopenglextensions_p.h> #include <QtGui/private/qopenglextensions_p.h>
#include <QtGui/private/qopenglcontext_p.h> #include <QtGui/private/qopenglcontext_p.h>
#include <QtGui/QMatrix4x4> #include <QtGui/QMatrix4x4>
@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
/*! /*!
\class QOpenGLWindow \class QOpenGLWindow
\inmodule QtGui \inmodule QtOpenGL
\since 5.4 \since 5.4
\brief The QOpenGLWindow class is a convenience subclass of QWindow to perform OpenGL painting. \brief The QOpenGLWindow class is a convenience subclass of QWindow to perform OpenGL painting.

View File

@ -3,7 +3,7 @@
** Copyright (C) 2016 The Qt Company Ltd. ** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the QtGui module of the Qt Toolkit. ** This file is part of the QtOpenGL module of the Qt Toolkit.
** **
** $QT_BEGIN_LICENSE:LGPL$ ** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage ** Commercial License Usage
@ -40,7 +40,7 @@
#ifndef QOPENGLWINDOW_H #ifndef QOPENGLWINDOW_H
#define QOPENGLWINDOW_H #define QOPENGLWINDOW_H
#include <QtGui/qtguiglobal.h> #include <QtOpenGL/qtopenglglobal.h>
#ifndef QT_NO_OPENGL #ifndef QT_NO_OPENGL
@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
class QOpenGLWindowPrivate; class QOpenGLWindowPrivate;
class Q_GUI_EXPORT QOpenGLWindow : public QPaintDeviceWindow class Q_OPENGL_EXPORT QOpenGLWindow : public QPaintDeviceWindow
{ {
Q_OBJECT Q_OBJECT
Q_DECLARE_PRIVATE(QOpenGLWindow) Q_DECLARE_PRIVATE(QOpenGLWindow)

View File

@ -1,6 +1,6 @@
CONFIG += testcase CONFIG += testcase
TARGET = tst_qopenglwindow TARGET = tst_qopenglwindow
QT += core-private gui-private testlib QT += opengl core-private gui-private testlib
SOURCES += tst_qopenglwindow.cpp SOURCES += tst_qopenglwindow.cpp

View File

@ -26,7 +26,7 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtGui/QOpenGLWindow> #include <QtOpenGL/QOpenGLWindow>
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <QtGui/QOpenGLFunctions> #include <QtGui/QOpenGLFunctions>
#include <QtGui/QOpenGLContext> #include <QtGui/QOpenGLContext>