| 193 | } |
| 194 | |
| 195 | void 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 | |
| 212 | QString XmlStreamReader::toolTipContent(Tip &tip) |
| 213 | { |
no test coverage detected