special procedure for local host addresses

This commit is contained in:
Volker Fischer 2011-04-22 11:00:13 +00:00
parent 753f54229b
commit 02762d6e00

View file

@ -432,8 +432,10 @@ public:
{
QString strReturn = InetAddr.toString();
if ( ( eStringMode == SM_IP_NO_LAST_BYTE ) ||
( eStringMode == SM_IP_NO_LAST_BYTE_PORT ) )
// special case: for local host address, we do not replace the last byte
if ( ( ( eStringMode == SM_IP_NO_LAST_BYTE ) ||
( eStringMode == SM_IP_NO_LAST_BYTE_PORT ) ) &&
( InetAddr != QHostAddress ( QHostAddress::LocalHost ) ) )
{
// replace last byte by an "x"
strReturn = strReturn.section ( ".", 0, 2 ) + ".x";