In commit 39ffb0fced ("Fix Subsurface build with Qt 5.4.1 and later") Thiago
was a bit too aggressive removing some of our ifdefs for building with older
versions of the SDK...
I need at least this patch to still build on the machine that I use to create
the official binaries.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The intention had been all along to use the 5.4 QSysInfo API, but due to
a silly mistake in the QT_VERSION check, it never got enabled for 5.4.0.
On 5.4.1 it does get enabled and, unfortunately, causes compilation
errors because the API changed between the time we backported to
Subsurface and the final version.
This commit backports the final QSysInfo API from Qt 5.4 into
Subsurface, which includes the renaming of a few functions. Since the
prettyOsName function no longer exists in the Qt API in that form, I've
reimplemented it using the API that does exist.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The detection of Windows 10 is broken in Qt 4.8.6 and in Qt 5.2 through
5.4.1 (see QTBUG-43413). The commit above fixed it.
I backported only half of the solution, since the other half requires
the private class QSystemLibrary.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In previous version of subsurfacesysinfo.cpp which came straight form Qt
the unquote function was used to clean strings.
Since f59b30ca5a ("OS Detection: Use QFile when reading
/etc/os-release") its not needed any longer so this removes that
function.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We build 32bit Windows binaries - but we really want to know if the OS is
x86_64 or i386. This little hack should give us that information.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Most of the mechanics are already in QSysInfo, we only need to add the
extra details that were missing until Qt 5.4. This greatly simplifies
the code and will allow us to update it more easily from upstream.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Improves and simplifies reading of /etc/os-release on
linux system to read the PRETTY_NAME value. The previously
used method is unnecessarily lengthy and too complicated.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Implements automatic OS and architecture detection. This code has
been taken from the Qt repositories for Qt 5.4 (LGPL) and slightly
modified into the SubsurfaceSysInfo class.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>