diff --git a/src/plugins/debugger/debuggeroutputwindow.cpp b/src/plugins/debugger/debuggeroutputwindow.cpp index 3957d05137c9e35e5e0004cc31ec29eee839d671..397d4578821407c830c7ba5de4a9c4842a528e6c 100644 --- a/src/plugins/debugger/debuggeroutputwindow.cpp +++ b/src/plugins/debugger/debuggeroutputwindow.cpp @@ -82,6 +82,7 @@ static LogChannel channelForChar(QChar c) } } + ///////////////////////////////////////////////////////////////////// // // OutputHighlighter @@ -132,9 +133,37 @@ private: QPlainTextEdit *m_parent; }; + ///////////////////////////////////////////////////////////////////// // -// InputPane +// InputHighlighter +// +///////////////////////////////////////////////////////////////////// + +class InputHighlighter : public QSyntaxHighlighter +{ +public: + InputHighlighter(QPlainTextEdit *parent) + : QSyntaxHighlighter(parent->document()), m_parent(parent) + {} + +private: + void highlightBlock(const QString &text) + { + if (text.size() > 3 && text.at(2) == QLatin1Char(':')) { + QTextCharFormat format; + format.setForeground(Qt::darkRed); + setFormat(1, text.size(), format); + } + } + + QPlainTextEdit *m_parent; +}; + + +///////////////////////////////////////////////////////////////////// +// +// DebbuggerPane base class // ///////////////////////////////////////////////////////////////////// @@ -181,13 +210,22 @@ public: QAction *m_saveContentsAction; }; + +///////////////////////////////////////////////////////////////////// +// +// InputPane +// +///////////////////////////////////////////////////////////////////// + class InputPane : public DebuggerPane { Q_OBJECT public: InputPane(QWidget *parent) : DebuggerPane(parent) - {} + { + (void) new InputHighlighter(this); + } signals: void clearContentsRequested(); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 4354b63e4725830247aca4cc5194d4fc642c0d61..3621d114fd86c80276c7cac76c75c3e70e7ddaa0 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1904,6 +1904,8 @@ void GdbEngine::setTokenBarrier() } PENDING_DEBUG("\n--- token barrier ---\n"); gdbInputAvailable(LogMisc, _("--- token barrier ---")); + if (theDebuggerBoolSetting(LogTimeStamps)) + gdbInputAvailable(LogMisc, currentTime()); m_oldestAcceptableToken = currentToken(); } @@ -3163,6 +3165,8 @@ void GdbEngine::rebuildModel() if (!isSynchroneous()) m_processedNames.clear(); PENDING_DEBUG("REBUILDING MODEL" << count); + if (theDebuggerBoolSetting(LogTimeStamps)) + gdbInputAvailable(LogMisc, currentTime()); gdbInputAvailable(LogStatus, _("<Rebuild Watchmodel %1>").arg(count)); showStatusMessage(tr("Finished retrieving data."), 400); manager()->watchHandler()->endCycle();