File indexing completed on 2024-05-19 05:49:17
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 "kernelLogMode.h" 0008 0009 #include <KLocalizedString> 0010 0011 #include "ksystemlog_debug.h" 0012 0013 #include "kernelAnalyzer.h" 0014 #include "kernelItemBuilder.h" 0015 0016 #include <QAction> 0017 0018 KernelLogMode::KernelLogMode() 0019 : LogMode(QStringLiteral(KERNEL_LOG_MODE_ID), i18n("Kernel Log"), QStringLiteral(KERNEL_MODE_ICON)) 0020 { 0021 d->logModeConfigurationWidget = nullptr; 0022 0023 d->itemBuilder = new KernelItemBuilder(); 0024 0025 d->action = createDefaultAction(); 0026 d->action->setToolTip(i18n("Display the kernel log.")); 0027 d->action->setWhatsThis( 0028 i18n("Displays the kernel log in the current tab. This log is only useful for users who want to know why " 0029 "the Kernel does not detect their hardware or what is the cause of the last <i>kernel " 0030 "panic/oops</i>.")); 0031 } 0032 0033 KernelLogMode::~KernelLogMode() 0034 { 0035 } 0036 0037 Analyzer *KernelLogMode::createAnalyzer(const QVariant &options) 0038 { 0039 Q_UNUSED(options) 0040 return new KernelAnalyzer(this); 0041 } 0042 0043 QVector<LogFile> KernelLogMode::createLogFiles() 0044 { 0045 const QVector<LogFile> logFiles{LogFile(QUrl::fromLocalFile(QStringLiteral("/bin/dmesg")), Globals::instance().informationLogLevel())}; 0046 return logFiles; 0047 } 0048 0049 #include "moc_kernelLogMode.cpp"