diff --git a/src/xwayland/lib/CMakeLists.txt b/src/xwayland/lib/CMakeLists.txt index dff9a60e40..64d4b71949 100644 --- a/src/xwayland/lib/CMakeLists.txt +++ b/src/xwayland/lib/CMakeLists.txt @@ -17,4 +17,4 @@ ecm_qt_declare_logging_category(KWinXwaylandCommon set_property(TARGET KWinXwaylandCommon PROPERTY POSITION_INDEPENDENT_CODE ON) target_include_directories(KWinXwaylandCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(KWinXwaylandCommon Qt::Core Qt::Network) +target_link_libraries(KWinXwaylandCommon Qt::Core) diff --git a/src/xwayland/lib/xauthority.cpp b/src/xwayland/lib/xauthority.cpp index bef5560e5b..cf5c573897 100644 --- a/src/xwayland/lib/xauthority.cpp +++ b/src/xwayland/lib/xauthority.cpp @@ -11,9 +11,9 @@ #include "xauthority.h" #include -#include #include #include +#include #include static void writeXauthorityEntry(QDataStream &stream, quint16 family, @@ -54,7 +54,7 @@ bool generateXauthorityFile(int display, QTemporaryFile *authorityFile) return false; } - const QByteArray hostname = QHostInfo::localHostName().toUtf8(); + const QByteArray hostname = QSysInfo::machineHostName().toUtf8(); const QByteArray displayName = QByteArray::number(display); const QByteArray name = QByteArrayLiteral("MIT-MAGIC-COOKIE-1"); const QByteArray cookie = generateXauthorityCookie();