MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / contextRemoveSearchResult

Method contextRemoveSearchResult

pcsx2-qt/Debugger/Memory/MemorySearchView.cpp:53–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void MemorySearchView::contextRemoveSearchResult()
54{
55 const QItemSelectionModel* selModel = m_ui.listSearchResults->selectionModel();
56 if (!selModel->hasSelection())
57 return;
58
59 const int selectedResultIndex = m_ui.listSearchResults->row(m_ui.listSearchResults->selectedItems().first());
60 const auto* rowToRemove = m_ui.listSearchResults->takeItem(selectedResultIndex);
61 u32 address = rowToRemove->data(Qt::UserRole).toUInt();
62 if (m_searchResults.size() > static_cast<size_t>(selectedResultIndex) && m_searchResults.at(selectedResultIndex).getAddress() == address)
63 {
64 m_searchResults.erase(m_searchResults.begin() + selectedResultIndex);
65 }
66 delete rowToRemove;
67}
68
69void MemorySearchView::contextCopySearchResultAddress()
70{

Callers

nothing calls this directly

Calls 7

firstMethod · 0.80
atMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45
getAddressMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected