From a29a1806a39fef3840036eec580c11df55105b73 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Tue, 6 Jun 2023 00:15:43 +0800 Subject: [PATCH] chore: avoid using deprecated function in qt6 builds --- app/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index 21213545..1fe77a55 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -319,7 +319,11 @@ void MainWindow::mouseMoveEvent(QMouseEvent *event) { if (event->buttons() & Qt::LeftButton && m_clickedOnWindow && !isMaximized()) { if (!window()->windowHandle()->startSystemMove()) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + move(event->globalPosition().toPoint() - m_oldMousePos); +#else move(event->globalPos() - m_oldMousePos); +#endif // QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) } event->accept(); }