From 418f929e7a067a13456f50b5478dcb64619b57ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Tue, 22 Oct 2019 16:04:13 +0200 Subject: Fix all GCC and Clang warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix all warnings save for -Wdeprecated-declarations in tests. Warnings from GCC 9.2.0: src/core/renderer/extensions/resource_request_policy_qt.cpp:157:23: warning: variable 'resource_root_relative_path' set but not used [-Wunused-but-set-variable] src/core/chromium_overrides.cpp:121:21: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] src/core/render_widget_host_view_qt.cpp:540:12: warning: enumeration value 'kNull' not handled in switch [-Wswitch] warning: enumeration value 'kMiddlePanningVertical' not handled in switch [-Wswitch] warning: enumeration value 'kMiddlePanningHorizontal' not handled in switch [-Wswitch] warning: enumeration value 'kDndNone' not handled in switch [-Wswitch] warning: enumeration value 'kDndMove' not handled in switch [-Wswitch] warning: enumeration value 'kDndCopy' not handled in switch [-Wswitch] warning: enumeration value 'kDndLink' not handled in switch [-Wswitch] warning: enumeration value 'kMaxValue' not handled in switch [-Wswitch] src/core/type_conversion.cpp:57:12: warning: enumeration value ‘kRGBA_F16Norm_SkColorType’ not handled in switch [-Wswitch] src/core/api/qtbug-60565.cpp:83:6: warning: 'void __ShimCppDeleteArrayNoThrow(void*, const std::nothrow_t&)' alias between functions of incompatible types 'void(void*, const std::nothrow_t&) noexcept' and 'void(void*)' [-Wattribute-alias=] src/core/api/qtbug-60565.cpp:79:6: warning: 'void __ShimCppDeleteNoThrow(void*, const std::nothrow_t&)' alias between functions of incompatible types 'void(void*, const std::nothrow_t&) noexcept' and 'void(void*)' [-Wattribute-alias=] src/core/api/qtbug-60565.cpp:75:6: warning: 'void __ShimCppNewArrayNoThrow(size_t, const std::nothrow_t&)' alias between functions of incompatible types 'void(size_t, const std::nothrow_t&) noexcept' {aka 'void(long unsigned int, const std::nothrow_t&) noexcept'} and 'void*(size_t)' {aka 'void*(long unsigned int)'} [-Wattribute-alias=] src/core/api/qtbug-60565.cpp:71:6: warning: 'void __ShimCppNewNoThrow(size_t, const std::nothrow_t&)' alias between functions of incompatible types 'void(size_t, const std::nothrow_t&) noexcept' {aka 'void(long unsigned int, const std::nothrow_t&) noexcept'} and 'void*(size_t)' {aka 'void*(long unsigned int)'} [-Wattribute-alias=] Warnings from Clang 9.0.1: src/core/renderer/extensions/renderer_permissions_policy_delegate_qt.h:61:29: warning: private field 'm_dispatcher' is not used [-Wunused-private-field] src/core/web_event_factory.cpp:1296:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] src/core/compositor/compositor_resource_fence.h:55:81: warning: extra ';' after member function definition [-Wextra-semi] src/core/renderer/render_frame_observer_qt.h:81:10: warning: 'ReadyToCommitNavigation' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] src/core/extensions/mime_handler_view_guest_delegate_qt.h:69:27: warning: private field 'guest_' is not used [-Wunused-private-field] src/core/chromium_overrides.cpp:121:12: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move] src/core/chromium_overrides.cpp:145:64: warning: missing field 'set_up_command_line' initializer [-Wmissing-field-initializers] src/core/chromium_overrides.cpp:146:55: warning: missing field 'set_up_command_line' initializer [-Wmissing-field-initializers] src/core/render_widget_host_view_qt.cpp:540:13: warning: 7 enumeration values not handled in switch: 'kNull', 'kMiddlePanningVertical', 'kMiddlePanningHorizontal'... [-Wswitch] src/core/compositor/stream_video_node.cpp:50:18: warning: 'updateState' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] src/core/compositor/stream_video_node.cpp:103:18: warning: 'initialize' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] src/core/type_conversion.cpp:57:13: warning: enumeration value 'kRGBA_F16Norm_SkColorType' not handled in switch [-Wswitch] src/core/renderer_host/web_channel_ipc_transport_host.cpp:59:60: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi] tests/auto/widgets/loadsignals/tst_loadsignals.cpp:237:10: warning: lambda capture 'this' is not used [-Wunused-lambda-capture] tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp:1112:62: warning: lambda capture 'item' is not used [-Wunused-lambda-capture] tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp:1534:55: warning: lambda capture 'this' is not used [-Wunused-lambda-capture] Change-Id: I374be0d4e58accc0a00a2596a560dd6103a98994 Reviewed-by: Michal Klocek Reviewed-by: Michael Brüning --- src/core/render_widget_host_view_qt.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core/render_widget_host_view_qt.cpp') diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index e721cba3b..e2fd074ae 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -538,6 +538,7 @@ void RenderWidgetHostViewQt::DisplayCursor(const content::WebCursor &webCursor) ui::CursorType auraType = ui::CursorType::kNull; #endif switch (cursorInfo.type) { + case ui::CursorType::kNull: case ui::CursorType::kPointer: shape = Qt::ArrowCursor; break; @@ -561,6 +562,7 @@ void RenderWidgetHostViewQt::DisplayCursor(const content::WebCursor &webCursor) case ui::CursorType::kEastWestResize: case ui::CursorType::kEastPanning: case ui::CursorType::kWestPanning: + case ui::CursorType::kMiddlePanningHorizontal: shape = Qt::SizeHorCursor; break; case ui::CursorType::kNorthResize: @@ -568,6 +570,7 @@ void RenderWidgetHostViewQt::DisplayCursor(const content::WebCursor &webCursor) case ui::CursorType::kNorthSouthResize: case ui::CursorType::kNorthPanning: case ui::CursorType::kSouthPanning: + case ui::CursorType::kMiddlePanningVertical: shape = Qt::SizeVerCursor; break; case ui::CursorType::kNorthEastResize: @@ -597,9 +600,15 @@ void RenderWidgetHostViewQt::DisplayCursor(const content::WebCursor &webCursor) case ui::CursorType::kProgress: shape = Qt::BusyCursor; break; + case ui::CursorType::kDndNone: + case ui::CursorType::kDndMove: + shape = Qt::DragMoveCursor; + break; + case ui::CursorType::kDndCopy: case ui::CursorType::kCopy: shape = Qt::DragCopyCursor; break; + case ui::CursorType::kDndLink: case ui::CursorType::kAlias: shape = Qt::DragLinkCursor; break; -- cgit v1.2.3