summaryrefslogtreecommitdiff
path: root/gui/gui.cc
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-04-26 16:38:07 -0400
committerbd <bdunahu@operationnull.com>2025-04-26 16:38:07 -0400
commitd449750f789076459de8d47c2960a1279e543c32 (patch)
tree7e2f5fd8f6f0ba267b7855ee4bb4bd181255c393 /gui/gui.cc
parent6382d595cf947eb54249ff5fea20d8eb073ef3c1 (diff)
Fix some issues in GUI looking for memory leak
Diffstat (limited to 'gui/gui.cc')
-rw-r--r--gui/gui.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/gui/gui.cc b/gui/gui.cc
index 2555435..7df1bfc 100644
--- a/gui/gui.cc
+++ b/gui/gui.cc
@@ -349,28 +349,31 @@ void GUI::make_tabs(int num)
ui->storage->clear();
- this->tab_boxes.clear();
qDeleteAll(this->tab_boxes);
+ this->tab_boxes.clear();
for (i = 0; i < num; ++i) {
if (i == 0) {
n = "Registers";
e = new StorageView(0, this);
- } else if (i == 1) {
+ } else if (i == num - 1) {
n = "DRAM";
- e = new StorageView(MEM_LINES, this);
+ e = new StorageView(4, this);
} else {
- n = QString("L%1").arg(i - 1);
+ n = QString("L%1").arg(i);
e = new StorageView(
- cache_size_mapper(this->curr_cache_levels, i), this);
+ // cache_size_mapper(this->curr_cache_levels-1, i-1)
+ 4, this);
}
+ std::cout << "total levels: " << num << ":"
+ << this->curr_cache_levels - 1 << " level: " << i
+ << std::endl;
- t = new QTableView;
+ t = new QTableView(ui->storage);
t->setModel(e);
d = new DigitLabelDelegate(t);
- connect(
- this, &GUI::hex_toggled, e, &StorageView::set_hex_display);
+ connect(this, &GUI::hex_toggled, e, &StorageView::set_hex_display);
connect(
this, &GUI::hex_toggled, d, &DigitLabelDelegate::set_hex_display);