diff options
| author | Niklas Goby | 2011-03-23 12:18:01 +0100 |
|---|---|---|
| committer | Niklas Goby | 2011-03-23 12:18:01 +0100 |
| commit | 06de7af9a08a7182e4ea253370d7ec377f0e5a18 (patch) | |
| tree | d84b35a776166ea7df1715baeb26ba472955f1a3 /src/loggerengine.cpp | |
| parent | some tries with the qrc and jquery delivery (diff) | |
| parent | trigger file path definable (diff) | |
| download | fbgui-06de7af9a08a7182e4ea253370d7ec377f0e5a18.tar.gz fbgui-06de7af9a08a7182e4ea253370d7ec377f0e5a18.tar.xz fbgui-06de7af9a08a7182e4ea253370d7ec377f0e5a18.zip | |
Merge branch 'master' of git.openslx.org:lsfks/master-teamprojekt/fbgui
Diffstat (limited to 'src/loggerengine.cpp')
| -rw-r--r-- | src/loggerengine.cpp | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/src/loggerengine.cpp b/src/loggerengine.cpp index 5638908..4540678 100644 --- a/src/loggerengine.cpp +++ b/src/loggerengine.cpp @@ -6,40 +6,43 @@ LoggerEngine_fb::LoggerEngine_fb(QTextEdit *parent) : QxtLoggerEngine(){ // TODO: silly parent storing ... to change! _debugConsole = parent; - _initialized = false; - setLogLevelsEnabled(QxtLogger::DebugLevel); - enableLogging(); + //_initialized = false; + //setLogLevelsEnabled(QxtLogger::DebugLevel); + //enableLogging(); } LoggerEngine_fb::~LoggerEngine_fb(){} void LoggerEngine_fb::initLoggerEngine(){ - _initialized = true; + //_initialized = true; return; } -void LoggerEngine_fb::killLoggerEngine(){return;} +void LoggerEngine_fb::killLoggerEngine(){ + return; +} void LoggerEngine_fb::setLogLevelEnabled(QxtLogger::LogLevels level, bool enable){ - QxtLoggerEngine::setLogLevelsEnabled(level, enable); - if (!enable) QxtLoggerEngine::setLogLevelsEnabled(QxtLogger::DebugLevel); + //QxtLoggerEngine::setLogLevelsEnabled(level, enable); + //if (!enable) QxtLoggerEngine::setLogLevelsEnabled(QxtLogger::DebugLevel); } bool LoggerEngine_fb::isInitialized() const{ - return _initialized; + //return _initialized; } void LoggerEngine_fb::writeFormatted(QxtLogger::LogLevel level, const QList<QVariant> & msgs){ // TODO: handle different log levels if (msgs.isEmpty()) return; - Q_FOREACH(const QVariant& out, msgs) - { - if (!out.isNull()) + if (level == QxtLogger::DebugLevel){ + Q_FOREACH(const QVariant& out, msgs){ + if (!out.isNull()) _debugConsole->insertPlainText(out.toString()); + } + _debugConsole->insertPlainText(QString("\n")); + // autoscroll + QTextCursor c = _debugConsole->textCursor(); + c.movePosition(QTextCursor::End); + _debugConsole->setTextCursor(c); } - _debugConsole->insertPlainText(QString("\n")); - // autoscroll - QTextCursor c = _debugConsole->textCursor(); - c.movePosition(QTextCursor::End); - _debugConsole->setTextCursor(c); } //--------------------------------------------------------------------------------------------------- // Modified QxtBasicSTDLoggerEngine |
