summaryrefslogtreecommitdiff
path: root/examples/triage/headers.cpp
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2024-07-26 15:57:14 +0800
committerXusheng <xusheng@vector35.com>2024-08-02 12:17:53 +0800
commitabbae639d8ba182e8b3cf2d5a9844a9b1f9844a1 (patch)
tree272322e3269b09201c12489d93e7fbeb614fb140 /examples/triage/headers.cpp
parent7a9a2503aae0c2b92b437b2ea7796efaae93a822 (diff)
Support setting user global pointer value
Diffstat (limited to 'examples/triage/headers.cpp')
-rw-r--r--examples/triage/headers.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/triage/headers.cpp b/examples/triage/headers.cpp
index 1bdc31fe..6d6e2623 100644
--- a/examples/triage/headers.cpp
+++ b/examples/triage/headers.cpp
@@ -26,24 +26,24 @@ void NavigationLabel::mousePressEvent(QMouseEvent*)
NavigationAddressLabel::NavigationAddressLabel(const QString& text) :
NavigationLabel(text, getThemeColor(AddressColor), [this]() { clickEvent(); })
{
- m_address = text.toULongLong(nullptr, 0);
}
void NavigationAddressLabel::clickEvent()
{
+ auto address = text().toULongLong(nullptr, 0);
ViewFrame* viewFrame = ViewFrame::viewFrameForWidget(this);
if (viewFrame)
{
if (BinaryNinja::Settings::Instance()->Get<bool>("ui.view.graph.preferred") &&
viewFrame->getCurrentBinaryView() &&
- viewFrame->getCurrentBinaryView()->GetAnalysisFunctionsForAddress(m_address).size() > 0)
+ viewFrame->getCurrentBinaryView()->GetAnalysisFunctionsForAddress(address).size() > 0)
{
- viewFrame->navigate("Graph:" + viewFrame->getCurrentDataType(), m_address);
+ viewFrame->navigate("Graph:" + viewFrame->getCurrentDataType(), address);
}
else
{
- viewFrame->navigate("Linear:" + viewFrame->getCurrentDataType(), m_address);
+ viewFrame->navigate("Linear:" + viewFrame->getCurrentDataType(), address);
}
}
}
@@ -52,24 +52,24 @@ void NavigationAddressLabel::clickEvent()
NavigationCodeLabel::NavigationCodeLabel(const QString& text) :
NavigationLabel(text, getThemeColor(CodeSymbolColor), [this]() { clickEvent(); })
{
- m_address = text.toULongLong(nullptr, 0);
}
void NavigationCodeLabel::clickEvent()
{
+ auto address = text().toULongLong(nullptr, 0);
ViewFrame* viewFrame = ViewFrame::viewFrameForWidget(this);
if (viewFrame)
{
if (BinaryNinja::Settings::Instance()->Get<bool>("ui.view.graph.preferred") &&
viewFrame->getCurrentBinaryView() &&
- viewFrame->getCurrentBinaryView()->GetAnalysisFunctionsForAddress(m_address).size() > 0)
+ viewFrame->getCurrentBinaryView()->GetAnalysisFunctionsForAddress(address).size() > 0)
{
- viewFrame->navigate("Graph:" + viewFrame->getCurrentDataType(), m_address);
+ viewFrame->navigate("Graph:" + viewFrame->getCurrentDataType(), address);
}
else
{
- viewFrame->navigate("Linear:" + viewFrame->getCurrentDataType(), m_address);
+ viewFrame->navigate("Linear:" + viewFrame->getCurrentDataType(), address);
}
}
}