Provider refactor: 2-method base class, ProcessProvider, ProcessPicker

Collapse Provider interface from 9 virtual methods to 2 (read + size),
move providers to src/providers/, add name()/kind()/getSymbol() virtuals.
Replace FileProvider with BufferProvider, add ProcessProvider (Win32)
with module-based symbol resolution, wire ProcessPicker dialog, and
integrate getSymbol into pointer display and command row.

- Fix isReadable overflow for large addresses
- Guard deferred showSourcePicker/showTypeAutocomplete against stale edits
- 7/7 tests pass including 3 new provider test suites

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
sysadmin
2026-02-06 06:52:44 -07:00
parent 637aa7a550
commit 44e4d88f58
23 changed files with 1457 additions and 221 deletions

View File

@@ -112,6 +112,7 @@ private slots:
void removeNode();
void changeNodeType();
void renameNodeAction();
void duplicateNodeAction();
void splitView();
void unsplitView();
@@ -205,6 +206,8 @@ void MainWindow::createMenus() {
actType->setText("Change &Type\tT");
auto* actName = node->addAction("Re&name", this, &MainWindow::renameNodeAction);
actName->setText("Re&name\tF2");
node->addAction("D&uplicate", QKeySequence(Qt::CTRL | Qt::Key_D),
this, &MainWindow::duplicateNodeAction);
// Help
auto* help = menuBar()->addMenu("&Help");
@@ -243,7 +246,7 @@ QMdiSubWindow* MainWindow::createTab(RcxDocument* doc) {
if (nodeIdx >= 0 && nodeIdx < ctrl->document()->tree.nodes.size()) {
auto& node = ctrl->document()->tree.nodes[nodeIdx];
m_statusLabel->setText(
QString("%1 %2 offset: +0x%3 size: %4 bytes")
QString("%1 %2 offset: 0x%3 size: %4 bytes")
.arg(kindToString(node.kind))
.arg(node.name)
.arg(node.offset, 4, 16, QChar('0'))
@@ -252,6 +255,13 @@ QMdiSubWindow* MainWindow::createTab(RcxDocument* doc) {
m_statusLabel->setText("Ready");
}
});
connect(ctrl, &RcxController::selectionChanged,
this, [this](int count) {
if (count == 0)
m_statusLabel->setText("Ready");
else if (count > 1)
m_statusLabel->setText(QString("%1 nodes selected").arg(count));
});
ctrl->refresh();
return sub;
@@ -640,6 +650,15 @@ void MainWindow::renameNodeAction() {
primary->beginInlineEdit(EditTarget::Name);
}
void MainWindow::duplicateNodeAction() {
auto* ctrl = activeController();
if (!ctrl) return;
auto* primary = ctrl->primaryEditor();
if (!primary || primary->isEditing()) return;
int ni = primary->currentNodeIndex();
if (ni >= 0) ctrl->duplicateNode(ni);
}
void MainWindow::splitView() {
auto* tab = activeTab();
if (!tab) return;