aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-04-06 14:06:00 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-04-14 11:44:32 +0200
commit94b46de4050d023ecbb238c2636d7e252f8f5949 (patch)
tree311414d07fbcd915d206b3e194d724db724720fc
parent51847c314200a179e113ea5dc4e1d24878b8bcfa (diff)
Deprecate QSGEngine
...and warn about QSGAbstractRenderer becoming private. Task-number: QTBUG-78596 Change-Id: If545e223907a90ae3bcfde235e9677e8a0a5899b Reviewed-by: Andy Nichols <andy.nichols@qt.io>
-rw-r--r--src/quick/scenegraph/coreapi/qsgabstractrenderer.h4
-rw-r--r--src/quick/scenegraph/util/qsgengine.cpp5
-rw-r--r--src/quick/scenegraph/util/qsgengine.h5
-rw-r--r--src/quick/scenegraph/util/qsgengine_p.h2
4 files changed, 14 insertions, 2 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgabstractrenderer.h b/src/quick/scenegraph/coreapi/qsgabstractrenderer.h
index 1594352dab..258a5fed14 100644
--- a/src/quick/scenegraph/coreapi/qsgabstractrenderer.h
+++ b/src/quick/scenegraph/coreapi/qsgabstractrenderer.h
@@ -72,6 +72,10 @@ public:
~QSGAbstractRenderer() override;
+ // just have a warning about becoming private, ifdefing the whole class is not feasible
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_X("QSGAbstractRenderer is no longer going to be public in Qt 6.0. QSGEngine-based workflows are expected to migrate to QQuickRenderControl instead.")
+#endif
void setRootNode(QSGRootNode *node);
QSGRootNode *rootNode() const;
void setDeviceRect(const QRect &rect);
diff --git a/src/quick/scenegraph/util/qsgengine.cpp b/src/quick/scenegraph/util/qsgengine.cpp
index 4880d98871..aec981871b 100644
--- a/src/quick/scenegraph/util/qsgengine.cpp
+++ b/src/quick/scenegraph/util/qsgengine.cpp
@@ -51,6 +51,7 @@
QT_BEGIN_NAMESPACE
+#if QT_DEPRECATED_SINCE(5, 15)
/*!
\class QSGEngine
@@ -58,6 +59,8 @@ QT_BEGIN_NAMESPACE
\inmodule QtQuick
\since 5.4
+ \deprecated
+
A QSGEngine can be used to render a tree of QSGNode directly on a QWindow
or QOpenGLFramebufferObject without any integration with QML, QQuickWindow
or QQuickItem and the convenience that they provide.
@@ -285,6 +288,8 @@ QSGNinePatchNode *QSGEngine::createNinePatchNode() const
return d->sgRenderContext->isValid() ? d->sgRenderContext->sceneGraphContext()->createNinePatchNode() : nullptr;
}
+#endif
+
QT_END_NAMESPACE
#include "moc_qsgengine.cpp"
diff --git a/src/quick/scenegraph/util/qsgengine.h b/src/quick/scenegraph/util/qsgengine.h
index c5a59b47e7..f00b7a0b6f 100644
--- a/src/quick/scenegraph/util/qsgengine.h
+++ b/src/quick/scenegraph/util/qsgengine.h
@@ -54,8 +54,7 @@ class QSGRectangleNode;
class QSGImageNode;
class QSGNinePatchNode;
-// ### Qt 6: Remove or redesign.
-
+#if QT_DEPRECATED_SINCE(5, 15)
class Q_QUICK_EXPORT QSGEngine : public QObject
{
Q_OBJECT
@@ -73,6 +72,7 @@ public:
explicit QSGEngine(QObject *parent = nullptr);
~QSGEngine() override;
+ QT_DEPRECATED_X("QSGEngine is going to be removed in Qt 6.0. Use QQuickRenderControl instead.")
void initialize(QOpenGLContext *context);
void invalidate();
@@ -84,6 +84,7 @@ public:
QSGImageNode *createImageNode() const;
QSGNinePatchNode *createNinePatchNode() const;
};
+#endif
QT_END_NAMESPACE
diff --git a/src/quick/scenegraph/util/qsgengine_p.h b/src/quick/scenegraph/util/qsgengine_p.h
index c5b5c695bd..662c32d3d9 100644
--- a/src/quick/scenegraph/util/qsgengine_p.h
+++ b/src/quick/scenegraph/util/qsgengine_p.h
@@ -59,6 +59,7 @@ QT_BEGIN_NAMESPACE
class QSGContext;
class QSGRenderContext;
+#if QT_DEPRECATED_SINCE(5, 15)
class QSGEnginePrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QSGEngine)
@@ -69,6 +70,7 @@ public:
QScopedPointer<QSGContext> sgContext;
QScopedPointer<QSGRenderContext> sgRenderContext;
};
+#endif
QT_END_NAMESPACE