From 78a239bc6d344f53cf48e4bceca7d45df69220e6 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 21 Nov 2012 15:45:13 +0100 Subject: QtBase: examples/widgets/itemviews/addressbook codestyle Change-Id: I710d67018351c34ef14ac30edcca81aba7ff5ad3 Reviewed-by: hjk --- examples/widgets/itemviews/addressbook/tablemodel.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'examples/widgets/itemviews/addressbook/tablemodel.cpp') diff --git a/examples/widgets/itemviews/addressbook/tablemodel.cpp b/examples/widgets/itemviews/addressbook/tablemodel.cpp index 7d21337750..5d18392d4e 100644 --- a/examples/widgets/itemviews/addressbook/tablemodel.cpp +++ b/examples/widgets/itemviews/addressbook/tablemodel.cpp @@ -46,10 +46,10 @@ TableModel::TableModel(QObject *parent) { } -TableModel::TableModel(QList< QPair > pairs, QObject *parent) +TableModel::TableModel(QList > pairs, QObject *parent) : QAbstractTableModel(parent) { - listOfPairs=pairs; + listOfPairs = pairs; } //! [0] @@ -114,9 +114,9 @@ QVariant TableModel::headerData(int section, Qt::Orientation orientation, int ro bool TableModel::insertRows(int position, int rows, const QModelIndex &index) { Q_UNUSED(index); - beginInsertRows(QModelIndex(), position, position+rows-1); + beginInsertRows(QModelIndex(), position, position + rows - 1); - for (int row=0; row < rows; row++) { + for (int row = 0; row < rows; ++row) { QPair pair(" ", " "); listOfPairs.insert(position, pair); } @@ -130,9 +130,9 @@ bool TableModel::insertRows(int position, int rows, const QModelIndex &index) bool TableModel::removeRows(int position, int rows, const QModelIndex &index) { Q_UNUSED(index); - beginRemoveRows(QModelIndex(), position, position+rows-1); + beginRemoveRows(QModelIndex(), position, position + rows - 1); - for (int row=0; row < rows; ++row) { + for (int row = 0; row < rows; ++row) { listOfPairs.removeAt(position); } -- cgit v1.2.3