SymbolDB: Namespace code under the Common namespace

Moves more common code into the Common namespace where it belongs.
This commit is contained in:
Lioncash
2018-05-27 17:37:52 -04:00
parent 72e8058fb8
commit f4ec419929
24 changed files with 122 additions and 104 deletions

View File

@ -202,7 +202,7 @@ void CodeWidget::OnSelectSymbol()
return;
const u32 address = items[0]->data(Qt::UserRole).toUInt();
const Symbol* symbol = g_symbolDB.GetSymbolFromAddr(address);
const Common::Symbol* symbol = g_symbolDB.GetSymbolFromAddr(address);
m_code_view->SetAddress(address, CodeViewWidget::SetAddressUpdate::WithUpdate);
UpdateCallstack();
@ -252,7 +252,7 @@ void CodeWidget::SetAddress(u32 address, CodeViewWidget::SetAddressUpdate update
void CodeWidget::Update()
{
const Symbol* symbol = g_symbolDB.GetSymbolFromAddr(m_code_view->GetAddress());
const Common::Symbol* symbol = g_symbolDB.GetSymbolFromAddr(m_code_view->GetAddress());
UpdateCallstack();
@ -309,7 +309,7 @@ void CodeWidget::UpdateSymbols()
item->setSelected(true);
// Disable non-function symbols as you can't do anything with them.
if (symbol.second.type != Symbol::Type::Function)
if (symbol.second.type != Common::Symbol::Type::Function)
item->setFlags(Qt::NoItemFlags);
item->setData(Qt::UserRole, symbol.second.address);
@ -321,14 +321,14 @@ void CodeWidget::UpdateSymbols()
m_symbols_list->sortItems();
}
void CodeWidget::UpdateFunctionCalls(const Symbol* symbol)
void CodeWidget::UpdateFunctionCalls(const Common::Symbol* symbol)
{
m_function_calls_list->clear();
for (const auto& call : symbol->calls)
{
const u32 addr = call.function;
const Symbol* call_symbol = g_symbolDB.GetSymbolFromAddr(addr);
const Common::Symbol* call_symbol = g_symbolDB.GetSymbolFromAddr(addr);
if (call_symbol)
{
@ -341,14 +341,14 @@ void CodeWidget::UpdateFunctionCalls(const Symbol* symbol)
}
}
void CodeWidget::UpdateFunctionCallers(const Symbol* symbol)
void CodeWidget::UpdateFunctionCallers(const Common::Symbol* symbol)
{
m_function_callers_list->clear();
for (const auto& caller : symbol->callers)
{
const u32 addr = caller.call_address;
const Symbol* caller_symbol = g_symbolDB.GetSymbolFromAddr(addr);
const Common::Symbol* caller_symbol = g_symbolDB.GetSymbolFromAddr(addr);
if (caller_symbol)
{