MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / synPrintOutput

Method synPrintOutput

src/plugins/debugger/dap/dapdebugger.cpp:987–1004  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

985}
986
987void 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
1006void DAPDebugger::handleFrames(const StackFrames &stackFrames)
1007{

Callers

nothing calls this directly

Calls 6

lastBlockMethod · 0.80
appendTextMethod · 0.80
documentMethod · 0.45
textMethod · 0.45
isEmptyMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected