Wrong Windows version in About dialog

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Wrong Windows version in About dialog

Post by uwestoehr »

Neither if I compile FC by myself or use a version provided by sgrogan at our GitHub, in the about dialog, I see that I would use Windows 10 version 2009.
But I use Win 10 21H1.
I tested this now with 3 different PCs and this issue is there on all PCs.

Can anybody reproduce this?

How do we determine the Windows version?
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Wrong Windows version in About dialog

Post by chennes »

I can confirm -- it's being pulled using QSysInfo::prettyProductName(). On Windows this is a wrapper around RtlGetVersion (https://docs.microsoft.com/en-us/window ... getversion). This article explains why it's giving build 2009.

ETA: Apparently Qt is using a deprecated variable here, they are supposed to be using the AnalyticsInfo class now -- maybe they do now in Qt 6, but if we want to get the correct Windows build in Qt 5 we are going to have to do it ourselves.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Wrong Windows version in About dialog

Post by uwestoehr »

chennes wrote: Thu Nov 25, 2021 11:22 pm ETA: Apparently Qt is using a deprecated variable here, they are supposed to be using the AnalyticsInfo class now -- maybe they do now in Qt 6, but if we want to get the correct Windows build in Qt 5 we are going to have to do it ourselves.
Many thanks for finding this!

I would rather say that Microsoft does no longer update the registry entry Qt evaluates. So it is hard to say if there is just an error in Windows or they changed their behavior.

We could read the registry on our own but then we are not sure if the registry entry with the info "21Hx" existed e.g. in Win 10 2009 and prior. Therefore I would say that we should leave it for now.
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Wrong Windows version in About dialog

Post by chennes »

uwestoehr wrote: Fri Nov 26, 2021 3:22 am So it is hard to say if there is just an error in Windows or they changed their behavior.
It's a deliberate change, they explained on Twitter some time ago (sorry, don't have the link handy).

uwestoehr wrote: Fri Nov 26, 2021 3:22 am Therefore I would say that we should leave it for now.
I agree.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply