5 | 5 |
.
|
6 | 6 |
This allows the build of libkscreen and its dependencies in non linux arches.
|
7 | 7 |
|
|
8 |
---
|
|
9 |
CMakeLists.txt | 2 +-
|
|
10 |
autotests/CMakeLists.txt | 42 +++++++++++++++++++++++-------------------
|
|
11 |
backends/CMakeLists.txt | 4 +++-
|
|
12 |
src/doctor/CMakeLists.txt | 12 ++++++++++--
|
|
13 |
src/doctor/doctor.cpp | 10 ++++++++++
|
|
14 |
tests/CMakeLists.txt | 4 +++-
|
|
15 |
6 files changed, 50 insertions(+), 24 deletions(-)
|
|
16 |
|
8 | 17 |
--- a/CMakeLists.txt
|
9 | 18 |
+++ b/CMakeLists.txt
|
10 | |
@@ -25,7 +25,7 @@ include(KDEClangFormat)
|
|
19 |
@@ -28,7 +28,7 @@ include(KDEClangFormat)
|
11 | 20 |
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core DBus Gui Test X11Extras)
|
12 | 21 |
|
13 | 22 |
# Wayland backend
|
|
122 | 131 |
#include "dpmsclient.h"
|
123 | 132 |
+#endif
|
124 | 133 |
|
|
134 |
#include <QCommandLineParser>
|
125 | 135 |
#include <QCoreApplication>
|
126 | |
#include <QCommandLineParser>
|
127 | |
@@ -92,6 +94,7 @@ void Doctor::start(QCommandLineParser *p
|
|
136 |
@@ -89,6 +91,7 @@ void Doctor::start(QCommandLineParser *p
|
128 | 137 |
return;
|
129 | 138 |
}
|
130 | 139 |
if (m_parser->isSet(QStringLiteral("dpms"))) {
|
|
132 | 141 |
if (!QGuiApplication::platformName().startsWith(QLatin1String("wayland"))) {
|
133 | 142 |
cerr << "DPMS is only supported on Wayland." << endl;
|
134 | 143 |
// We need to kick the event loop, otherwise .quit() hangs
|
135 | |
@@ -108,6 +111,9 @@ void Doctor::start(QCommandLineParser *p
|
|
144 |
@@ -110,6 +113,9 @@ void Doctor::start(QCommandLineParser *p
|
136 | 145 |
} else {
|
137 | 146 |
setDpms(dpmsArg);
|
138 | 147 |
}
|
|
142 | 151 |
return;
|
143 | 152 |
}
|
144 | 153 |
|
145 | |
@@ -126,6 +132,7 @@ void Doctor::start(QCommandLineParser *p
|
|
154 |
@@ -127,6 +133,7 @@ void Doctor::start(QCommandLineParser *p
|
146 | 155 |
|
147 | |
void KScreen::Doctor::setDpms(const QString& dpmsArg)
|
|
156 |
void KScreen::Doctor::setDpms(const QString &dpmsArg)
|
148 | 157 |
{
|
149 | 158 |
+#ifdef HAVE_KWAYLAND
|
150 | 159 |
qDebug() << "SetDpms: " << dpmsArg;
|
151 | 160 |
connect(m_dpmsClient, &DpmsClient::ready, this, [this, dpmsArg]() {
|
152 | 161 |
cout << "DPMS.ready()";
|
153 | |
@@ -139,11 +146,13 @@ void KScreen::Doctor::setDpms(const QStr
|
|
162 |
@@ -140,10 +147,12 @@ void KScreen::Doctor::setDpms(const QStr
|
154 | 163 |
});
|
155 | 164 |
|
156 | 165 |
m_dpmsClient->connect();
|
157 | 166 |
+#endif
|
158 | 167 |
}
|
159 | |
|
160 | 168 |
|
161 | 169 |
void Doctor::showDpms()
|
162 | 170 |
{
|