Commit f61c9898 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[kdisplaymanager] Relax HAVE_X11 check

Only one function (GDMAuthenticate) actually needs X11
parent 5bc7efd0
Pipeline #211951 passed with stage
in 11 minutes and 30 seconds
......@@ -6,8 +6,6 @@
#include "kdisplaymanager.h"
#if HAVE_X11
#include <kuser.h>
#include <KLocalizedString>
......@@ -19,6 +17,9 @@
#include <QDBusMetaType>
#include <QDBusObjectPath>
#include <QDBusReply>
#include "config-X11.h"
#if HAVE_X11
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <private/qtx11extras_p.h>
#else
......@@ -27,6 +28,7 @@
#include <X11/Xauth.h>
#include <X11/Xlib.h>
#endif // HAVE_X11
#include <errno.h>
#include <fcntl.h>
......@@ -852,6 +854,7 @@ void KDisplayManager::lockSwitchVT(int vt)
void KDisplayManager::GDMAuthenticate()
{
#if HAVE_X11
FILE *fp;
const char *dpy, *dnum, *dne;
int dnl;
......@@ -887,6 +890,5 @@ void KDisplayManager::GDMAuthenticate()
}
fclose(fp);
}
#endif // HAVE_X11
}
......@@ -7,7 +7,6 @@
#pragma once
#include "config-libkworkspace.h"
#include "kworkspace.h"
#include "kworkspace_export.h"
#include <QByteArray>
......@@ -24,8 +23,6 @@ typedef QList<SessEnt> SessList;
class KWORKSPACE_EXPORT KDisplayManager
{
#if HAVE_X11
public:
KDisplayManager();
~KDisplayManager();
......@@ -51,52 +48,8 @@ private:
void GDMAuthenticate();
#else // HAVE_X11
public:
KDisplayManager()
{
}
bool canShutdown()
{
return false;
}
void shutdown(KWorkSpace::ShutdownType shutdownType, KWorkSpace::ShutdownMode shutdownMode, const QString &bootOption = QString())
{
}
void setLock(bool)
{
}
bool isSwitchable()
{
return false;
}
int numReserve()
{
return -1;
}
void startReserve()
{
}
bool localSessions(SessList &list)
{
return false;
}
void switchVT(int vt)
{
}
bool bootOptions(QStringList &opts, int &dflt, int &curr);
#endif // HAVE_X11
private:
#if HAVE_X11
class Private;
Private *const d;
#endif // HAVE_X11
}; // class KDisplayManager
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment