Sine Striker
2023-12-13 f14f27f41385fd8593457413de2cf5a9c5c357e9
src/quick/quickitemdelegate.cpp
@@ -10,7 +10,7 @@
    QuickItemDelegate::~QuickItemDelegate() = default;
    QWindow *QuickItemDelegate::window(const QObject *obj) const {
    QWindow *QuickItemDelegate::window(QObject *obj) const {
        return static_cast<const QQuickItem *>(obj)->window();
    }
@@ -25,16 +25,12 @@
    QRect QuickItemDelegate::mapGeometryToScene(const QObject *obj) const {
        auto item = static_cast<const QQuickItem *>(obj);
        const QPointF originPoint = item->mapToScene(QPointF(0.0, 0.0));
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
        const QSizeF size = item->size();
#else
        const QSizeF size = {item->width(), item->height()};
#endif
        return QRectF(originPoint, size).toRect();
    }
    QWindow *QuickItemDelegate::hostWindow(const QObject *host) const {
        return static_cast<QQuickWindow *>(const_cast<QObject *>(host));
    QWindow *QuickItemDelegate::hostWindow(QObject *host) const {
        return static_cast<QQuickWindow *>(host);
    }
    bool QuickItemDelegate::isHostSizeFixed(const QObject *host) const {
@@ -42,4 +38,8 @@
        return false;
    }
    bool QuickItemDelegate::isWindowActive(const QObject *host) const {
        return static_cast<const QQuickWindow *>(host)->isActive();
    }
}