Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Version of Qt required?

From: John Thacker <johnthacker@xxxxxxxxx>
Date: Tue, 7 Jul 2020 16:50:54 -0400
On Tue, Jul 7, 2020 at 4:08 PM John Thacker <johnthacker@xxxxxxxxx> wrote:
On Tue, Jul 7, 2020, 1:11 PM Pascal Quantin <pascal@xxxxxxxxxxxxx> wrote:
Hi John,

Le mar. 7 juil. 2020 à 19:09, John Thacker <johnthacker@xxxxxxxxx> a écrit :
On Tue, Jul 7, 2020 at 10:48 AM Graham Bloice <graham.bloice@xxxxxxxxxxxxx> wrote:

The table of Qt versions shows which versions have been used in Wireshark installers for Windows and macOS. Determining the versions available on specific Linux distributions is a bit more of an artform but can be gleaned from the tables further down. 

Ah, I see, yes I misread the table and interpreted the bold versions as minimum requirements. I just took a look and  updated the RHEL/CentOS and SLES information. Looking at the rest of the tables, Debian Jesse just went end of support, so Ubuntu xenial (16.04LTS, end of support April 2021) being at 5.5.x is I think the oldest QT in a still officially supported distribution on that page. After that there's several at 5.6.x.

I reckon that QT 5.9 is fine for every distro's most recent LTS release, and 5.6 is fine for every distro's N-1 LTS release. Personally I'd be fine with moving master to 5.9 (which also settles requiring C+11), but I could understand 5.6.

Can't this code be made conditional to the Qt version used for compiling?

It can be, but I think I would just as well rewrite it to use code from QT 5.3 and earlier. In this case I don't think there's from later than 5.3 that's absolutely necessary for the functionality, more just syntactic sugar that can be done a different way.

Well, I guess foreach was officially deprecated in QT 5.7, so I suppose I could check and do the loop with foreach for QT_VERSION < 5.7 and the qAsConst way with 5.7 and higher.