Adapt to QQuickItem::geometryChanged() rename in Qt6

This commit is contained in:
Volker Krause 2022-03-10 19:02:36 +01:00
parent fe56f36dd0
commit f6d14f0401
2 changed files with 12 additions and 0 deletions

View file

@ -304,12 +304,20 @@ void ExpoLayout::removeCell(ExpoCell *cell)
polish(); polish();
} }
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void ExpoLayout::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) void ExpoLayout::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
#else
void ExpoLayout::geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
#endif
{ {
if (newGeometry.size() != oldGeometry.size()) { if (newGeometry.size() != oldGeometry.size()) {
polish(); polish();
} }
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QQuickItem::geometryChanged(newGeometry, oldGeometry); QQuickItem::geometryChanged(newGeometry, oldGeometry);
#else
QQuickItem::geometryChange(newGeometry, oldGeometry);
#endif
} }
static int distance(const QPoint &a, const QPoint &b) static int distance(const QPoint &a, const QPoint &b)

View file

@ -47,7 +47,11 @@ public:
void setReady(); void setReady();
protected: protected:
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override; void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
#else
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
#endif
void updatePolish() override; void updatePolish() override;
Q_SIGNALS: Q_SIGNALS: