diff options
author | Ulf Hermann <[email protected]> | 2020-01-24 14:11:53 +0100 |
---|---|---|
committer | Simon Hausmann <[email protected]> | 2020-01-27 13:03:18 +0100 |
commit | 406f15ce0e2707452462ff73b2d660ece960623f (patch) | |
tree | e3878091bff1d9fc78b1dc6b7887b4e3cbbc8d60 | |
parent | 936811f91edb873250d67d27203f24535c102122 (diff) |
Quick: Don't qualify OpenGL includes
The headers are moving from QtGui to QtOpenGL. By avoiding the
qualification we can keep them compiling either way. Also, add
opengl-private to make the types available.
Also removed the QGraphicsRotation hack to get access to the projected
rotation function of QMatrix4x4. The function is public now.
Task-number: QTBUG-74409
Change-Id: I216e8ca09f8e247f96627b081308e3a57c55c29c
Reviewed-by: Ulf Hermann <[email protected]>
33 files changed, 59 insertions, 63 deletions
diff --git a/examples/quick/quickwidgets/quickwidget/fbitem.cpp b/examples/quick/quickwidgets/quickwidget/fbitem.cpp index 95ff2da2e0..3e98168dcf 100644 --- a/examples/quick/quickwidgets/quickwidget/fbitem.cpp +++ b/examples/quick/quickwidgets/quickwidget/fbitem.cpp @@ -49,9 +49,9 @@ ****************************************************************************/ #include "fbitem.h" -#include <QtGui/QOpenGLFramebufferObject> -#include <QtGui/QOpenGLContext> -#include <QtGui/QOpenGLFunctions> +#include <QOpenGLFramebufferObject> +#include <QOpenGLContext> +#include <QOpenGLFunctions> #include <QtCore/QDebug> #if QT_CONFIG(opengl) diff --git a/examples/quick/scenegraph/fboitem/fboinsgrenderer.cpp b/examples/quick/scenegraph/fboitem/fboinsgrenderer.cpp index 8ba5bddb2a..1c7be258be 100644 --- a/examples/quick/scenegraph/fboitem/fboinsgrenderer.cpp +++ b/examples/quick/scenegraph/fboitem/fboinsgrenderer.cpp @@ -51,7 +51,7 @@ #include "fboinsgrenderer.h" #include "logorenderer.h" -#include <QtGui/QOpenGLFramebufferObject> +#include <QOpenGLFramebufferObject> #include <QtQuick/QQuickWindow> #include <qsgsimpletexturenode.h> diff --git a/examples/quick/scenegraph/openglunderqml/squircle.cpp b/examples/quick/scenegraph/openglunderqml/squircle.cpp index 828857fe24..1c4563baa5 100644 --- a/examples/quick/scenegraph/openglunderqml/squircle.cpp +++ b/examples/quick/scenegraph/openglunderqml/squircle.cpp @@ -51,8 +51,8 @@ #include "squircle.h" #include <QtQuick/qquickwindow.h> -#include <QtGui/QOpenGLShaderProgram> -#include <QtGui/QOpenGLContext> +#include <QOpenGLShaderProgram> +#include <QOpenGLContext> #include <QtCore/QRunnable> //! [7] diff --git a/examples/quick/scenegraph/openglunderqml/squircle.h b/examples/quick/scenegraph/openglunderqml/squircle.h index c24fdd50c2..ecd92161fc 100644 --- a/examples/quick/scenegraph/openglunderqml/squircle.h +++ b/examples/quick/scenegraph/openglunderqml/squircle.h @@ -52,8 +52,8 @@ #define SQUIRCLE_H #include <QtQuick/QQuickItem> -#include <QtGui/QOpenGLShaderProgram> -#include <QtGui/QOpenGLFunctions> +#include <QOpenGLShaderProgram> +#include <QOpenGLFunctions> diff --git a/examples/quick/scenegraph/textureinthread/threadrenderer.cpp b/examples/quick/scenegraph/textureinthread/threadrenderer.cpp index c364d0b7dd..5fd8037193 100644 --- a/examples/quick/scenegraph/textureinthread/threadrenderer.cpp +++ b/examples/quick/scenegraph/textureinthread/threadrenderer.cpp @@ -54,8 +54,8 @@ #include <QtCore/QMutex> #include <QtCore/QThread> -#include <QtGui/QOpenGLContext> -#include <QtGui/QOpenGLFramebufferObject> +#include <QOpenGLContext> +#include <QOpenGLFramebufferObject> #include <QtGui/QGuiApplication> #include <QtGui/QOffscreenSurface> diff --git a/examples/quick/scenegraph/twotextureproviders/xorblender.cpp b/examples/quick/scenegraph/twotextureproviders/xorblender.cpp index d5881b9adc..667b0bf8c7 100644 --- a/examples/quick/scenegraph/twotextureproviders/xorblender.cpp +++ b/examples/quick/scenegraph/twotextureproviders/xorblender.cpp @@ -52,8 +52,8 @@ #include <QtCore/QPointer> -#include <QtGui/QOpenGLContext> -#include <QtGui/QOpenGLFunctions> +#include <QOpenGLContext> +#include <QOpenGLFunctions> #include <QtQuick/QSGMaterial> #include <QtQuick/QSGTexture> diff --git a/src/quick/designer/qquickdesignerwindowmanager_p.h b/src/quick/designer/qquickdesignerwindowmanager_p.h index 5e387ff5b9..ac9695953f 100644 --- a/src/quick/designer/qquickdesignerwindowmanager_p.h +++ b/src/quick/designer/qquickdesignerwindowmanager_p.h @@ -58,7 +58,7 @@ #include <private/qsgcontext_p.h> #if QT_CONFIG(opengl) -# include <QtGui/QOpenGLContext> +# include <QOpenGLContext> #endif QT_BEGIN_NAMESPACE diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp index 55ebbe907c..73b52d0c73 100644 --- a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp +++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp @@ -44,8 +44,8 @@ #include <QtQuick/qsgtexture.h> #include <QtGui/QPaintEngine> #if QT_CONFIG(opengl) -# include <QtGui/QOpenGLContext> -# include <QtGui/private/qopenglpaintengine_p.h> +# include <QOpenGLContext> +# include <private/qopenglpaintengine_p.h> #endif #define HAS_SHADOW(offsetX, offsetY, blur, color) (color.isValid() && color.alpha() && (blur || offsetX || offsetY)) diff --git a/src/quick/items/context2d/qquickcontext2dtexture.cpp b/src/quick/items/context2d/qquickcontext2dtexture.cpp index 0ebd1a66c9..1cf3891488 100644 --- a/src/quick/items/context2d/qquickcontext2dtexture.cpp +++ b/src/quick/items/context2d/qquickcontext2dtexture.cpp @@ -43,12 +43,12 @@ #include <private/qquickitem_p.h> #include <QtQuick/private/qsgplaintexture_p.h> #include "qquickcontext2dcommandbuffer_p.h" -#include <QOpenGLPaintDevice> #if QT_CONFIG(opengl) +#include <QOpenGLPaintDevice> #include <QOpenGLFramebufferObject> #include <QOpenGLFramebufferObjectFormat> #include <QOpenGLFunctions> -#include <QtGui/private/qopenglextensions_p.h> +#include <private/qopenglextensions_p.h> #endif #include <QtCore/QThread> #include <QtGui/QGuiApplication> diff --git a/src/quick/items/qquickframebufferobject.cpp b/src/quick/items/qquickframebufferobject.cpp index d5550e78b6..62b982340d 100644 --- a/src/quick/items/qquickframebufferobject.cpp +++ b/src/quick/items/qquickframebufferobject.cpp @@ -39,8 +39,8 @@ #include "qquickframebufferobject.h" -#include <QtGui/QOpenGLFramebufferObject> -#include <QtGui/QOpenGLFunctions> +#include <QOpenGLFramebufferObject> +#include <QOpenGLFunctions> #include <private/qquickitem_p.h> #include <private/qsgadaptationlayer_p.h> #include <qsgtextureprovider.h> diff --git a/src/quick/items/qquicktranslate.cpp b/src/quick/items/qquicktranslate.cpp index 872fe25a18..3bdcfa752e 100644 --- a/src/quick/items/qquicktranslate.cpp +++ b/src/quick/items/qquicktranslate.cpp @@ -434,14 +434,6 @@ void QQuickRotation::setAxis(Qt::Axis axis) } } -class QGraphicsRotation { -public: - static inline void projectedRotate(QMatrix4x4 *matrix, qreal angle, qreal x, qreal y, qreal z) - { - matrix->projectedRotate(angle, x, y, z); - } -}; - void QQuickRotation::applyTo(QMatrix4x4 *matrix) const { Q_D(const QQuickRotation); @@ -450,7 +442,7 @@ void QQuickRotation::applyTo(QMatrix4x4 *matrix) const return; matrix->translate(d->origin); - QGraphicsRotation::projectedRotate(matrix, d->angle, d->axis.x(), d->axis.y(), d->axis.z()); + matrix->projectedRotate(d->angle, d->axis.x(), d->axis.y(), d->axis.z()); matrix->translate(-d->origin); } diff --git a/src/quick/quick.pro b/src/quick/quick.pro index 03182d5875..6db2ae884e 100644 --- a/src/quick/quick.pro +++ b/src/quick/quick.pro @@ -3,6 +3,8 @@ TARGET = QtQuick QT = core-private gui-private qml-private qmlmodels-private qtConfig(qml-network): \ QT_PRIVATE += network +qtConfig(opengl): \ + QT_PRIVATE += opengl-private TRACEPOINT_PROVIDER = $$PWD/qtquick.tracepoints CONFIG += qt_tracepoints diff --git a/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp b/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp index 46b2c6386c..b59d490250 100644 --- a/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp +++ b/src/quick/scenegraph/compressedtexture/qsgcompressedatlastexture.cpp @@ -43,13 +43,13 @@ #include <QtCore/QElapsedTimer> #include <QtCore/QtMath> -#include <QtGui/QOpenGLContext> +#include <QOpenGLContext> #include <QtGui/QGuiApplication> #include <QtGui/QScreen> #include <QtGui/QSurface> #include <QtGui/QWindow> -#include <QtGui/QOpenGLFunctions> -#include <QtGui/QOpenGLTexture> +#include <QOpenGLFunctions> +#include <QOpenGLTexture> #include <QDebug> #include <private/qqmlglobal_p.h> diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index 5401401a0e..5310e76dae 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -50,10 +50,10 @@ #include <QtCore/QtNumeric> #include <QtGui/QGuiApplication> -#include <QtGui/QOpenGLFramebufferObject> -#include <QtGui/QOpenGLVertexArrayObject> -#include <QtGui/QOpenGLFunctions_1_0> -#include <QtGui/QOpenGLFunctions_3_2_Core> +#include <QOpenGLFramebufferObject> +#include <QOpenGLVertexArrayObject> +#include <QOpenGLFunctions_1_0> +#include <QOpenGLFunctions_3_2_Core> #include <private/qnumeric_p.h> #include <private/qquickprofiler_p.h> diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h index 878b63fc8c..b48220fb8c 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h @@ -62,7 +62,7 @@ #include <QtCore/QBitArray> #include <QtCore/QStack> -#include <QtGui/QOpenGLFunctions> +#include <QOpenGLFunctions> #include <QtGui/private/qrhi_p.h> diff --git a/src/quick/scenegraph/qsgdefaultcontext.cpp b/src/quick/scenegraph/qsgdefaultcontext.cpp index ea01b0a3b4..14a0e8b7ab 100644 --- a/src/quick/scenegraph/qsgdefaultcontext.cpp +++ b/src/quick/scenegraph/qsgdefaultcontext.cpp @@ -57,8 +57,8 @@ #endif #include <QtQuick/private/qsgrhishadereffectnode_p.h> -#include <QtGui/QOpenGLContext> -#include <QtGui/QOpenGLFramebufferObject> +#include <QOpenGLContext> +#include <QOpenGLFramebufferObject> #include <QtQuick/private/qquickwindow_p.h> diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h index 7d2635794d..4ddef9af24 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h @@ -52,7 +52,7 @@ // #include <qcolor.h> -#include <QtGui/private/qopengltextureglyphcache_p.h> +#include <private/qopengltextureglyphcache_p.h> #include <QtQuick/qsgmaterial.h> #include <QtQuick/qsgtexture.h> #include <QtQuick/qsggeometry.h> diff --git a/src/quick/scenegraph/qsgdefaultrendercontext.cpp b/src/quick/scenegraph/qsgdefaultrendercontext.cpp index e8c3ac4abb..ae227a0106 100644 --- a/src/quick/scenegraph/qsgdefaultrendercontext.cpp +++ b/src/quick/scenegraph/qsgdefaultrendercontext.cpp @@ -40,7 +40,7 @@ #include "qsgdefaultrendercontext_p.h" #include <QtGui/QGuiApplication> -#include <QtGui/QOpenGLFramebufferObject> +#include <QOpenGLFramebufferObject> #include <QtQuick/private/qsgbatchrenderer_p.h> #include <QtQuick/private/qsgrenderer_p.h> diff --git a/src/quick/scenegraph/qsgdefaultspritenode.cpp b/src/quick/scenegraph/qsgdefaultspritenode.cpp index 6422a252d9..b2af09cc62 100644 --- a/src/quick/scenegraph/qsgdefaultspritenode.cpp +++ b/src/quick/scenegraph/qsgdefaultspritenode.cpp @@ -40,7 +40,7 @@ #include "qsgdefaultspritenode_p.h" #include <QtQuick/QSGMaterial> -#include <QtGui/QOpenGLShaderProgram> +#include <QOpenGLShaderProgram> QT_BEGIN_NAMESPACE diff --git a/src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp index b6b6f3b057..fc8ec25053 100644 --- a/src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp +++ b/src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp @@ -45,7 +45,7 @@ #include <QtQml/qqmlfile.h> #include <QtGui/private/qdistancefield_p.h> -#include <QtGui/private/qopenglcontext_p.h> +#include <private/qopenglcontext_p.h> #include <QtQml/private/qqmlglobal_p.h> #include <qopenglfunctions.h> #include <qopenglframebufferobject.h> diff --git a/src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h b/src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h index 66d1b52f86..e78e735b6f 100644 --- a/src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h +++ b/src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h @@ -56,7 +56,7 @@ #include <qopenglshaderprogram.h> #include <qopenglbuffer.h> #include <qopenglvertexarrayobject.h> -#include <QtGui/private/qopenglengineshadersource_p.h> +#include <private/qopenglengineshadersource_p.h> #include <private/qsgareaallocator_p.h> QT_BEGIN_NAMESPACE diff --git a/src/quick/scenegraph/qsgopengllayer.cpp b/src/quick/scenegraph/qsgopengllayer.cpp index ae5032231d..be289aeace 100644 --- a/src/quick/scenegraph/qsgopengllayer.cpp +++ b/src/quick/scenegraph/qsgopengllayer.cpp @@ -42,9 +42,9 @@ #include <private/qsgrenderer_p.h> #include <private/qsgdefaultrendercontext_p.h> -#include <QtGui/QOpenGLFramebufferObject> -#include <QtGui/QOpenGLFunctions> -#include <QtGui/private/qopenglextensions_p.h> +#include <QOpenGLFramebufferObject> +#include <QOpenGLFunctions> +#include <private/qopenglextensions_p.h> #include <QtQuick/private/qsgdepthstencilbuffer_p.h> diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index 94f15b55d4..c4f6d4457d 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -65,7 +65,7 @@ #include <private/qsgrhishadereffectnode_p.h> #if QT_CONFIG(opengl) -#include <QtGui/QOpenGLContext> +#include <QOpenGLContext> #if QT_CONFIG(quick_shadereffect) #include <private/qquickopenglshadereffectnode_p.h> #endif diff --git a/src/quick/scenegraph/qsgthreadedrenderloop_p.h b/src/quick/scenegraph/qsgthreadedrenderloop_p.h index e5e9fa8b48..d805c91d79 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop_p.h +++ b/src/quick/scenegraph/qsgthreadedrenderloop_p.h @@ -52,7 +52,7 @@ // #include <QtCore/QThread> -#include <QtGui/QOpenGLContext> +#include <QOpenGLContext> #include <private/qsgcontext_p.h> #include "qsgrenderloop_p.h" diff --git a/src/quick/scenegraph/qsgwindowsrenderloop_p.h b/src/quick/scenegraph/qsgwindowsrenderloop_p.h index a1188fed8a..4021ddb369 100644 --- a/src/quick/scenegraph/qsgwindowsrenderloop_p.h +++ b/src/quick/scenegraph/qsgwindowsrenderloop_p.h @@ -54,7 +54,7 @@ #include <QtCore/QObject> #include <QtCore/QElapsedTimer> -#include <QtGui/QOpenGLContext> +#include <QOpenGLContext> #include "qsgrenderloop_p.h" diff --git a/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h b/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h index f7c6923021..10c94a5954 100644 --- a/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h +++ b/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h @@ -52,8 +52,8 @@ // #include <QtCore/qsize.h> -#include <QtGui/private/qopenglcontext_p.h> -#include <QtGui/private/qopenglextensions_p.h> +#include <private/qopenglcontext_p.h> +#include <private/qopenglextensions_p.h> #include <QtCore/qsharedpointer.h> #include <QtCore/qhash.h> diff --git a/src/quick/scenegraph/util/qsgopenglatlastexture.cpp b/src/quick/scenegraph/util/qsgopenglatlastexture.cpp index 18c72286d1..b445a61940 100644 --- a/src/quick/scenegraph/util/qsgopenglatlastexture.cpp +++ b/src/quick/scenegraph/util/qsgopenglatlastexture.cpp @@ -43,9 +43,9 @@ #include <QtCore/QElapsedTimer> #include <QtCore/QtMath> -#include <QtGui/QOpenGLContext> -#include <QtGui/QOpenGLTexture> -#include <QtGui/QOpenGLFunctions> +#include <QOpenGLContext> +#include <QOpenGLTexture> +#include <QOpenGLFunctions> #include <QtGui/QGuiApplication> #include <QtGui/QScreen> #include <QtGui/QSurface> diff --git a/src/quick/scenegraph/util/qsgplaintexture.cpp b/src/quick/scenegraph/util/qsgplaintexture.cpp index f00918bb4e..37dc0f9138 100644 --- a/src/quick/scenegraph/util/qsgplaintexture.cpp +++ b/src/quick/scenegraph/util/qsgplaintexture.cpp @@ -45,9 +45,9 @@ #include <QtGui/qguiapplication.h> #include <QtGui/qpa/qplatformnativeinterface.h> #if QT_CONFIG(opengl) -# include <QtGui/qopenglcontext.h> -# include <QtGui/qopenglfunctions.h> -# include <QtGui/private/qopengltextureuploader_p.h> +# include <qopenglcontext.h> +# include <qopenglfunctions.h> +# include <private/qopengltextureuploader_p.h> # include <private/qsgdefaultrendercontext_p.h> #endif #include <QtGui/private/qrhi_p.h> diff --git a/src/quickshapes/qquickshapegenericrenderer.cpp b/src/quickshapes/qquickshapegenericrenderer.cpp index e0df739987..91716981d8 100644 --- a/src/quickshapes/qquickshapegenericrenderer.cpp +++ b/src/quickshapes/qquickshapegenericrenderer.cpp @@ -49,7 +49,7 @@ #if QT_CONFIG(opengl) #include <QOpenGLContext> #include <QOffscreenSurface> -#include <QtGui/private/qopenglextensions_p.h> +#include <private/qopenglextensions_p.h> #endif QT_BEGIN_NAMESPACE diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index 655923856c..dbb103973c 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -59,9 +59,9 @@ #include <QtGui/qpa/qplatformintegration.h> #if QT_CONFIG(opengl) -#include <QtGui/QOpenGLContext> -#include <QtGui/QOpenGLFunctions> -#include <QtGui/private/qopenglextensions_p.h> +#include <QOpenGLContext> +#include <QOpenGLFunctions> +#include <private/qopenglextensions_p.h> #endif #include <QtGui/QPainter> diff --git a/tests/auto/quick/nodes/tst_nodestest.cpp b/tests/auto/quick/nodes/tst_nodestest.cpp index 249ecd5aa5..1b2b355596 100644 --- a/tests/auto/quick/nodes/tst_nodestest.cpp +++ b/tests/auto/quick/nodes/tst_nodestest.cpp @@ -30,7 +30,7 @@ #include <QtTest/QtTest> #include <QtGui/QOffscreenSurface> -#include <QtGui/QOpenGLContext> +#include <QOpenGLContext> #include <QtQuick/qsgnode.h> #include <QtQuick/private/qsgbatchrenderer_p.h> #include <QtQuick/private/qsgnodeupdater_p.h> diff --git a/tests/auto/quick/nokeywords/nokeywords.pro b/tests/auto/quick/nokeywords/nokeywords.pro index 6872dac22a..69e1abe43e 100644 --- a/tests/auto/quick/nokeywords/nokeywords.pro +++ b/tests/auto/quick/nokeywords/nokeywords.pro @@ -7,3 +7,5 @@ SOURCES += tst_nokeywords.cpp CONFIG+=parallel_test QT += quick core-private gui-private qml-private quick-private testlib +qtConfig(opengl): \ + QT_PRIVATE += opengl-private diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp index 260c5bb7d1..28370cb522 100644 --- a/tools/qmlscene/main.cpp +++ b/tools/qmlscene/main.cpp @@ -36,7 +36,7 @@ #include <QtCore/qregularexpression.h> #include <QtGui/QGuiApplication> -#include <QtGui/QOpenGLFunctions> +#include <QOpenGLFunctions> #include <QtQml/qqml.h> #include <QtQml/qqmlengine.h> |