Mailcommon
filterlog.cpp
24 , mAllowedTypes(FilterLog::Meta | FilterLog::PatternDescription | FilterLog::RuleResult | FilterLog::PatternResult | FilterLog::AppliedAction)
43 qCDebug(MAILCOMMON_LOG) << "Filter log: memory limit reached, starting to discard old items, size =" << QString::number(mCurrentLogSize);
133 timedLog = QLatin1Char('[') + QTime::currentTime().toString() + QLatin1StringView("] ") + logEntry;
180 const QString line = QLatin1StringView("<p>") + entry + QLatin1StringView("</p>") + QLatin1Char('\n');
void logShrinked()
This signal is emitted whenever the log has shrunk.
bool saveToFile(const QString &fileName) const
Saves the log to the file with the given fileName.
Definition filterlog.cpp:170
bool isLogging() const
Returns whether the filter log is currently active.
Definition filterlog.cpp:80
void setMaxLogSize(long size=-1)
Sets the maximum size of the log in bytes.
Definition filterlog.cpp:91
void setContentTypeEnabled(ContentType type, bool enabled)
Sets whether a given content type will be enabled for logging.
Definition filterlog.cpp:112
void add(const QString &entry, ContentType type)
Adds the given log entry under the given content type to the log.
Definition filterlog.cpp:128
void logEntryAdded(const QString &entry)
This signal is emitted whenever a new entry has been added to the log.
void logStateChanged()
This signal is emitted whenever the activity of the filter log has been changed.
void setLogging(bool active)
Sets whether the filter log is currently active.
Definition filterlog.cpp:85
bool isContentTypeEnabled(ContentType type) const
Returns whether the given content type is enabled for logging.
Definition filterlog.cpp:123
static QString recode(const QString &plain)
Returns an escaped version of the log which can be used in a HTML document.
Definition filterlog.cpp:188
static FilterLog * instance()
Returns the single global instance of the filter log.
Definition filterlog.cpp:71
bool open(FILE *fh, OpenMode mode, FileHandleFlags handleFlags)
virtual void close() override
qint64 write(const QByteArray &data)
WriteOnly
Iterator
iterator begin()
iterator end()
iterator erase(const_iterator begin, const_iterator end)
Q_EMITQ_EMIT
QString & append(QChar ch)
qsizetype length() const const
QString number(double n, char format, int precision)
QString toHtmlEscaped() const const
QByteArray toLocal8Bit() const const
QTime currentTime()
QString toString(QStringView format) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.