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
LogWarning,
LogError,
LogStatus, // Used for status changed messages
LogTime, // Used for time stamp messages
LogDebug,
LogMisc
};
......
......@@ -65,6 +65,7 @@ static QChar charForChannel(int channel)
case LogInput: return '<';
case LogOutput: return '>';
case LogStatus: return 's';
case LogTime: return 't';
case LogMisc:
default: return ' ';
}
......@@ -79,6 +80,7 @@ static LogChannel channelForChar(QChar c)
case '<': return LogInput;
case '>': return LogOutput;
case 's': return LogStatus;
case 't': return LogTime;
default: return LogMisc;
}
}
......@@ -117,6 +119,10 @@ private:
format.setForeground(Qt::red);
setFormat(1, text.size(), format);
break;
case LogTime:
format.setForeground(Qt::darkRed);
setFormat(1, text.size(), format);
break;
default:
break;
}
......
......@@ -380,7 +380,7 @@ void GdbEngine::handleResponse(const QByteArray &buff)
static QTime lastTime;
if (theDebuggerBoolSetting(LogTimeStamps))
emit gdbOutputAvailable(LogDebug, currentTime());
emit gdbOutputAvailable(LogTime, currentTime());
emit gdbOutputAvailable(LogOutput, QString::fromLocal8Bit(buff, buff.length()));
#if 0
......
Markdown is supported
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