Solid

dummyrequeststatejob.cpp
1/*
2 SPDX-FileCopyrightText: 2014 Alejandro Fiestas Olivares <afiestas@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#include "dummyrequeststatejob.h"
8
9#include <Solid/RequestStateJob>
10
11using namespace Solid;
12
13void DummyRequestStateJob::doStart()
14{
15 if (state == Power::Shutdown) {
16 setError(RequestStateJob::Unsupported);
17 setErrorText(QLatin1String("State Brightness is unsupported"));
18 }
19 emitResult();
20}
21
22#include "moc_dummyrequeststatejob.cpp"
void emitResult()
Utility function to emit the result signal, and suicide this job.
Definition job.cpp:36
void setErrorText(const QString &errorText)
Sets the error text.
Definition job.cpp:62
void setError(int errorCode)
Sets the error code.
Definition job.cpp:57
The single responsibility of this class is to create arguments valid for logind Inhibit call.
Definition fakebattery.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:12 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.