mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Qt6: small API changes
A member function had a minute name change. The SceneGraphBackend is now set via a string argument, not a magic constant. Thankfully that appears to be backwards compatible. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c3cc3155fc
commit
41fd72c815
3 changed files with 13 additions and 1 deletions
|
@ -309,14 +309,22 @@ QRectF StatsView::plotArea() const
|
||||||
return plotRect;
|
return plotRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
void StatsView::geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
|
||||||
|
#else
|
||||||
void StatsView::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
|
void StatsView::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
plotRect = QRectF(QPointF(0.0, 0.0), newGeometry.size());
|
plotRect = QRectF(QPointF(0.0, 0.0), newGeometry.size());
|
||||||
backgroundDirty = true;
|
backgroundDirty = true;
|
||||||
plotAreaChanged(plotRect.size());
|
plotAreaChanged(plotRect.size());
|
||||||
|
|
||||||
// Do we need to call the base-class' version of geometryChanged? Probably for QML?
|
// Do we need to call the base-class' version of geometryChanged? Probably for QML?
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
QQuickItem::geometryChange(newGeometry, oldGeometry);
|
||||||
|
#else
|
||||||
QQuickItem::geometryChanged(newGeometry, oldGeometry);
|
QQuickItem::geometryChanged(newGeometry, oldGeometry);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatsView::plotAreaChanged(const QSizeF &s)
|
void StatsView::plotAreaChanged(const QSizeF &s)
|
||||||
|
|
|
@ -77,7 +77,11 @@ private:
|
||||||
QRectF plotRect;
|
QRectF plotRect;
|
||||||
QSGNode *updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *updatePaintNodeData) override;
|
QSGNode *updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *updatePaintNodeData) override;
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
|
||||||
|
#else
|
||||||
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
|
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
|
||||||
|
#endif
|
||||||
void plotAreaChanged(const QSizeF &size);
|
void plotAreaChanged(const QSizeF &size);
|
||||||
void reset(); // clears all series and axes
|
void reset(); // clears all series and axes
|
||||||
void setAxes(StatsAxis *x, StatsAxis *y);
|
void setAxes(StatsAxis *x, StatsAxis *y);
|
||||||
|
|
|
@ -204,7 +204,7 @@ exit:
|
||||||
surface.destroy();
|
surface.destroy();
|
||||||
if (glError) {
|
if (glError) {
|
||||||
qWarning() << QStringLiteral(VALIDATE_GL_PREFIX "WARNING: %1. Using a software renderer!").arg(glError);
|
qWarning() << QStringLiteral(VALIDATE_GL_PREFIX "WARNING: %1. Using a software renderer!").arg(glError);
|
||||||
QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
|
QQuickWindow::setSceneGraphBackend("software");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue