Merge bitcoin-core/gui#254: refactor: Drop redundant setEditTriggers(NoEditTriggers) calls

257f55c119 qt, refactor: Drop redundant setEditTriggers(NoEditTriggers) calls (Hennadii Stepanov)

Pull request description:

  The models of the both views have no `Qt::ItemIsEditable` flag:
  3c87dbe95c/src/qt/peertablemodel.cpp (L218-L224)
  3c87dbe95c/src/qt/bantablemodel.cpp (L148-L154)

ACKs for top commit:
  Talkless:
    utACK 257f55c119, seems reasonable.
  jarolrod:
    ACK 257f55c119, looks correct.

Tree-SHA512: 4356e4d785055935fba452488a5d97ed95995def97b26ab18af43a545835f9e9d4c347e4cad7952aa725179cf6e775a2208c48730feebf40e3b1a7ba5f402af0
pull/826/head
MarcoFalke 4 years ago
commit c00852653f
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

@ -608,7 +608,6 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
// set up peer table
ui->peerWidget->setModel(model->getPeerTableModel());
ui->peerWidget->verticalHeader()->hide();
ui->peerWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
ui->peerWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
ui->peerWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
ui->peerWidget->setContextMenuPolicy(Qt::CustomContextMenu);
@ -651,7 +650,6 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
// set up ban table
ui->banlistWidget->setModel(model->getBanTableModel());
ui->banlistWidget->verticalHeader()->hide();
ui->banlistWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
ui->banlistWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
ui->banlistWidget->setSelectionMode(QAbstractItemView::SingleSelection);
ui->banlistWidget->setContextMenuPolicy(Qt::CustomContextMenu);

Loading…
Cancel
Save