From 9e09132f4632d4aa8cb4d21f1d85a850b1791b2f Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 30 Mar 2024 10:12:05 +0200 Subject: [PATCH] replace flagsDebug() function with its body Signed-off-by: Ivailo Monev --- src/network/kernel/qnetworkinterface.cpp | 31 ++++++++++-------------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp index 999a44742..1b6cd5fca 100644 --- a/src/network/kernel/qnetworkinterface.cpp +++ b/src/network/kernel/qnetworkinterface.cpp @@ -375,23 +375,6 @@ QList QNetworkInterface::allAddresses() } #ifndef QT_NO_DEBUG_STREAM -static inline QDebug flagsDebug(QDebug debug, QNetworkInterface::InterfaceFlags flags) -{ - if (flags & QNetworkInterface::IsUp) - debug.nospace() << "IsUp "; - if (flags & QNetworkInterface::IsRunning) - debug.nospace() << "IsRunning "; - if (flags & QNetworkInterface::CanBroadcast) - debug.nospace() << "CanBroadcast "; - if (flags & QNetworkInterface::IsLoopBack) - debug.nospace() << "IsLoopBack "; - if (flags & QNetworkInterface::IsPointToPoint) - debug.nospace() << "IsPointToPoint "; - if (flags & QNetworkInterface::CanMulticast) - debug.nospace() << "CanMulticast "; - return debug.nospace(); -} - static inline QDebug operator<<(QDebug debug, const QNetworkAddressEntry &entry) { debug.nospace() << "(address = " << entry.ip(); @@ -408,7 +391,19 @@ QDebug operator<<(QDebug debug, const QNetworkInterface &networkInterface) debug.nospace() << "QNetworkInterface(name = " << networkInterface.name() << ", hardware address = " << networkInterface.hardwareAddress() << ", flags = "; - flagsDebug(debug, networkInterface.flags()); + const QNetworkInterface::InterfaceFlags flags = networkInterface.flags(); + if (flags & QNetworkInterface::IsUp) + debug.nospace() << "IsUp "; + if (flags & QNetworkInterface::IsRunning) + debug.nospace() << "IsRunning "; + if (flags & QNetworkInterface::CanBroadcast) + debug.nospace() << "CanBroadcast "; + if (flags & QNetworkInterface::IsLoopBack) + debug.nospace() << "IsLoopBack "; + if (flags & QNetworkInterface::IsPointToPoint) + debug.nospace() << "IsPointToPoint "; + if (flags & QNetworkInterface::CanMulticast) + debug.nospace() << "CanMulticast "; debug.nospace() << ", entries = " << networkInterface.addressEntries() << ")\n"; return debug.space(); }