Fix preview in XrefsDialog

This commit is contained in:
Florian Märkl 2017-11-28 12:26:52 +01:00
parent 85c2e32e16
commit 816cc6151f
2 changed files with 4 additions and 2 deletions

View File

@ -45,6 +45,7 @@ void XrefsDialog::fillRefs(QList<XrefDescription> refs, QList<XrefDescription> x
tempItem->setText(0, xref.to_str); tempItem->setText(0, xref.to_str);
tempItem->setText(1, core->disassembleSingleInstruction(xref.to)); tempItem->setText(1, core->disassembleSingleInstruction(xref.to));
tempItem->setText(2, xrefTypeString(xref.type)); tempItem->setText(2, xrefTypeString(xref.type));
tempItem->setData(0, Qt::UserRole, QVariant::fromValue(xref));
ui->fromTreeWidget->insertTopLevelItem(0, tempItem); ui->fromTreeWidget->insertTopLevelItem(0, tempItem);
} }
// Adjust columns to content // Adjust columns to content
@ -64,6 +65,7 @@ void XrefsDialog::fillRefs(QList<XrefDescription> refs, QList<XrefDescription> x
tempItem->setText(0, xref.from_str); tempItem->setText(0, xref.from_str);
tempItem->setText(1, core->disassembleSingleInstruction(xref.from)); tempItem->setText(1, core->disassembleSingleInstruction(xref.from));
tempItem->setText(2, xrefTypeString(xref.type)); tempItem->setText(2, xrefTypeString(xref.type));
tempItem->setData(0, Qt::UserRole, QVariant::fromValue(xref));
ui->toTreeWidget->insertTopLevelItem(0, tempItem); ui->toTreeWidget->insertTopLevelItem(0, tempItem);
} }
// Adjust columns to content // Adjust columns to content

View File

@ -168,7 +168,7 @@ void SidebarWidget::fill_refs(QList<XrefDescription> refs, QList<XrefDescription
{ {
XrefDescription xref = refs[i]; XrefDescription xref = refs[i];
QTreeWidgetItem *tempItem = new QTreeWidgetItem(); QTreeWidgetItem *tempItem = new QTreeWidgetItem();
tempItem->setText(0, RAddressString(xref.to)); tempItem->setText(0, xref.to_str);
tempItem->setText(1, Core()->disassembleSingleInstruction(xref.to)); tempItem->setText(1, Core()->disassembleSingleInstruction(xref.to));
tempItem->setData(0, Qt::UserRole, QVariant::fromValue(xref)); tempItem->setData(0, Qt::UserRole, QVariant::fromValue(xref));
QString tooltip = Core()->cmd("pdi 10 @ " + QString::number(xref.to)).trimmed(); QString tooltip = Core()->cmd("pdi 10 @ " + QString::number(xref.to)).trimmed();
@ -189,7 +189,7 @@ void SidebarWidget::fill_refs(QList<XrefDescription> refs, QList<XrefDescription
XrefDescription xref = xrefs[i]; XrefDescription xref = xrefs[i];
QTreeWidgetItem *tempItem = new QTreeWidgetItem(); QTreeWidgetItem *tempItem = new QTreeWidgetItem();
tempItem->setText(0, RAddressString(xref.from)); tempItem->setText(0, xref.from_str);
tempItem->setText(1, Core()->disassembleSingleInstruction(xref.from)); tempItem->setText(1, Core()->disassembleSingleInstruction(xref.from));
tempItem->setData(0, Qt::UserRole, QVariant::fromValue(xref)); tempItem->setData(0, Qt::UserRole, QVariant::fromValue(xref));
QString tooltip = Core()->cmd("pdi 10 @ " + QString::number(xref.from)).trimmed(); QString tooltip = Core()->cmd("pdi 10 @ " + QString::number(xref.from)).trimmed();