Skip to content

Commit

Permalink
BUG: Fix error log filtering in ctkErrorLogWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
Punzo authored and lassoan committed Sep 26, 2024
1 parent 76e2122 commit d7ce6d9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
7 changes: 1 addition & 6 deletions Libs/Core/ctkErrorLogAbstractModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ void ctkErrorLogAbstractModel::clear()

//------------------------------------------------------------------------------
void ctkErrorLogAbstractModel::filterEntry(const ctkErrorLogLevel::LogLevels& logLevel,
bool disableFilter)
bool disableFilter)
{
Q_D(ctkErrorLogAbstractModel);

Expand All @@ -382,11 +382,6 @@ void ctkErrorLogAbstractModel::filterEntry(const ctkErrorLogLevel::LogLevels& lo
}
patterns.removeAll(d->ErrorLogLevel(ctkErrorLogLevel::None));

// foreach(QString s, patterns)
// {
// std::cout << "pattern:" << qPrintable(s) << std::endl;
// }

QMetaEnum logLevelEnum = d->ErrorLogLevel.metaObject()->enumerator(0);
Q_ASSERT(QString("LogLevel").compare(logLevelEnum.name()) == 0);

Expand Down
20 changes: 10 additions & 10 deletions Libs/Core/ctkErrorLogLevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ class CTK_CORE_EXPORT ctkErrorLogLevel : public QObject

enum LogLevel
{
Unknown = 0,
Status,
Trace,
Debug,
Info,
Warning,
Error,
Critical,
Fatal,
None,
Unknown = 0x1,
Status = 0x2,
Trace = 0x4,
Debug = 0x8,
Info = 0x10,
Warning = 0x20,
Error = 0x40,
Critical = 0x80,
Fatal = 0x100,
None = 0x200,
};
Q_DECLARE_FLAGS(LogLevels, LogLevel)

Expand Down

0 comments on commit d7ce6d9

Please sign in to comment.