Ladybird: Stop using deprecated Qt API and re-enable deprecated warnings

This commit is contained in:
Andreas Kling 2022-07-05 21:20:48 +02:00 committed by Andrew Kaster
parent 419d3ec646
commit f96b53f118
Notes: sideshowbarker 2024-07-17 07:11:12 +09:00
2 changed files with 3 additions and 6 deletions

View file

@ -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

View file

@ -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);