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

Method setItem

src/plugins/valgrind/mainframe/xmlstreamreader.cpp:195–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195void XmlStreamReader::setItem(Tip &tip, QTreeWidgetItem *parent)
196{
197 if (!tip.function.isEmpty() && !tip.line.isEmpty()) {
198 QTreeWidgetItem *item = new QTreeWidgetItem(parent);
199 QString filePath = tip.dir + "/" + tip.file;
200 item->setText(0, tip.function);
201 item->setToolTip(0, toolTipContent(tip));
202 item->setForeground(1, QColor("green"));
203 item->setText(1, tip.function + ":" + tip.line + ":0");
204 item->setToolTip(1, filePath + ":" + tip.line + ":0");
205 } else if (!tip.function.isEmpty() && !tip.object.isEmpty()) {
206 QTreeWidgetItem *item = new QTreeWidgetItem(parent);
207 item->setText(0, tip.function + " in " + tip.object);
208 item->setToolTip(0, toolTipContent(tip));
209 }
210}
211
212QString XmlStreamReader::toolTipContent(Tip &tip)
213{

Callers 5

onLabelsMethod · 0.80
onLabelsMethod · 0.80
updateInstalledMethod · 0.80
updateRepositoryMethod · 0.80
updateRunningMethod · 0.80

Calls 2

isEmptyMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected