MCPcopy Create free account
hub / github.com/Vector35/debugger / hoverTimerEvent

Method hoverTimerEvent

ui/registerswidget.cpp:747–788  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

745
746
747void DebugRegistersWidget::hoverTimerEvent()
748{
749 if (!underMouse())
750 return;
751 if (Settings::Instance()->Get<bool>("ui.manualTooltip") && ! (QGuiApplication::queryKeyboardModifiers() & UIAction::rawControl() ))
752 return;
753 if (m_contextMenuManager->isActive())
754 return;
755
756 auto index = indexAt(m_previewPos.toPoint());
757 if (!index.isValid())
758 return;
759
760 auto sourceIndex = m_filter->mapToSource(index);
761 if (!sourceIndex.isValid())
762 return;
763
764 auto reg = m_model->getRow(sourceIndex.row());
765 uint64_t addr = reg.value();
766
767 auto liveView = m_controller->GetLiveView();
768 if (!liveView)
769 return;
770
771 ViewFrame* frame = ViewFrame::viewFrameForWidget(this);
772 if (!frame)
773 return;
774
775 View* view = frame->getCurrentViewInterface();
776 if (!view)
777 return;
778
779 auto funcs = liveView->GetAnalysisFunctionsContainingAddress(addr);
780 if (!funcs.empty())
781 {
782 if (showDisassemblyPreview(this, frame, mapToGlobal(m_previewPos.toPoint()), liveView, funcs[0],
783 ViewLocation(funcs[0], addr, view->getILViewType(), BN_INVALID_EXPR)))
784 return;
785 }
786
787 showHexPreview(this, frame, mapToGlobal(m_previewPos.toPoint()), liveView, addr);
788}
789
790
791void DebugRegistersWidget::startHoverTimer(QMouseEvent* event)

Callers

nothing calls this directly

Calls 4

rowMethod · 0.80
getRowMethod · 0.45
valueMethod · 0.45
GetLiveViewMethod · 0.45

Tested by

no test coverage detected