[Qt] style police and small addition in rpcconsole

- fix spaces, indentation and coding style glitches
This commit is contained in:
Philip Kaufmann
2014-06-03 14:42:20 +02:00
parent 4c097f9669
commit bbe1925ce3
10 changed files with 27 additions and 22 deletions

View File

@@ -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 <openssl/crypto.h>
@@ -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);
}