From 94f59640a77cfe1b8561a74df808fd3a368be632 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Wed, 21 Jan 2026 00:33:26 -0500 Subject: Command Palette: Score fast items on main thread --- ui/commandpalette.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ui/commandpalette.h') diff --git a/ui/commandpalette.h b/ui/commandpalette.h index 8fb20cd6..f8aa0839 100644 --- a/ui/commandpalette.h +++ b/ui/commandpalette.h @@ -49,9 +49,10 @@ struct BINARYNINJAUIAPI CommandListItem QString extraSearchableText; QVariant action; Qt::TextElideMode secondaryElide = Qt::ElideRight; + int score = 0; bool addToRecents = true; bool includeUnfiltered = true; - int score = 0; + bool scoreFast = false; }; @@ -137,6 +138,8 @@ public: ); virtual ~CommandListScoreWorker(); + static int scoreItem(const CommandListItem* item, const QString& lowerFilter, const std::string& filterStr); + Q_SIGNALS: void dataFetched(int request, const std::vector>& items); void noMoreDataToFetch(int request); @@ -200,6 +203,7 @@ class BINARYNINJAUIAPI CommandListModel : public QAbstractItemModel void loadRecentItems(); std::vector generateFastCommandList(); + void scoreFastCommandList(); void sortCommandList(std::vector& list); void mergeCommandList(std::vector& output, std::vector&& input); void startScoreListThread(); -- cgit v1.3.1