From 40f7d40e394657575001a8146d8233f1fc4356fd Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sun, 12 Oct 2025 22:46:54 -0400 Subject: [WARP] Improve UX surrounding removal of matched functions - Adds Python API to remove matched function - Adds command + UI actions to remove matched function - Adds command + UI actions to ignore function in subsequent matches --- plugins/warp/ui/shared/function.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'plugins/warp/ui/shared/function.h') diff --git a/plugins/warp/ui/shared/function.h b/plugins/warp/ui/shared/function.h index 5cfaff75..6281944d 100644 --- a/plugins/warp/ui/shared/function.h +++ b/plugins/warp/ui/shared/function.h @@ -49,6 +49,8 @@ public: void InsertFunction(uint64_t address, WarpFunctionItem* item); + void RemoveFunction(uint64_t address); + WarpFunctionItem* GetItem(const QModelIndex& index) const; std::optional GetAddress(const QModelIndex& index) const; @@ -68,6 +70,8 @@ public: emit dataChanged(topLeft, bottomRight); } } + + Warp::Ref GetMatchedFunction() const { return m_matchedFunction; } }; class WarpFunctionFilterModel : public QSortFilterProxyModel @@ -95,6 +99,7 @@ class WarpFunctionTableWidget : public QWidget, public FilterTarget FilteredView* m_filterView; QMenu* m_contextMenu; std::map)>> m_contextMenuActions; + std::map)>> m_contextMenuIsValid; public: explicit WarpFunctionTableWidget(QWidget* parent = nullptr); @@ -107,10 +112,17 @@ public: void RegisterContextMenuAction( const QString& name, const std::function)>& callback); + void RegisterContextMenuAction( + const QString &name, + const std::function)> &callback, + const std::function)> &isValid); + void SetFunctions(QVector functions); void InsertFunction(uint64_t address, WarpFunctionItem* function); + void RemoveFunction(uint64_t address); + void setFilter(const std::string&) override; void scrollToFirstItem() override {} -- cgit v1.3.1