Debugger Thread List: Sorting

This commit is contained in:
Ty Lamontagne 2023-10-09 18:11:28 -04:00 committed by Connor McLaughlin
parent 1e1091b365
commit ade2b4baea
2 changed files with 6 additions and 1 deletions

View File

@ -68,7 +68,10 @@ CpuWidget::CpuWidget(QWidget* parent, DebugInterface& cpu)
connect(m_ui.threadList, &QTableView::doubleClicked, this, &CpuWidget::onThreadListDoubleClick);
m_ui.threadList->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
m_ui.threadList->setModel(&m_threadModel);
m_threadProxyModel.setSourceModel(&m_threadModel);
m_ui.threadList->setModel(&m_threadProxyModel);
m_ui.threadList->setSortingEnabled(true);
m_ui.threadList->sortByColumn(ThreadModel::ThreadColumns::ID, Qt::SortOrder::AscendingOrder);
connect(m_ui.stackList, &QTableView::customContextMenuRequested, this, &CpuWidget::onStackListContextMenu);
connect(m_ui.stackList, &QTableView::doubleClicked, this, &CpuWidget::onStackListDoubleClick);

View File

@ -29,6 +29,7 @@
#include "QtHost.h"
#include <QtWidgets/QWidget>
#include <QtWidgets/QTableWidget>
#include <QtCore/QSortFilterProxyModel>
#include <vector>
@ -103,6 +104,7 @@ private:
BreakpointModel m_bpModel;
ThreadModel m_threadModel;
QSortFilterProxyModel m_threadProxyModel;
StackModel m_stackModel;
bool m_demangleFunctions = true;