File indexing completed on 2024-05-12 05:48:40

0001 /*
0002     SPDX-FileCopyrightText: 2007 Nicolas Ternisien <nicolas.ternisien@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "postfixFactory.h"
0008 
0009 #include "ksystemlog_debug.h"
0010 #include "logMode.h"
0011 
0012 #include "postfixLogMode.h"
0013 #include "simpleAction.h"
0014 
0015 QList<LogMode *> PostfixLogModeFactory::createLogModes() const
0016 {
0017     const QList<LogMode *> logModes{new PostfixLogMode()};
0018     return logModes;
0019 }
0020 
0021 LogModeAction *PostfixLogModeFactory::createLogModeAction() const
0022 {
0023     LogMode *logMode = Globals::instance().findLogMode(QStringLiteral(POSTFIX_LOG_MODE_ID));
0024 
0025     if (!logMode->filesExist()) {
0026         return nullptr;
0027     }
0028 
0029     auto logModeAction = new SimpleAction(logMode->action(), logMode);
0030 
0031     logModeAction->setCategory(LogModeAction::ServicesCategory);
0032 
0033     return logModeAction;
0034 }
0035 
0036 #include "moc_postfixFactory.cpp"