From 39ffb0fced85c1179af361ad77f2bd40d61deb89 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 13 Feb 2015 23:49:58 -0800 Subject: Fix Subsurface build with Qt 5.4.1 and later 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 Signed-off-by: Dirk Hohndel --- qt-ui/usersurvey.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/usersurvey.cpp b/qt-ui/usersurvey.cpp index 4061d46df..ac8486988 100644 --- a/qt-ui/usersurvey.cpp +++ b/qt-ui/usersurvey.cpp @@ -24,10 +24,10 @@ UserSurvey::UserSurvey(QWidget *parent) : QDialog(parent), os = QString("ssrfVers=%1").arg(VERSION_STRING); os.append(QString("&prettyOsName=%1").arg(SubsurfaceSysInfo::prettyOsName())); - QString arch = SubsurfaceSysInfo::cpuArchitecture(); + QString arch = SubsurfaceSysInfo::buildCpuArchitecture(); os.append(QString("&appCpuArch=%1").arg(arch)); if (arch == "i386") { - QString osArch = SubsurfaceSysInfo::osArch(); + QString osArch = SubsurfaceSysInfo::currentCpuArchitecture(); os.append(QString("&osCpuArch=%1").arg(osArch)); } os.append(QString("&uiLang=%1").arg(uiLanguage(NULL))); @@ -41,10 +41,10 @@ QString UserSurvey::getVersion() // fill in the system data QString sysInfo = QString("Subsurface %1").arg(VERSION_STRING); sysInfo.append(tr("\nOperating system: %1").arg(SubsurfaceSysInfo::prettyOsName())); - arch = SubsurfaceSysInfo::cpuArchitecture(); + arch = SubsurfaceSysInfo::buildCpuArchitecture(); sysInfo.append(tr("\nCPU architecture: %1").arg(arch)); if (arch == "i386") - sysInfo.append(tr("\nOS CPU architecture: %1").arg(SubsurfaceSysInfo::osArch())); + sysInfo.append(tr("\nOS CPU architecture: %1").arg(SubsurfaceSysInfo::currentCpuArchitecture())); sysInfo.append(tr("\nLanguage: %1").arg(uiLanguage(NULL))); return sysInfo; } @@ -56,10 +56,10 @@ QString UserSurvey::getUserAgent() // replace all other ':' with ' ' so that this is easy to parse QString userAgent = QString("Subsurface:%1:").arg(VERSION_STRING); userAgent.append(SubsurfaceSysInfo::prettyOsName().replace(':', ' ') + ":"); - arch = SubsurfaceSysInfo::cpuArchitecture().replace(':', ' '); + arch = SubsurfaceSysInfo::buildCpuArchitecture().replace(':', ' '); userAgent.append(arch); if (arch == "i386") - userAgent.append("/" + SubsurfaceSysInfo::osArch()); + userAgent.append("/" + SubsurfaceSysInfo::currentCpuArchitecture()); userAgent.append(":" + uiLanguage(NULL)); return userAgent; -- cgit v1.2.3-70-g09d2