mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
refs #277, slow auio init
* fixed QHostInfo::localHostName() * move to BlackMisc, as it can be used elsewhere * temp. change, moved methods in body until refs #278, #277 is fixed/ resolved
This commit is contained in:
@@ -15,6 +15,10 @@
|
||||
#include "variant.h"
|
||||
#include "statusmessagelist.h"
|
||||
#include "audioallclasses.h"
|
||||
#include <QtNetwork/QHostInfo>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QSysInfo>
|
||||
|
||||
|
||||
/*
|
||||
* Metadata for PQs
|
||||
@@ -439,3 +443,23 @@ void BlackMisc::displayAllUserMetatypesTypes()
|
||||
qDebug() << "type:" << mt << "name:" << QMetaType::typeName(mt) << QMetaType::sizeOf(mt) << BlackMisc::heapSizeOf(metaType);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Local host name
|
||||
*/
|
||||
const QString &BlackMisc::localHostName()
|
||||
{
|
||||
static const QString hostName = QHostInfo::localHostName();
|
||||
return hostName;
|
||||
}
|
||||
|
||||
/*
|
||||
* Local host name
|
||||
*/
|
||||
const QString &BlackMisc::localHostNameEnvVariable()
|
||||
{
|
||||
static const QString hostName =
|
||||
QProcessEnvironment::systemEnvironment().value("COMPUTERNAME",
|
||||
QProcessEnvironment::systemEnvironment().value("HOSTNAME"));
|
||||
return hostName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user