Qt/debugger: fix minor issues in the breakpointWidget

The items were editable while you cannot edit the breakpoints at the moment and the last breakpoint deleted would not cause the row count to change to 0.
This commit is contained in:
aldelaro5 2018-05-05 22:07:56 -04:00
parent 238c801711
commit 53803c1fca
No known key found for this signature in database
GPG Key ID: 054DD3E6FF48DB71
1 changed files with 2 additions and 0 deletions

View File

@ -77,6 +77,7 @@ void BreakpointWidget::CreateWidgets()
m_table->setColumnCount(5);
m_table->setSelectionMode(QAbstractItemView::SingleSelection);
m_table->setSelectionBehavior(QAbstractItemView::SelectRows);
m_table->setEditTriggers(QAbstractItemView::NoEditTriggers);
m_table->verticalHeader()->hide();
auto* layout = new QVBoxLayout;
@ -122,6 +123,7 @@ void BreakpointWidget::Update()
{tr("Active"), tr("Type"), tr("Function"), tr("Address"), tr("Flags")});
int i = 0;
m_table->setRowCount(i);
auto create_item = [this](const QString string = QStringLiteral("")) {
QTableWidgetItem* item = new QTableWidgetItem(string);