Fix leftover QSysInfo::machineHostName for Qt < 5.6

pull/217/head
Simon Stürz 2019-10-08 16:19:17 +02:00
parent 3114151f29
commit 3655ac39de
2 changed files with 5 additions and 1 deletions

View File

@ -33,6 +33,7 @@
#include <QCoreApplication>
#include <QCryptographicHash>
#include <QProcessEnvironment>
#include <QHostInfo>
namespace nymeaserver {
@ -167,7 +168,11 @@ void DebugReportGenerator::saveSystemInformation()
stream << "Command: " << QCoreApplication::arguments().join(' ') << endl;
stream << "Qt runtime version: " << qVersion() << endl;
stream << "" << endl;
#if (QT_VERSION < QT_VERSION_CHECK(5, 6, 0))
stream << "Hostname: " << QHostInfo::localHostName() << endl;
#else
stream << "Hostname: " << QSysInfo::machineHostName() << endl;
#endif
stream << "Architecture: " << QSysInfo::currentCpuArchitecture() << endl;
stream << "Kernel type: " << QSysInfo::kernelType() << endl;
stream << "Kernel version: " << QSysInfo::kernelVersion() << endl;

View File

@ -34,7 +34,6 @@ public:
explicit DebugReportGenerator(QObject *parent = nullptr);
~DebugReportGenerator();
QByteArray reportFileData() const;
QString reportFileName();
QString md5Sum() const;