Move helper functions around

We had a ton of helper functions in qt-gui.cpp which really didn't make
much sense. So I moved them all into qthelper.cpp.

Also moved the UserAgent helper that didn't belong in the UpdateHandler to
begin with - that's a generic helper used in many places...

With this we can successfully build using cmake again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-02-23 09:09:48 -08:00
parent 62999c866f
commit ddc01e39e7
9 changed files with 405 additions and 386 deletions

View file

@ -49,22 +49,6 @@ QString UserSurvey::getVersion()
return sysInfo;
}
QString UserSurvey::getUserAgent()
{
QString arch;
// fill in the system data - use ':' as separator
// replace all other ':' with ' ' so that this is easy to parse
QString userAgent = QString("Subsurface:%1:").arg(subsurface_version());
userAgent.append(SubsurfaceSysInfo::prettyOsName().replace(':', ' ') + ":");
arch = SubsurfaceSysInfo::buildCpuArchitecture().replace(':', ' ');
userAgent.append(arch);
if (arch == "i386")
userAgent.append("/" + SubsurfaceSysInfo::currentCpuArchitecture());
userAgent.append(":" + uiLanguage(NULL));
return userAgent;
}
UserSurvey::~UserSurvey()
{
delete ui;