diff --git a/Ladybird/CMakeLists.txt b/Ladybird/CMakeLists.txt index d8f1a6ca2d0..5333aea599a 100644 --- a/Ladybird/CMakeLists.txt +++ b/Ladybird/CMakeLists.txt @@ -32,9 +32,6 @@ add_compile_options(-Wno-expansion-to-defined) set(CMAKE_AUTOMOC ON) find_package(Qt6 REQUIRED COMPONENTS Core Widgets Network) -# FIXME: Stop using deprecated declarations from QT :^) -add_compile_options(-Wno-deprecated-declarations) - set(SOURCES BrowserWindow.cpp RequestManagerQt.cpp diff --git a/Ladybird/WebView.cpp b/Ladybird/WebView.cpp index f81a3cbb376..073c4f6707c 100644 --- a/Ladybird/WebView.cpp +++ b/Ladybird/WebView.cpp @@ -340,7 +340,7 @@ unsigned get_modifiers_from_qt_event(QMouseEvent const& event) void WebView::mouseMoveEvent(QMouseEvent* event) { - Gfx::IntPoint position(event->x() / m_inverse_pixel_scaling_ratio, event->y() / m_inverse_pixel_scaling_ratio); + Gfx::IntPoint position(event->position().x() / m_inverse_pixel_scaling_ratio, event->position().y() / m_inverse_pixel_scaling_ratio); auto buttons = get_buttons_from_qt_event(*event); auto modifiers = get_modifiers_from_qt_event(*event); m_page_client->page().handle_mousemove(to_content(position), buttons, modifiers); @@ -348,7 +348,7 @@ void WebView::mouseMoveEvent(QMouseEvent* event) void WebView::mousePressEvent(QMouseEvent* event) { - Gfx::IntPoint position(event->x() / m_inverse_pixel_scaling_ratio, event->y() / m_inverse_pixel_scaling_ratio); + Gfx::IntPoint position(event->position().x() / m_inverse_pixel_scaling_ratio, event->position().y() / m_inverse_pixel_scaling_ratio); auto button = get_button_from_qt_event(*event); auto modifiers = get_modifiers_from_qt_event(*event); m_page_client->page().handle_mousedown(to_content(position), button, modifiers); @@ -356,7 +356,7 @@ void WebView::mousePressEvent(QMouseEvent* event) void WebView::mouseReleaseEvent(QMouseEvent* event) { - Gfx::IntPoint position(event->x() / m_inverse_pixel_scaling_ratio, event->y() / m_inverse_pixel_scaling_ratio); + Gfx::IntPoint position(event->position().x() / m_inverse_pixel_scaling_ratio, event->position().y() / m_inverse_pixel_scaling_ratio); auto button = get_button_from_qt_event(*event); auto modifiers = get_modifiers_from_qt_event(*event); m_page_client->page().handle_mouseup(to_content(position), button, modifiers);