diff options
Diffstat (limited to 'src/network/kernel/qhostinfo.cpp')
-rw-r--r-- | src/network/kernel/qhostinfo.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index a2ac9065fd..c6c09542e7 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -415,10 +415,22 @@ void QHostInfo::setErrorString(const QString &str) /*! \fn QString QHostInfo::localHostName() - Returns the host name of this machine. + Returns this machine's host name, if one is configured. Note that hostnames + are not guaranteed to be globally unique, especially if they were + configured automatically. - \sa hostName() + This function does not guarantee the returned host name is a Fully + Qualified Domain Name (FQDN). For that, use fromName() to resolve the + returned name to an FQDN. + + This function returns the same as QSysInfo::machineHostName(). + + \sa hostName(), localDomainName() */ +QString QHostInfo::localHostName() +{ + return QSysInfo::machineHostName(); +} /*! \fn QString QHostInfo::localDomainName() |