summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qheaderview.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-02-16 17:33:25 +0100
committerDavid Faure <david.faure@kdab.com>2018-03-03 19:02:26 +0000
commit1f920b779eb308ecdfd24423941b229cd0123589 (patch)
tree7e8c1631015033bfa8e19701b20a02c50bebda17 /src/widgets/itemviews/qheaderview.cpp
parent7fda40effa93b96d86806e56a02fe26a8dc38224 (diff)
QHeaderView: fix indentation in setModel() and clear()
The indentation of large code blocks in setModel() and clear() are not correct. Needed for another change to avoid whitespace changeds in there. Change-Id: I620c8c5e83e98747f5c17469738722cf976fb467 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Diffstat (limited to 'src/widgets/itemviews/qheaderview.cpp')
-rw-r--r--src/widgets/itemviews/qheaderview.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index 708b9b44ca..cd5961dc91 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -353,36 +353,36 @@ void QHeaderView::setModel(QAbstractItemModel *model)
Q_D(QHeaderView);
d->layoutChangePersistentSections.clear();
if (d->model && d->model != QAbstractItemModelPrivate::staticEmptyModel()) {
- if (d->orientation == Qt::Horizontal) {
- QObject::disconnect(d->model, SIGNAL(columnsInserted(QModelIndex,int,int)),
- this, SLOT(sectionsInserted(QModelIndex,int,int)));
- QObject::disconnect(d->model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
- this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int)));
- QObject::disconnect(d->model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
- this, SLOT(_q_sectionsRemoved(QModelIndex,int,int)));
- QObject::disconnect(d->model, SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)),
- this, SLOT(_q_sectionsAboutToBeChanged()));
- QObject::disconnect(d->model, SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int)),
- this, SLOT(_q_sectionsChanged()));
- } else {
- QObject::disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)),
- this, SLOT(sectionsInserted(QModelIndex,int,int)));
- QObject::disconnect(d->model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
- this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int)));
- QObject::disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
- this, SLOT(_q_sectionsRemoved(QModelIndex,int,int)));
- QObject::disconnect(d->model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)),
+ if (d->orientation == Qt::Horizontal) {
+ QObject::disconnect(d->model, SIGNAL(columnsInserted(QModelIndex,int,int)),
+ this, SLOT(sectionsInserted(QModelIndex,int,int)));
+ QObject::disconnect(d->model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
+ this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int)));
+ QObject::disconnect(d->model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
+ this, SLOT(_q_sectionsRemoved(QModelIndex,int,int)));
+ QObject::disconnect(d->model, SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_sectionsAboutToBeChanged()));
+ QObject::disconnect(d->model, SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_sectionsChanged()));
+ } else {
+ QObject::disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)),
+ this, SLOT(sectionsInserted(QModelIndex,int,int)));
+ QObject::disconnect(d->model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
+ this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int)));
+ QObject::disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
+ this, SLOT(_q_sectionsRemoved(QModelIndex,int,int)));
+ QObject::disconnect(d->model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_sectionsAboutToBeChanged()));
+ QObject::disconnect(d->model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)),
+ this, SLOT(_q_sectionsChanged()));
+ }
+ QObject::disconnect(d->model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
+ this, SLOT(headerDataChanged(Qt::Orientation,int,int)));
+ QObject::disconnect(d->model, SIGNAL(layoutAboutToBeChanged()),
this, SLOT(_q_sectionsAboutToBeChanged()));
- QObject::disconnect(d->model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)),
+ QObject::disconnect(d->model, SIGNAL(layoutChanged()),
this, SLOT(_q_sectionsChanged()));
}
- QObject::disconnect(d->model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
- this, SLOT(headerDataChanged(Qt::Orientation,int,int)));
- QObject::disconnect(d->model, SIGNAL(layoutAboutToBeChanged()),
- this, SLOT(_q_sectionsAboutToBeChanged()));
- QObject::disconnect(d->model, SIGNAL(layoutChanged()),
- this, SLOT(_q_sectionsChanged()));
- }
if (model && model != QAbstractItemModelPrivate::staticEmptyModel()) {
if (d->orientation == Qt::Horizontal) {
@@ -2282,8 +2282,8 @@ void QHeaderView::initializeSections()
const int oldCount = d->sectionCount();
const int newCount = d->modelSectionCount();
if (newCount <= 0) {
- d->clear();
- emit sectionCountChanged(oldCount, 0);
+ d->clear();
+ emit sectionCountChanged(oldCount, 0);
} else if (newCount != oldCount) {
const int min = qBound(0, oldCount, newCount - 1);
initializeSections(min, newCount - 1);
@@ -3655,14 +3655,14 @@ void QHeaderViewPrivate::removeSectionsFromSectionItems(int start, int end)
void QHeaderViewPrivate::clear()
{
if (state != NoClear) {
- length = 0;
- visualIndices.clear();
- logicalIndices.clear();
- sectionSelected.clear();
- hiddenSectionSize.clear();
- sectionItems.clear();
- lastSectionLogicalIdx = -1;
- invalidateCachedSizeHint();
+ length = 0;
+ visualIndices.clear();
+ logicalIndices.clear();
+ sectionSelected.clear();
+ hiddenSectionSize.clear();
+ sectionItems.clear();
+ lastSectionLogicalIdx = -1;
+ invalidateCachedSizeHint();
}
}