Qt 4.8
Classes | Functions
qnetworkinterface.h File Reference
#include <QtCore/qshareddata.h>
#include <QtCore/qscopedpointer.h>
#include <QtNetwork/qhostaddress.h>

Go to the source code of this file.

Classes

class  QList< T >
 The QList class is a template class that provides lists. More...
 
class  QNetworkAddressEntry
 The QNetworkAddressEntry class stores one IP address supported by a network interface, along with its associated netmask and broadcast address. More...
 
class  QNetworkInterface
 The QNetworkInterface class provides a listing of the host's IP addresses and network interfaces. More...
 

Functions

Q_NETWORK_EXPORT QDebug operator<< (QDebug debug, const QNetworkInterface &networkInterface)
 

Function Documentation

◆ operator<<()

Q_NETWORK_EXPORT QDebug operator<< ( QDebug  debug,
const QNetworkInterface networkInterface 
)

Definition at line 624 of file qnetworkinterface.cpp.

625 {
626  debug.nospace() << "QNetworkInterface(name = " << networkInterface.name()
627  << ", hardware address = " << networkInterface.hardwareAddress()
628  << ", flags = ";
629  flagsDebug(debug, networkInterface.flags());
630 #if defined(Q_CC_RVCT)
631  // RVCT gets confused with << networkInterface.addressEntries(), reason unknown.
632  debug.nospace() << ")\n";
633 #else
634  debug.nospace() << ", entries = " << networkInterface.addressEntries()
635  << ")\n";
636 #endif
637  return debug.space();
638 }
QString name() const
Returns the name of this network interface.
QDebug & nospace()
Clears the stream&#39;s internal flag that records whether the last character was a space and returns a r...
Definition: qdebug.h:92
InterfaceFlags flags() const
Returns the flags associated with this network interface.
QDebug & space()
Writes a space character to the debug stream and returns a reference to the stream.
Definition: qdebug.h:91
QList< QNetworkAddressEntry > addressEntries() const
Returns the list of IP addresses that this interface possesses along with their associated netmasks a...
static QDebug flagsDebug(QDebug debug, QNetworkInterface::InterfaceFlags flags)
QString hardwareAddress() const
Returns the low-level hardware address for this interface.