File indexing completed on 2024-05-12 04:01:53
0001 /* 0002 SPDX-FileCopyrightText: 2014 Alejandro Fiestas Olivares <afiestas@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #include "dummyinhibitionjob.h" 0008 #include "dummyinhibition.h" 0009 0010 using namespace Solid; 0011 0012 DummyInhibitionJob::DummyInhibitionJob(Power::InhibitionTypes inhibitions, const QString &description, QObject *parent) 0013 : AbstractInhibitionJob(parent) 0014 , m_inhibitions(inhibitions) 0015 , m_description(description) 0016 { 0017 } 0018 0019 void DummyInhibitionJob::doStart() 0020 { 0021 emitResult(); 0022 } 0023 0024 Inhibition *DummyInhibitionJob::inhibition() 0025 { 0026 auto dummyInhibition = new DummyInhibition; 0027 dummyInhibition->inhibitions = m_inhibitions; 0028 dummyInhibition->description = m_description; 0029 0030 return new Inhibition(dummyInhibition); 0031 } 0032 0033 #include "moc_dummyinhibitionjob.cpp"