diff options
Diffstat (limited to 'src/network/qhostaddress.cpp')
-rw-r--r-- | src/network/qhostaddress.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/network/qhostaddress.cpp b/src/network/qhostaddress.cpp index 43d614cc9..fdbc0e395 100644 --- a/src/network/qhostaddress.cpp +++ b/src/network/qhostaddress.cpp @@ -45,10 +45,10 @@ class TQHostAddressPrivate { public: - TQHostAddressPrivate( Q_UINT32 a_=0 ) : a(a_), isIp4(TRUE) + TQHostAddressPrivate( TQ_UINT32 a_=0 ) : a(a_), isIp4(TRUE) { } - TQHostAddressPrivate( Q_UINT8 *a_ ); + TQHostAddressPrivate( TQ_UINT8 *a_ ); TQHostAddressPrivate(const Q_IPV6ADDR &a_); ~TQHostAddressPrivate() { @@ -63,14 +63,14 @@ public: } private: - Q_UINT32 a; // ip 4 address + TQ_UINT32 a; // ip 4 address Q_IPV6ADDR a6; // ip 6 address bool isIp4; friend class TQHostAddress; }; -TQHostAddressPrivate::TQHostAddressPrivate(Q_UINT8 *a_) : a(0), isIp4(FALSE) +TQHostAddressPrivate::TQHostAddressPrivate(TQ_UINT8 *a_) : a(0), isIp4(FALSE) { for ( int i=0; i<16; i++ ) { a6.c[i] = a_[i]; @@ -119,7 +119,7 @@ TQHostAddress::TQHostAddress() /*! Creates a host address object for the IPv4 address \a ip4Addr. */ -TQHostAddress::TQHostAddress( Q_UINT32 ip4Addr ) +TQHostAddress::TQHostAddress( TQ_UINT32 ip4Addr ) : d( new TQHostAddressPrivate( ip4Addr ) ) { } @@ -131,7 +131,7 @@ TQHostAddress::TQHostAddress( Q_UINT32 ip4Addr ) \a ip6Addr must be a 16 byte array in network byte order (high-order byte first). */ -TQHostAddress::TQHostAddress( Q_UINT8 *ip6Addr ) +TQHostAddress::TQHostAddress( TQ_UINT8 *ip6Addr ) : d( new TQHostAddressPrivate( ip6Addr ) ) { } @@ -188,7 +188,7 @@ TQHostAddress & TQHostAddress::operator=( const TQHostAddress & address ) /*! Set the IPv4 address specified by \a ip4Addr. */ -void TQHostAddress::setAddress( Q_UINT32 ip4Addr ) +void TQHostAddress::setAddress( TQ_UINT32 ip4Addr ) { delete d; d = new TQHostAddressPrivate( ip4Addr ); @@ -203,14 +203,14 @@ void TQHostAddress::setAddress( Q_UINT32 ip4Addr ) \a ip6Addr must be a 16 byte array in network byte order (high-order byte first). */ -void TQHostAddress::setAddress( Q_UINT8 *ip6Addr ) +void TQHostAddress::setAddress( TQ_UINT8 *ip6Addr ) { delete d; d = new TQHostAddressPrivate( ip6Addr ); } #ifndef QT_NO_STRINGLIST -static bool parseIp4(const TQString& address, Q_UINT32 *addr) +static bool parseIp4(const TQString& address, TQ_UINT32 *addr) { TQStringList ipv4 = TQStringList::split(".", address, FALSE); if (ipv4.count() == 4) { @@ -243,7 +243,7 @@ bool TQHostAddress::setAddress(const TQString& address) TQString a = address.simplifyWhiteSpace(); // try ipv4 - Q_UINT32 maybeIp4 = 0; + TQ_UINT32 maybeIp4 = 0; if (parseIp4(address, &maybeIp4)) { setAddress(maybeIp4); return TRUE; @@ -256,7 +256,7 @@ bool TQHostAddress::setAddress(const TQString& address) return FALSE; // there must be at least two ":" if (count > 8) return FALSE; // maximum of seven ":" exceeded - Q_UINT8 maybeIp6[16]; + TQ_UINT8 maybeIp6[16]; int mc = 16; int fillCount = 9 - count; for (int i=count-1; i>=0; --i) { @@ -339,7 +339,7 @@ bool TQHostAddress::isIPv4Address() const Use toIPv4Address() instead. */ -Q_UINT32 TQHostAddress::ip4Addr() const +TQ_UINT32 TQHostAddress::ip4Addr() const { return toIPv4Address(); } @@ -354,7 +354,7 @@ Q_UINT32 TQHostAddress::ip4Addr() const \sa toString() */ -Q_UINT32 TQHostAddress::toIPv4Address() const +TQ_UINT32 TQHostAddress::toIPv4Address() const { return d->a; } @@ -402,16 +402,16 @@ Q_IPV6ADDR TQHostAddress::toIPv6Address() const TQString TQHostAddress::toString() const { if ( d->isIp4 ) { - Q_UINT32 i = ip4Addr(); + TQ_UINT32 i = ip4Addr(); TQString s; s.sprintf( "%d.%d.%d.%d", (i>>24) & 0xff, (i>>16) & 0xff, (i >> 8) & 0xff, i & 0xff ); return s; } else { - Q_UINT16 ugle[8]; + TQ_UINT16 ugle[8]; for ( int i=0; i<8; i++ ) { - ugle[i] = ( (Q_UINT16)( d->a6.c[2*i] ) << 8 ) | - ( (Q_UINT16)( d->a6.c[2*i+1] ) ); + ugle[i] = ( (TQ_UINT16)( d->a6.c[2*i] ) << 8 ) | + ( (TQ_UINT16)( d->a6.c[2*i+1] ) ); } TQString s; s.sprintf( "%X:%X:%X:%X:%X:%X:%X:%X", |