From 816cc6151fcacb492043fbd45502fecfb8fa93a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Tue, 28 Nov 2017 12:26:52 +0100 Subject: [PATCH] Fix preview in XrefsDialog --- src/dialogs/XrefsDialog.cpp | 2 ++ src/widgets/SidebarWidget.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dialogs/XrefsDialog.cpp b/src/dialogs/XrefsDialog.cpp index cb20eeba..f08328a4 100644 --- a/src/dialogs/XrefsDialog.cpp +++ b/src/dialogs/XrefsDialog.cpp @@ -45,6 +45,7 @@ void XrefsDialog::fillRefs(QList refs, QList x tempItem->setText(0, xref.to_str); tempItem->setText(1, core->disassembleSingleInstruction(xref.to)); tempItem->setText(2, xrefTypeString(xref.type)); + tempItem->setData(0, Qt::UserRole, QVariant::fromValue(xref)); ui->fromTreeWidget->insertTopLevelItem(0, tempItem); } // Adjust columns to content @@ -64,6 +65,7 @@ void XrefsDialog::fillRefs(QList refs, QList x tempItem->setText(0, xref.from_str); tempItem->setText(1, core->disassembleSingleInstruction(xref.from)); tempItem->setText(2, xrefTypeString(xref.type)); + tempItem->setData(0, Qt::UserRole, QVariant::fromValue(xref)); ui->toTreeWidget->insertTopLevelItem(0, tempItem); } // Adjust columns to content diff --git a/src/widgets/SidebarWidget.cpp b/src/widgets/SidebarWidget.cpp index 7f9a7bb2..aa1820d1 100644 --- a/src/widgets/SidebarWidget.cpp +++ b/src/widgets/SidebarWidget.cpp @@ -168,7 +168,7 @@ void SidebarWidget::fill_refs(QList refs, QListsetText(0, RAddressString(xref.to)); + tempItem->setText(0, xref.to_str); tempItem->setText(1, Core()->disassembleSingleInstruction(xref.to)); tempItem->setData(0, Qt::UserRole, QVariant::fromValue(xref)); QString tooltip = Core()->cmd("pdi 10 @ " + QString::number(xref.to)).trimmed(); @@ -189,7 +189,7 @@ void SidebarWidget::fill_refs(QList refs, QListsetText(0, RAddressString(xref.from)); + tempItem->setText(0, xref.from_str); tempItem->setText(1, Core()->disassembleSingleInstruction(xref.from)); tempItem->setData(0, Qt::UserRole, QVariant::fromValue(xref)); QString tooltip = Core()->cmd("pdi 10 @ " + QString::number(xref.from)).trimmed();