Yuhang Zhao
2023-12-06 8521bbf2f335984542f2071825d7383548862b7a
minor tweaks
5个文件已修改
13 ■■■■■ 已修改文件
examples/mainwindow/mainwindow.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/shared/widgetframe/windowbar.h 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/shared/widgetframe/windowbar_p.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/win32windowcontext.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/quick/quickitemdelegate.cpp 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/mainwindow/mainwindow.cpp
@@ -32,8 +32,7 @@
void MainWindow::installWindowAgent() {
    auto agent = new QWK::WidgetWindowAgent(this);
    if (!agent->setup(this)) {
        qDebug() << "Frameless handle failed to initialize.";
        return;
        qFatal("Frameless handle failed to initialize.");
    }
    auto titleLabel = new QLabel();
examples/shared/widgetframe/windowbar.h
@@ -62,7 +62,7 @@
    protected:
        WindowBar(WindowBarPrivate &d, QWidget *parent = nullptr);
        QScopedPointer<WindowBarPrivate> d_ptr;
        const std::unique_ptr<WindowBarPrivate> d_ptr;
    };
}
examples/shared/widgetframe/windowbar_p.h
@@ -9,6 +9,7 @@
    class WindowBarPrivate {
        Q_DECLARE_PUBLIC(WindowBar)
        Q_DISABLE_COPY(WindowBarPrivate)
    public:
        WindowBarPrivate();
        virtual ~WindowBarPrivate();
src/core/contexts/win32windowcontext.cpp
@@ -1329,6 +1329,7 @@
                        return true;
                    }
                    *result = HTCLIENT;
                    return true;
                } else {
                    if (full) {
                        *result = HTCLIENT;
@@ -1390,9 +1391,9 @@
                        return true;
                    }
                    *result = HTCLIENT;
                }
                return true;
            }
            }
            default:
                break;
        }
src/quick/quickitemdelegate.cpp
@@ -25,11 +25,7 @@
    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();
    }