diff options
| author | Glenn Smith <glenn@vector35.com> | 2026-01-21 00:33:26 -0500 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2026-01-21 00:37:08 -0500 |
| commit | 94f59640a77cfe1b8561a74df808fd3a368be632 (patch) | |
| tree | f1e7ed55728c2859d96b3b46bfc946b04ce22ac7 /ui | |
| parent | 24ad42106cc77fe4e7d28f9137aa084fdfe90c72 (diff) | |
Command Palette: Score fast items on main thread
Diffstat (limited to 'ui')
| -rw-r--r-- | ui/commandpalette.h | 6 |
1 files changed, 5 insertions, 1 deletions
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<std::pair<CommandListItem*, int>>& items); void noMoreDataToFetch(int request); @@ -200,6 +203,7 @@ class BINARYNINJAUIAPI CommandListModel : public QAbstractItemModel void loadRecentItems(); std::vector<CommandListItem> generateFastCommandList(); + void scoreFastCommandList(); void sortCommandList(std::vector<CommandListItem>& list); void mergeCommandList(std::vector<CommandListItem>& output, std::vector<CommandListItem>&& input); void startScoreListThread(); |
