1 /* 2 SPDX-FileCopyrightText: 2007 Nicolas Ternisien <nicolas.ternisien@gmail.com> 3 4 SPDX-License-Identifier: GPL-2.0-or-later 5 */ 6 7 #include "daemonFactory.h" 8 9 #include "ksystemlog_debug.h" 10 #include "logMode.h" 11 12 #include "daemonLogMode.h" 13 #include "simpleAction.h" 14 createLogModes() const15QList<LogMode *> DaemonLogModeFactory::createLogModes() const 16 { 17 const QList<LogMode *> logModes{new DaemonLogMode()}; 18 return logModes; 19 } 20 createLogModeAction() const21LogModeAction *DaemonLogModeFactory::createLogModeAction() const 22 { 23 LogMode *logMode = Globals::instance().findLogMode(QStringLiteral(DAEMON_LOG_MODE_ID)); 24 25 if (!logMode->filesExist()) { 26 return nullptr; 27 } 28 29 auto logModeAction = new SimpleAction(logMode->action(), logMode); 30 31 return logModeAction; 32 } 33