diff options
author | Thiago Macieira <thiago@macieira.org> | 2015-02-13 23:49:58 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-15 06:00:52 -0800 |
commit | 39ffb0fced85c1179af361ad77f2bd40d61deb89 (patch) | |
tree | 4eb5aac5421471ad4c55bdd5db29dbe5ae3c6cc1 /qt-ui/usersurvey.cpp | |
parent | ea143e96683d346aae26d8cbd210dc4f68f5f873 (diff) | |
download | subsurface-39ffb0fced85c1179af361ad77f2bd40d61deb89.tar.gz |
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 <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/usersurvey.cpp')
-rw-r--r-- | qt-ui/usersurvey.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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; |