summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2020-04-27 11:56:17 +0100
committerPaul Lemire <paul.lemire@kdab.com>2020-05-06 15:29:54 +0200
commit764924da8ab3255c1b8d1ad5b39f85675f4b855e (patch)
treec7b3e9d94318fd347ef2717feb5b539f5c18ff13 /tests
parent9838d91e2d433f13c57bdae48e31ba0b909988aa (diff)
Fix build for Qt6
- updated dependencies, excluding qtgamepad for now - fixed issues with Q_PROPERTY not supporting forward declarations - fixed for changes in QtQuick private API - fixed for changes in QtOpenGLVersionFunctions API - fixed for removal of QT_OPENGL_ES* macros - fixed for changes in QtConcurrent API - fixed RHI based build Change-Id: I42ccd2f101b7f0a78e2860c6d551722bf6710a11 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp2
-rw-r--r--tests/auto/quick3d/3dinput/3dinput.qml3
-rw-r--r--tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp2
-rw-r--r--tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp5
-rw-r--r--tests/auto/render/opengl/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp5
-rw-r--r--tests/auto/render/opengl/graphicshelpergl3_3/graphicshelpergl3_3.pro2
-rw-r--r--tests/auto/render/opengl/graphicshelpergl3_3/tst_graphicshelpergl3_3.cpp5
-rw-r--r--tests/auto/render/opengl/graphicshelpergl4/tst_graphicshelpergl4.cpp5
-rw-r--r--tests/auto/render/render.pro4
-rw-r--r--tests/auto/render/shadergraph/qshadernodesloader/tst_qshadernodesloader.cpp11
-rw-r--r--tests/manual/boundingvolumes/main.cpp2
-rw-r--r--tests/manual/manual-renderloop/main.cpp2
-rw-r--r--tests/manual/qtbug-76766/main.cpp2
-rw-r--r--tests/manual/rendercapture-cpp/orbittransformcontroller.h5
14 files changed, 33 insertions, 22 deletions
diff --git a/tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp b/tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp
index 6fcc2e637..e2917789e 100644
--- a/tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp
+++ b/tests/auto/extras/qtext2dentity/tst_qtext2dentity.cpp
@@ -77,7 +77,7 @@ private slots:
void tst_qtext2dentity::checkChangeArbiter()
{
-#if !defined(QT_OPENGL_ES_2_ANGLE)
+#if !QT_CONFIG(angle)
// GIVEN
Qt3DExtras::Quick::Qt3DQuickWindow view;
view.setSource(QUrl("qrc:/qtext2dentity.qml"));
diff --git a/tests/auto/quick3d/3dinput/3dinput.qml b/tests/auto/quick3d/3dinput/3dinput.qml
index 9ae53f66a..b95a8d460 100644
--- a/tests/auto/quick3d/3dinput/3dinput.qml
+++ b/tests/auto/quick3d/3dinput/3dinput.qml
@@ -47,6 +47,7 @@ Item {
QQ3Input20.AxisSetting {} //Qt3DInput::QAxisSetting
QQ3Input20.AnalogAxisInput {} //Qt3DInput::QAnalogAxisInput
QQ3Input20.ButtonAxisInput {} //Qt3DInput::QButtonAxisInput
- QQ3Input20.GamepadInput {} //Qt3DInput::QGamepadInput
+ // Disabled for Qt 6
+ // QQ3Input20.GamepadInput {} //Qt3DInput::QGamepadInput
}
diff --git a/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp b/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp
index e5c34f804..7d897a358 100644
--- a/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp
+++ b/tests/auto/render/opengl/filtercompatibletechniquejob/tst_filtercompatibletechniquejob.cpp
@@ -179,7 +179,7 @@ private Q_SLOTS:
void initTestCase()
{
QSurfaceFormat format;
-#ifdef QT_OPENGL_ES_2
+#if QT_CONFIG(opengles2)
format.setRenderableType(QSurfaceFormat::OpenGLES);
#else
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) {
diff --git a/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp b/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp
index 5a1d22283..f733697f7 100644
--- a/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp
+++ b/tests/auto/render/opengl/graphicshelpergl2/tst_graphicshelpergl2.cpp
@@ -33,13 +33,14 @@
#include <Qt3DRender/private/attachmentpack_p.h>
#include <QtOpenGLExtensions/QOpenGLExtensions>
#include <QOpenGLContext>
+#include <QOpenGLVersionFunctionsFactory>
#include <QOpenGLBuffer>
#include <QOpenGLFunctions_2_0>
#include <QOpenGLShaderProgram>
#include <QOpenGLVertexArrayObject>
#include <QSurfaceFormat>
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
#define TEST_SHOULD_BE_PERFORMED 1
@@ -153,7 +154,7 @@ private Q_SLOTS:
return;
}
- if ((m_func = m_glContext.versionFunctions<QOpenGLFunctions_2_0>()) != nullptr) {
+ if ((m_func = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_2_0>()) != nullptr) {
if (m_glContext.hasExtension(QByteArrayLiteral("GL_ARB_framebuffer_object"))) {
m_fboFuncs = new QOpenGLExtension_ARB_framebuffer_object();
m_fboFuncs->initializeOpenGLFunctions();
diff --git a/tests/auto/render/opengl/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp b/tests/auto/render/opengl/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp
index 08c30dc15..e784e5b9a 100644
--- a/tests/auto/render/opengl/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp
+++ b/tests/auto/render/opengl/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp
@@ -32,12 +32,13 @@
#include <graphicshelpergl3_2_p.h>
#include <Qt3DRender/private/attachmentpack_p.h>
#include <QOpenGLBuffer>
+#include <QOpenGLVersionFunctionsFactory>
#include <QOpenGLFunctions_3_2_Core>
#include <QOpenGLShaderProgram>
#include <QOpenGLVertexArrayObject>
#include <QSurfaceFormat>
-#if !defined(QT_OPENGL_ES_2) && defined(QT_OPENGL_3_2)
+#if !QT_CONFIG(opengles2) && defined(QT_OPENGL_3_2)
#define TEST_SHOULD_BE_PERFORMED 1
@@ -207,7 +208,7 @@ private Q_SLOTS:
return;
}
- if ((m_func = m_glContext.versionFunctions<QOpenGLFunctions_3_2_Core>()) != nullptr) {
+ if ((m_func = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_2_Core>()) != nullptr) {
m_glHelper.initializeHelper(&m_glContext, m_func);
m_initializationSuccessful = true;
}
diff --git a/tests/auto/render/opengl/graphicshelpergl3_3/graphicshelpergl3_3.pro b/tests/auto/render/opengl/graphicshelpergl3_3/graphicshelpergl3_3.pro
index 5ef0b6806..ae8e06eba 100644
--- a/tests/auto/render/opengl/graphicshelpergl3_3/graphicshelpergl3_3.pro
+++ b/tests/auto/render/opengl/graphicshelpergl3_3/graphicshelpergl3_3.pro
@@ -2,7 +2,7 @@ TEMPLATE = app
TARGET = tst_graphicshelpergl3_3
-QT += 3dcore 3dcore-private 3drender 3drender-private testlib
+QT += 3dcore 3dcore-private 3drender 3drender-private testlib opengl
CONFIG += testcase
diff --git a/tests/auto/render/opengl/graphicshelpergl3_3/tst_graphicshelpergl3_3.cpp b/tests/auto/render/opengl/graphicshelpergl3_3/tst_graphicshelpergl3_3.cpp
index b463e6236..7e2ca4aa0 100644
--- a/tests/auto/render/opengl/graphicshelpergl3_3/tst_graphicshelpergl3_3.cpp
+++ b/tests/auto/render/opengl/graphicshelpergl3_3/tst_graphicshelpergl3_3.cpp
@@ -32,11 +32,12 @@
#include <Qt3DRender/private/attachmentpack_p.h>
#include <graphicshelpergl3_3_p.h>
#include <QOpenGLBuffer>
+#include <QOpenGLVersionFunctionsFactory>
#include <QOpenGLFunctions_3_3_Core>
#include <QOpenGLShaderProgram>
#include <QOpenGLVertexArrayObject>
-#if !defined(QT_OPENGL_ES_2) && defined(QT_OPENGL_3_2)
+#if !QT_CONFIG(opengles2) && defined(QT_OPENGL_3_2)
#define TEST_SHOULD_BE_PERFORMED 1
@@ -207,7 +208,7 @@ private Q_SLOTS:
return;
}
- if ((m_func = m_glContext.versionFunctions<QOpenGLFunctions_3_3_Core>()) != nullptr) {
+ if ((m_func = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_3_Core>()) != nullptr) {
m_glHelper.initializeHelper(&m_glContext, m_func);
m_initializationSuccessful = true;
}
diff --git a/tests/auto/render/opengl/graphicshelpergl4/tst_graphicshelpergl4.cpp b/tests/auto/render/opengl/graphicshelpergl4/tst_graphicshelpergl4.cpp
index 8f86f38ce..92a4a4af0 100644
--- a/tests/auto/render/opengl/graphicshelpergl4/tst_graphicshelpergl4.cpp
+++ b/tests/auto/render/opengl/graphicshelpergl4/tst_graphicshelpergl4.cpp
@@ -36,8 +36,9 @@
#include <QOpenGLShaderProgram>
#include <QOpenGLVertexArrayObject>
#include <QSurfaceFormat>
+#include <QtOpenGL/QOpenGLVersionFunctionsFactory>
-#if !defined(QT_OPENGL_ES_2) && defined(QT_OPENGL_4_3)
+#if !QT_CONFIG(opengles2) && defined(QT_OPENGL_4_3)
#define TEST_SHOULD_BE_PERFORMED 1
@@ -255,7 +256,7 @@ private Q_SLOTS:
return;
}
- if ((m_func = m_glContext.versionFunctions<QOpenGLFunctions_4_3_Core>()) != nullptr) {
+ if ((m_func = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_3_Core>()) != nullptr) {
m_glHelper.initializeHelper(&m_glContext, m_func);
m_initializationSuccessful = true;
}
diff --git a/tests/auto/render/render.pro b/tests/auto/render/render.pro
index e772e3ddd..4582b7644 100644
--- a/tests/auto/render/render.pro
+++ b/tests/auto/render/render.pro
@@ -143,9 +143,7 @@ qtConfig(qt3d-opengl-renderer):qtConfig(private_tests) {
qmaterial \
geometryloaders \
picking \
- pickboundingvolumejob \
- gltfplugins \
- updateshaderdatatransformjob
+ gltfplugins
}
qtConfig(qt3d-input) {
diff --git a/tests/auto/render/shadergraph/qshadernodesloader/tst_qshadernodesloader.cpp b/tests/auto/render/shadergraph/qshadernodesloader/tst_qshadernodesloader.cpp
index 27cf7f425..efce243bd 100644
--- a/tests/auto/render/shadergraph/qshadernodesloader/tst_qshadernodesloader.cpp
+++ b/tests/auto/render/shadergraph/qshadernodesloader/tst_qshadernodesloader.cpp
@@ -32,6 +32,7 @@
#include <QtCore/qbuffer.h>
#include <Qt3DRender/private/qshadernodesloader_p.h>
+#include <Qt3DRender/private/qshadergraphloader_p.h>
#include <Qt3DRender/private/qshaderlanguage_p.h>
using namespace Qt3DRender;
@@ -86,11 +87,21 @@ class tst_QShaderNodesLoader : public QObject
{
Q_OBJECT
private slots:
+ void initTestCase();
void shouldManipulateLoaderMembers();
void shouldLoadFromJsonStream_data();
void shouldLoadFromJsonStream();
};
+void tst_QShaderNodesLoader::initTestCase()
+{
+ // Make sure we register the meta types. This is done by the
+ // QShaderGraphLoader ctor usually but in this test, no QShaderGraphLoader
+ // is used so we need to to it ourselves
+ QShaderGraphLoader l;
+ Q_UNUSED(l);
+}
+
void tst_QShaderNodesLoader::shouldManipulateLoaderMembers()
{
// GIVEN
diff --git a/tests/manual/boundingvolumes/main.cpp b/tests/manual/boundingvolumes/main.cpp
index 2a988a271..4d22a5b68 100644
--- a/tests/manual/boundingvolumes/main.cpp
+++ b/tests/manual/boundingvolumes/main.cpp
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
{
// Set OpenGL requirements
QSurfaceFormat format = QSurfaceFormat::defaultFormat();
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
format.setVersion(4, 1);
format.setProfile(QSurfaceFormat::CoreProfile);
format.setSamples(4);
diff --git a/tests/manual/manual-renderloop/main.cpp b/tests/manual/manual-renderloop/main.cpp
index 44d661136..a3f108e50 100644
--- a/tests/manual/manual-renderloop/main.cpp
+++ b/tests/manual/manual-renderloop/main.cpp
@@ -172,7 +172,7 @@ private:
int main(int ac, char **av)
{
QSurfaceFormat format = QSurfaceFormat::defaultFormat();
-#ifdef QT_OPENGL_ES_2
+#if QT_CONFIG(opengles2)
format.setRenderableType(QSurfaceFormat::OpenGLES);
#else
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) {
diff --git a/tests/manual/qtbug-76766/main.cpp b/tests/manual/qtbug-76766/main.cpp
index f9d49846a..d6cfabd89 100644
--- a/tests/manual/qtbug-76766/main.cpp
+++ b/tests/manual/qtbug-76766/main.cpp
@@ -44,7 +44,7 @@
void setSurfaceFormat()
{
QSurfaceFormat format;
-#ifdef QT_OPENGL_ES_2
+#if QT_CONFIG(opengles2)
format.setRenderableType(QSurfaceFormat::OpenGLES);
#else
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) {
diff --git a/tests/manual/rendercapture-cpp/orbittransformcontroller.h b/tests/manual/rendercapture-cpp/orbittransformcontroller.h
index 5f41722b6..98143388c 100644
--- a/tests/manual/rendercapture-cpp/orbittransformcontroller.h
+++ b/tests/manual/rendercapture-cpp/orbittransformcontroller.h
@@ -54,13 +54,10 @@
#include <QObject>
#include <QMatrix4x4>
+#include <Qt3DCore/QTransform>
QT_BEGIN_NAMESPACE
-namespace Qt3DCore {
-class QTransform;
-}
-
class OrbitTransformController : public QObject
{
Q_OBJECT