From bbe1925ce3e627fd405d83e3c947e1f430a1d720 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Tue, 3 Jun 2014 14:42:20 +0200 Subject: [Qt] style police and small addition in rpcconsole - fix spaces, indentation and coding style glitches --- src/qt/rpcconsole.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/qt/rpcconsole.cpp') diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index ed048cf3cc..3b7d37ff39 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -10,10 +10,9 @@ #include "peertablemodel.h" #include "main.h" -#include "util.h" - #include "rpcserver.h" #include "rpcclient.h" +#include "util.h" #include "json/json_spirit_value.h" #include @@ -297,10 +296,8 @@ void RPCConsole::setClientModel(ClientModel *model) // connect the peerWidget's selection model to our peerSelected() handler QItemSelectionModel *peerSelectModel = ui->peerWidget->selectionModel(); - connect(peerSelectModel, - SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), - this, - SLOT(peerSelected(const QItemSelection &, const QItemSelection &))); + connect(peerSelectModel, SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), + this, SLOT(peerSelected(const QItemSelection &, const QItemSelection &))); connect(model->getPeerTableModel(), SIGNAL(layoutChanged()), this, SLOT(peerLayoutChanged())); // Provide initial values @@ -511,6 +508,8 @@ void RPCConsole::updateTrafficStats(quint64 totalBytesIn, quint64 totalBytesOut) void RPCConsole::peerSelected(const QItemSelection &selected, const QItemSelection &deselected) { + Q_UNUSED(deselected); + if (selected.indexes().isEmpty()) return; @@ -638,6 +637,8 @@ void RPCConsole::updateNodeDetail(const CNodeCombinedStats *combinedStats) ui->peerBanScore->setText(tr("Fetching...")); } +// We override the virtual resizeEvent of the QWidget to adjust tables column +// sizes as the tables width is proportional to the dialogs width. void RPCConsole::resizeEvent(QResizeEvent *event) { QWidget::resizeEvent(event); @@ -651,7 +652,7 @@ void RPCConsole::showEvent(QShowEvent *event) // peerWidget needs a resize in case the dialog has non-default geometry columnResizingFixer->stretchColumnWidth(PeerTableModel::Address); - // start the PeerTableModel refresh timer + // start PeerTableModel auto refresh clientModel->getPeerTableModel()->startAutoRefresh(1000); } -- cgit v1.2.3