diff --git a/src/globals.h b/src/globals.h index c610aab7..6ee39a0e 100755 --- a/src/globals.h +++ b/src/globals.h @@ -63,6 +63,13 @@ #define UPDOWNICON ":icons/moveupdown.png" +// Hard-coding EOL for linux since Qt distros vary widely +#ifdef __linux__ + #define ENDL "\n"; +#else + #define ENDL Qt::endl; +#endif + //Qt 5.10 changed the way sockets bind //It seems dual ipv4/ipv6 mode works better. diff --git a/src/mainpacketreceiver.cpp b/src/mainpacketreceiver.cpp index dc0931cb..848467a6 100644 --- a/src/mainpacketreceiver.cpp +++ b/src/mainpacketreceiver.cpp @@ -51,7 +51,7 @@ void MainPacketReceiver::readPendingDatagrams() QTextStream out(stdout); QString output = MainPacketReceiver::datagramOutput(datagram, false); - out << output << Qt::endl; + out << output << ENDL; out.flush(); output.clear(); @@ -74,7 +74,7 @@ void MainPacketReceiver::readPendingDatagrams() out << "\nResponse Time:" << QDateTime::currentDateTime().toString(DATETIMEFORMAT); out << "\nResponse HEX:" << sendit.hexString; out << "\nResponse ASCII:" << sendit.asciiString(); - out << Qt::endl; + out << ENDL; } diff --git a/src/threadedtcpserver.cpp b/src/threadedtcpserver.cpp index 2c16c76d..45b9f826 100644 --- a/src/threadedtcpserver.cpp +++ b/src/threadedtcpserver.cpp @@ -148,7 +148,7 @@ void ThreadedTCPServer::outputTCPPacket(Packet receivePacket) out << "\nResponse ASCII:" << receivePacket.asciiString(); } - out << Qt::endl; + out << ENDL; out.flush();