| 374 | } |
| 375 | |
| 376 | void DebugAnalysisSettingsWidget::addSymbolFile() |
| 377 | { |
| 378 | std::string path = Path::ToNativePath(QFileDialog::getOpenFileName(this, tr("Add Symbol File")).toStdString()); |
| 379 | if (path.empty()) |
| 380 | return; |
| 381 | |
| 382 | std::string relative_path = Path::MakeRelative(path, EmuFolders::GameSettings); |
| 383 | if (!relative_path.starts_with("..")) |
| 384 | path = std::move(relative_path); |
| 385 | |
| 386 | int row = m_symbol_file_model->rowCount(); |
| 387 | if (!m_symbol_file_model->insertRow(row)) |
| 388 | return; |
| 389 | |
| 390 | QStandardItem* path_item = new QStandardItem(); |
| 391 | path_item->setText(QString::fromStdString(path)); |
| 392 | m_symbol_file_model->setItem(row, PATH_COLUMN, path_item); |
| 393 | |
| 394 | QStandardItem* base_address_item = new QStandardItem(); |
| 395 | base_address_item->setText(""); |
| 396 | m_symbol_file_model->setItem(row, BASE_ADDRESS_COLUMN, base_address_item); |
| 397 | |
| 398 | QStandardItem* condition_item = new QStandardItem(); |
| 399 | condition_item->setText(""); |
| 400 | m_symbol_file_model->setItem(row, CONDITION_COLUMN, condition_item); |
| 401 | |
| 402 | saveSymbolFiles(); |
| 403 | updateEnabledStates(); |
| 404 | } |
| 405 | |
| 406 | void DebugAnalysisSettingsWidget::removeSymbolFile() |
| 407 | { |
nothing calls this directly
no test coverage detected