Drop Qt::Network dependency
We used it primarily for QHostInfo, but as QHostInfo::localHostName() docs indicate, QSysInfo::machineHostName() returns the same info.
This commit is contained in:
parent
5a024d7e9a
commit
5e63f9afc9
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
#include "xauthority.h"
|
||||
|
||||
#include <QDataStream>
|
||||
#include <QHostInfo>
|
||||
#include <QRandomGenerator>
|
||||
#include <QStandardPaths>
|
||||
#include <QSysInfo>
|
||||
#include <QTemporaryFile>
|
||||
|
||||
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();
|
||||
|
|
Loading…
Reference in a new issue