mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
refs #921, use QVersionNumber
* CVersion removed * remaining utility functions moved to CBuildConfig * patch version -> micro version (Qt naming) * using classes adjusted
This commit is contained in:
committed by
Mathew Sutcliffe
parent
ec297d5838
commit
f85501c7bf
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDateTime>
|
||||
#include <QVersionNumber>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
#include <QFlags>
|
||||
@@ -22,9 +23,10 @@
|
||||
#include <QStringBuilder>
|
||||
#include <QtGlobal>
|
||||
|
||||
using namespace BlackConfig;
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
CFileLogger::CFileLogger(QObject *parent) :
|
||||
CFileLogger(QCoreApplication::applicationName(), QString(), parent)
|
||||
{
|
||||
@@ -117,12 +119,12 @@ namespace BlackMisc
|
||||
void CFileLogger::writeHeaderToFile()
|
||||
{
|
||||
m_stream << "This is " << m_applicationName;
|
||||
m_stream << " version " << BlackConfig::CVersion::version();
|
||||
m_stream << " version " << CBuildConfig::getVersionString();
|
||||
m_stream << " running on " << QSysInfo::prettyProductName();
|
||||
m_stream << " " << QSysInfo::currentCpuArchitecture() << endl;
|
||||
|
||||
m_stream << "Built from revision " << BlackConfig::CBuildConfig::gitHeadSha1();
|
||||
m_stream << " on " << BlackConfig::CBuildConfig::buildTimestamp().toString() << endl;
|
||||
m_stream << "Built from revision " << CBuildConfig::gitHeadSha1();
|
||||
m_stream << " on " << CBuildConfig::buildTimestamp().toString() << endl;
|
||||
|
||||
m_stream << "Built with Qt " << QT_VERSION_STR;
|
||||
m_stream << " and running with Qt " << qVersion();
|
||||
|
||||
@@ -212,7 +212,7 @@ namespace BlackMisc
|
||||
|
||||
void CNetworkUtils::setSwiftUserAgent(QNetworkRequest &request)
|
||||
{
|
||||
static const QString userAgent("swift/" + CVersion::version());
|
||||
static const QString userAgent("swift/" + CBuildConfig::getVersionString());
|
||||
request.setRawHeader("User-Agent", userAgent.toLatin1());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user