Commit c58ba011 authored by hjk's avatar hjk
Browse files

debugger: some color for time stamps in log output

parent d430a412
...@@ -135,6 +135,7 @@ enum LogChannel ...@@ -135,6 +135,7 @@ enum LogChannel
LogWarning, LogWarning,
LogError, LogError,
LogStatus, // Used for status changed messages LogStatus, // Used for status changed messages
LogTime, // Used for time stamp messages
LogDebug, LogDebug,
LogMisc LogMisc
}; };
......
...@@ -65,6 +65,7 @@ static QChar charForChannel(int channel) ...@@ -65,6 +65,7 @@ static QChar charForChannel(int channel)
case LogInput: return '<'; case LogInput: return '<';
case LogOutput: return '>'; case LogOutput: return '>';
case LogStatus: return 's'; case LogStatus: return 's';
case LogTime: return 't';
case LogMisc: case LogMisc:
default: return ' '; default: return ' ';
} }
...@@ -79,6 +80,7 @@ static LogChannel channelForChar(QChar c) ...@@ -79,6 +80,7 @@ static LogChannel channelForChar(QChar c)
case '<': return LogInput; case '<': return LogInput;
case '>': return LogOutput; case '>': return LogOutput;
case 's': return LogStatus; case 's': return LogStatus;
case 't': return LogTime;
default: return LogMisc; default: return LogMisc;
} }
} }
...@@ -117,6 +119,10 @@ private: ...@@ -117,6 +119,10 @@ private:
format.setForeground(Qt::red); format.setForeground(Qt::red);
setFormat(1, text.size(), format); setFormat(1, text.size(), format);
break; break;
case LogTime:
format.setForeground(Qt::darkRed);
setFormat(1, text.size(), format);
break;
default: default:
break; break;
} }
......
...@@ -380,7 +380,7 @@ void GdbEngine::handleResponse(const QByteArray &buff) ...@@ -380,7 +380,7 @@ void GdbEngine::handleResponse(const QByteArray &buff)
static QTime lastTime; static QTime lastTime;
if (theDebuggerBoolSetting(LogTimeStamps)) if (theDebuggerBoolSetting(LogTimeStamps))
emit gdbOutputAvailable(LogDebug, currentTime()); emit gdbOutputAvailable(LogTime, currentTime());
emit gdbOutputAvailable(LogOutput, QString::fromLocal8Bit(buff, buff.length())); emit gdbOutputAvailable(LogOutput, QString::fromLocal8Bit(buff, buff.length()));
#if 0 #if 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment