Commit a8e32114 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt api to qt6

parent 23558d5e
Pipeline #198745 passed with stage
in 3 minutes and 24 seconds
......@@ -112,10 +112,18 @@ void Graph2DMobile::setTicksShownAtAll(bool shown)
setShowTickLabels(show);
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void Graph2DMobile::geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry)
#else
void Graph2DMobile::geometryChange(const QRectF& newGeometry, const QRectF& oldGeometry)
#endif
{
m_dirty = true;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QQuickItem::geometryChanged(newGeometry, oldGeometry);
#else
QQuickItem::geometryChange(newGeometry, oldGeometry);
#endif
}
QSGNode* Graph2DMobile::updatePaintNode(QSGNode* node, QQuickItem::UpdatePaintNodeData* /*data*/)
......
......@@ -49,7 +49,11 @@ class Graph2DMobile : public QQuickItem, public Analitza::Plotter2D
virtual void modelChanged() override;
virtual int currentFunction() const override { return m_currentFunction; }
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void geometryChanged(const QRectF& newGeometry, const QRectF& oldGeometry) override;
#else
void geometryChange(const QRectF& newGeometry, const QRectF& oldGeometry) override;
#endif
QSGNode* updatePaintNode(QSGNode*, UpdatePaintNodeData*) override;
void setCurrentFunction(int f) { m_currentFunction = f; }
......
......@@ -125,7 +125,11 @@ public:
void render() override {
m_plotter->drawPlots();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_plotter->window()->resetOpenGLState();
#else
m_plotter->window()->endExternalCommands();
#endif
}
QOpenGLFramebufferObject *createFramebufferObject(const QSize &size) override
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment