MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / populateSymbols

Method populateSymbols

view/sharedcache/ui/symboltable.cpp:188–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188void SymbolTableView::populateSymbols(BinaryView &view)
189{
190 if (auto controller = SharedCacheController::GetController(view)) {
191 typedef std::vector<CacheSymbol> SymbolList;
192 // Retrieve the symbols from the controller in a future than pass that to the model.
193 QPointer<QFutureWatcher<SymbolList>> watcher = new QFutureWatcher<SymbolList>(this);
194 connect(watcher, &QFutureWatcher<SymbolList>::finished, this, [watcher, this]() {
195 if (watcher)
196 {
197 auto symbols = watcher->result();
198 m_model->updateSymbols(std::move(symbols));
199 }
200 });
201 QFuture<SymbolList> future = QtConcurrent::run([controller]() {
202 return controller->GetSymbols();
203 });
204 watcher->setFuture(future);
205 connect(this, &QObject::destroyed, this, [watcher]() {
206 if (watcher && watcher->isRunning()) {
207 watcher->cancel();
208 watcher->waitForFinished();
209 }
210 });
211 }
212}
213
214void SymbolTableView::setFilter(const std::string& filter) {
215 m_model->setFilter(filter);

Callers 1

RefreshDataMethod · 0.80

Calls 6

connectFunction · 0.85
runFunction · 0.85
resultMethod · 0.45
updateSymbolsMethod · 0.45
GetSymbolsMethod · 0.45
cancelMethod · 0.45

Tested by

no test coverage detected