| 745 | |
| 746 | |
| 747 | void 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 | |
| 791 | void DebugRegistersWidget::startHoverTimer(QMouseEvent* event) |
nothing calls this directly
no test coverage detected