| 13 | #include <QLabel> |
| 14 | |
| 15 | XmlStreamReader::XmlStreamReader(DTreeWidget *tree) |
| 16 | { |
| 17 | treeWidget = tree; |
| 18 | |
| 19 | connect(treeWidget, &DTreeWidget::itemClicked, [=](QTreeWidgetItem *item, int column) { |
| 20 | QStringList toolTip = item->toolTip(column).split(":"); |
| 21 | if (toolTip.count() > 1) { |
| 22 | QString filePath = toolTip.at(0); |
| 23 | QString line = toolTip.at(1); |
| 24 | editor.gotoLine(filePath, line.toInt() - 1); |
| 25 | } |
| 26 | }); |
| 27 | } |
| 28 | |
| 29 | bool XmlStreamReader::readFile(const QString &fileName) |
| 30 | { |