| 985 | } |
| 986 | |
| 987 | void DAPDebugger::synPrintOutput(const QString &content, OutputPane::OutputFormat format) |
| 988 | { |
| 989 | QString outputContent = content; |
| 990 | if (format == OutputPane::OutputFormat::NormalMessage) { |
| 991 | QTextDocument *doc = d->outputPane->document(); |
| 992 | QTextBlock tb = doc->lastBlock(); |
| 993 | QString lastLineText = tb.text(); |
| 994 | QString prefix = "\n"; |
| 995 | if (lastLineText.isEmpty()) { |
| 996 | prefix = ""; |
| 997 | } |
| 998 | QDateTime curDatetime = QDateTime::currentDateTime(); |
| 999 | QString time = curDatetime.toString("hh:mm:ss"); |
| 1000 | outputContent = prefix + time + ":" + content + "\n"; |
| 1001 | } |
| 1002 | OutputPane::AppendMode mode = OutputPane::AppendMode::Normal; |
| 1003 | d->outputPane->appendText(outputContent, format, mode); |
| 1004 | } |
| 1005 | |
| 1006 | void DAPDebugger::handleFrames(const StackFrames &stackFrames) |
| 1007 | { |