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
SOURCES = $$PWD/glwindow.cpp \

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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 QtGui module of the Qt Toolkit.
** This file is part of the QtOpenGL module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@ -38,11 +38,11 @@
****************************************************************************/
#include "qopenglwindow.h"
#include "qpaintdevicewindow_p.h"
#include <QtGui/QOpenGLFramebufferObject>
#include <QtGui/QOpenGLPaintDevice>
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QOpenGLTextureBlitter>
#include <QtGui/private/qpaintdevicewindow_p.h>
#include <QtGui/private/qopenglextensions_p.h>
#include <QtGui/private/qopenglcontext_p.h>
#include <QtGui/QMatrix4x4>
@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
/*!
\class QOpenGLWindow
\inmodule QtGui
\inmodule QtOpenGL
\since 5.4
\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.
** 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$
** Commercial License Usage
@ -40,7 +40,7 @@
#ifndef QOPENGLWINDOW_H
#define QOPENGLWINDOW_H
#include <QtGui/qtguiglobal.h>
#include <QtOpenGL/qtopenglglobal.h>
#ifndef QT_NO_OPENGL
@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
class QOpenGLWindowPrivate;
class Q_GUI_EXPORT QOpenGLWindow : public QPaintDeviceWindow
class Q_OPENGL_EXPORT QOpenGLWindow : public QPaintDeviceWindow
{
Q_OBJECT
Q_DECLARE_PRIVATE(QOpenGLWindow)

View File

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

View File

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