summaryrefslogtreecommitdiff
path: root/examples/triage/headers.cpp
diff options
context:
space:
mode:
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);
}
}
}