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 "kernelFactory.h" 8 9 #include "ksystemlog_debug.h" 10 #include "logMode.h" 11 12 #include "kernelLogMode.h" 13 #include "simpleAction.h" 14 createLogModes() const15QList<LogMode *> KernelLogModeFactory::createLogModes() const 16 { 17 const QList<LogMode *> logModes{new KernelLogMode()}; 18 return logModes; 19 } 20 createLogModeAction() const21LogModeAction *KernelLogModeFactory::createLogModeAction() const 22 { 23 LogMode *logMode = Globals::instance().findLogMode(QStringLiteral(KERNEL_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