Wireshark-dev: Re: [Wireshark-dev] Qt warning on Windows build.

From: Pascal Quantin <pascal@xxxxxxxxxxxxx>
Date: Mon, 23 Nov 2020 22:31:14 +0100
Hi Chris,

Le lun. 23 nov. 2020 à 20:38, Maynard, Christopher via Wireshark-dev <wireshark-dev@xxxxxxxxxxxxx> a écrit :
> From: Wireshark-dev <wireshark-dev-bounces@xxxxxxxxxxxxx> On Behalf Of Anders Broman via Wireshark-dev
> Sent: Thursday, November 19, 2020 3:50 AM
> To: wireshark-dev@xxxxxxxxxxxxx
> Cc: Anders Broman <anders.broman@xxxxxxxxxxxx>
> Subject: [Wireshark-dev] Qt warning on Windows build.
>
> Hi,
> Currently there is one Warnimg produced for the Windows build
> C:\Development\ewireshark\trunk\ui\qt\widgets\byte_view_text.cpp(187,38): warning C4996: 'QFont::ForceIntegerMetrics': was declared deprecated [C:\Development\wsbuild64\ui\qt\qtui.vcxproj]
>
> Regards
> Anders
>

And after upgrading to Qt 5.15.2, there are more warnings, and since at least 2 of them are treated as errors, the build now fails:

Build FAILED.

       "D:\wireshark\builds\win64\master\Wireshark.sln" (default target) (1) ->
       "D:\wireshark\builds\win64\master\ui\qt\qtui.vcxproj.metaproj" (default
       target) (44) ->
       "D:\wireshark\builds\win64\master\ui\qt\qtui.vcxproj" (default target) (
       120) ->
       (ClCompile target) ->
         D:\wireshark\src\master\ui\qt\widgets\byte_view_text.cpp(187,38): warn
       ing C4996: 'QFont::ForceIntegerMetrics': was declared deprecated [D:\wir
       eshark\builds\win64\master\ui\qt\qtui.vcxproj]


       "D:\wireshark\builds\win64\master\Wireshark.sln" (default target) (1) ->
       "D:\wireshark\builds\win64\master\ui\qt\qtui.vcxproj.metaproj" (default
       target) (44) ->
       "D:\wireshark\builds\win64\master\ui\qt\qtui.vcxproj" (default target) (
       120) ->
         D:\wireshark\src\master\ui\qt\packet_list.cpp(794,46): warning C4996:
       'Qt::MidButton': MidButton is deprecated. Use MiddleButton instead [D:\w
       ireshark\builds\win64\master\ui\qt\qtui.vcxproj]
         D:\wireshark\src\master\ui\qt\packet_list.cpp(794,64): warning C4996:
       'Qt::MidButton': MidButton is deprecated. Use MiddleButton instead [D:\w
       ireshark\builds\win64\master\ui\qt\qtui.vcxproj]
         D:\wireshark\src\master\ui\qt\print_dialog.cpp(139,32): warning C4996:
        'QPrinter::pageRect': Use pageLayout().paintRectPixels(resolution()) in
       stead. [D:\wireshark\builds\win64\master\ui\qt\qtui.vcxproj]
         D:\wireshark\src\master\ui\qt\print_dialog.cpp(174,55): warning C4996:
        'QPrinter::pageRect': Use pageLayout().paintRectPixels(resolution()) in
       stead. [D:\wireshark\builds\win64\master\ui\qt\qtui.vcxproj]
         D:\wireshark\src\master\ui\qt\print_dialog.cpp(176,21): warning C4996:
        'QPrinter::pageRect': Use pageLayout().paintRectPixels(resolution()) in
       stead. [D:\wireshark\builds\win64\master\ui\qt\qtui.vcxproj]
         D:\wireshark\src\master\ui\qt\print_dialog.cpp(236,24): warning C4996:
        'QPrinter::pageRect': Use pageLayout().paintRectPixels(resolution()) in
       stead. [D:\wireshark\builds\win64\master\ui\qt\qtui.vcxproj]


       "D:\wireshark\builds\win64\master\Wireshark.sln" (default target) (1) ->
       "D:\wireshark\builds\win64\master\ui\qt\qtui.vcxproj.metaproj" (default
       target) (44) ->
       "D:\wireshark\builds\win64\master\ui\qt\qtui.vcxproj" (default target) (
       120) ->
       (ClCompile target) ->
         D:\wireshark\src\master\ui\qt\packet_list.cpp(794,46): error C2220: th
       e following warning is treated as an error [D:\wireshark\builds\win64\ma
       ster\ui\qt\qtui.vcxproj]
         D:\wireshark\src\master\ui\qt\print_dialog.cpp(139,32): error C2220: t
       he following warning is treated as an error [D:\wireshark\builds\win64\m
       aster\ui\qt\qtui.vcxproj]

    7 Warning(s)
    2 Error(s)

It does not handle the warning raised by Anders though.

Best regards,
Pascal.