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

Method handleNextOutput

src/common/widget/outputpane.cpp:108–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void OutputPane::handleNextOutput()
109{
110 auto &output = d->outputList.first();
111 QTextCharFormat textFormat;
112 switch (output.format) {
113 case OutputFormat::StdOut:
114 textFormat.setFontWeight(QFont::Normal);
115 break;
116 case OutputFormat::StdErr:
117 textFormat.setForeground(kErrorMessageTextColor);
118 textFormat.setFontWeight(QFont::Normal);
119 break;
120 case OutputFormat::NormalMessage:
121 textFormat.setForeground(kMessageOutput);
122 break;
123 case OutputFormat::ErrorMessage:
124 textFormat.setForeground(kErrorMessageTextColor);
125 textFormat.setFontWeight(QFont::Bold);
126 break;
127 default:
128 textFormat.setFontWeight(QFont::Normal);
129 }
130
131 if (output.text.size() <= d->maxCharCount) {
132 appendCustomText(output.text, output.mode, textFormat);
133 d->outputList.removeFirst();
134 } else {
135 appendCustomText(output.text.left(d->maxCharCount), output.mode, textFormat);
136 output.text.remove(0, d->maxCharCount);
137 }
138
139 if (!d->outputList.isEmpty())
140 d->outputTimer.start();
141}
142
143bool OutputPane::isScrollbarAtBottom() const
144{

Callers

nothing calls this directly

Calls 5

leftMethod · 0.80
sizeMethod · 0.45
removeMethod · 0.45
isEmptyMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected