mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Ladybird: Stop using deprecated Qt API and re-enable deprecated warnings
This commit is contained in:
parent
419d3ec646
commit
f96b53f118
Notes:
sideshowbarker
2024-07-17 07:11:12 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f96b53f118 Pull-request: https://github.com/SerenityOS/serenity/pull/16583 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg
2 changed files with 3 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue