Skip to content

Commit fe59f77

Browse files
committed
add recursive load button to dsc triage
1 parent 0de1372 commit fe59f77

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

view/sharedcache/ui/dsctriage.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,26 @@ QWidget* DSCTriageView::initImageTable()
258258
});
259259
loadImageButton->setText(" Load Selected ");
260260

261+
auto loadImageWithDepsButton = new QPushButton();
262+
connect(loadImageWithDepsButton, &QPushButton::clicked, [this](bool) {
263+
// Collect only visible selected rows
264+
QModelIndexList selected;
265+
for (const auto& index : m_imageTable->selectionModel()->selectedRows()) {
266+
if (!m_imageTable->isRowHidden(index.row())) {
267+
selected.append(index);
268+
}
269+
}
270+
271+
if (selected.empty())
272+
return;
273+
274+
std::vector<uint64_t> addresses;
275+
for (const auto& idx : selected)
276+
addresses.push_back(idx.data().toString().toULongLong(nullptr, 16));
277+
loadImagesWithAddr(addresses, true);
278+
});
279+
loadImageWithDepsButton->setText(" Load with Dependencies ");
280+
261281
auto refreshDataButton = new QPushButton();
262282
{
263283
// TODO: Might want to introduce a cooldown for this button (if we even keep it)
@@ -282,6 +302,7 @@ QWidget* DSCTriageView::initImageTable()
282302

283303
auto loadImageFooterLayout = new QHBoxLayout;
284304
loadImageFooterLayout->addWidget(loadImageButton);
305+
loadImageFooterLayout->addWidget(loadImageWithDepsButton);
285306
loadImageFooterLayout->addWidget(refreshDataButton);
286307
loadImageFooterLayout->setAlignment(Qt::AlignLeft);
287308
loadImageLayout->addLayout(loadImageFooterLayout);

0 commit comments

Comments
 (0)