diff options
| author | Mason Reed <mason@vector35.com> | 2025-04-01 14:49:05 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-04-02 05:36:54 -0400 |
| commit | 8d5c21ecf804e4913c7ac7b24a05947a3283df94 (patch) | |
| tree | b9aaeb7ca359351a2e93a859b60a30f09882d41f /view/sharedcache/ui/symboltable.h | |
| parent | 1e397c9e39b2acf21d791ec26a6855292d82b885 (diff) | |
[SharedCache] Fix the triage symbol table data races
Any update to the model should only happen on the UI thread now. This also fixes the other issue here: https://github.com/Vector35/binaryninja-api/issues/6300
Diffstat (limited to 'view/sharedcache/ui/symboltable.h')
| -rw-r--r-- | view/sharedcache/ui/symboltable.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/view/sharedcache/ui/symboltable.h b/view/sharedcache/ui/symboltable.h index 41e2597e..53c71874 100644 --- a/view/sharedcache/ui/symboltable.h +++ b/view/sharedcache/ui/symboltable.h @@ -15,7 +15,9 @@ class SymbolTableModel : public QAbstractTableModel { SymbolTableView* m_parent; std::string m_filter; - std::vector<SharedCacheAPI::CacheSymbol> m_symbols; + std::vector<SharedCacheAPI::CacheSymbol> m_preparedSymbols {}; + // the symbols we actually use. + std::vector<SharedCacheAPI::CacheSymbol> m_modelSymbols {}; public: explicit SymbolTableModel(SymbolTableView* parent); @@ -25,7 +27,7 @@ public: QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; - void updateSymbols(); + void updateSymbols(std::vector<SharedCacheAPI::CacheSymbol>&& symbols); void setFilter(std::string text); @@ -38,9 +40,6 @@ class SymbolTableView : public QTableView, public FilterTarget Q_OBJECT friend class SymbolTableModel; - // TODO: Both the model and the view store the symbols? - std::vector<SharedCacheAPI::CacheSymbol> m_symbols; - SymbolTableModel* m_model; public: |
