summaryrefslogtreecommitdiff
path: root/view/sharedcache/ui/dsctriage.cpp
diff options
context:
space:
mode:
authorAlexander Taylor <alex@vector35.com>2025-04-16 10:21:22 -0400
committerAlexander Taylor <alex@vector35.com>2025-04-16 10:21:22 -0400
commitca696ab4a79902d0448135f6fca3769f0576e39d (patch)
tree3aabbba81e4968c03289c5d10eea5340f15597ce /view/sharedcache/ui/dsctriage.cpp
parent77c3bf786be64267cb7f45d9d0f118fcbf6d8aea (diff)
Add loaded column for kernel cache view.
Required adding an API to determine if an image is loaded.
Diffstat (limited to 'view/sharedcache/ui/dsctriage.cpp')
-rw-r--r--view/sharedcache/ui/dsctriage.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/view/sharedcache/ui/dsctriage.cpp b/view/sharedcache/ui/dsctriage.cpp
index faff5161..93a01698 100644
--- a/view/sharedcache/ui/dsctriage.cpp
+++ b/view/sharedcache/ui/dsctriage.cpp
@@ -130,6 +130,25 @@ void DSCTriageView::loadImagesWithAddr(const std::vector<uint64_t>& addresses, b
}
+void DSCTriageView::setImageLoaded(const uint64_t imageHeaderAddr)
+{
+ // Go through the m_imageModel and find the image associated with the address
+ // then set the image as loaded.
+ for (int i = 0; i < m_imageModel->rowCount(); i++)
+ {
+ auto addrCol = m_imageModel->index(i, 0);
+ const auto addr = addrCol.data().toString().toULongLong(nullptr, 16);
+ if (addr == imageHeaderAddr)
+ {
+ auto statusCol = m_imageModel->index(i, 1);
+ // See the `LoadedDelegate` class, we set 1 to indicate that this image is loaded.
+ m_imageModel->setData(statusCol, "1", Qt::DisplayRole);
+ break;
+ }
+ }
+}
+
+
QWidget* DSCTriageView::initImageTable()
{
m_imageTable = new FilterableTableView(this);
@@ -531,22 +550,3 @@ void DSCTriageView::RefreshData()
m_symbolTable->populateSymbols(*m_data);
}
-
-
-void DSCTriageView::setImageLoaded(const uint64_t imageHeaderAddr)
-{
- // Go through the m_loadImageModel and find the image associated with the address
- // then set the image as loaded.
- for (int i = 0; i < m_imageModel->rowCount(); i++)
- {
- auto addrCol = m_imageModel->index(i, 0);
- const auto addr = addrCol.data().toString().toULongLong(nullptr, 16);
- if (addr == imageHeaderAddr)
- {
- auto statusCol = m_imageModel->index(i, 1);
- // See the `LoadedDelegate` class, we set 1 to indicate that this image is loaded.
- m_imageModel->setData(statusCol, "1", Qt::DisplayRole);
- break;
- }
- }
-} \ No newline at end of file