diff options
author | Zhang Sheng <zhangsheng@uniontech.com> | 2020-11-16 11:19:17 +0800 |
---|---|---|
committer | Zhang Sheng <zhangsheng@uniontech.com> | 2020-11-16 12:53:37 +0000 |
commit | e13173c112b729da8f53dd2e81e8116a1ed857cf (patch) | |
tree | 49c2bce0c3349eebd0f2b62c80a1b7168ae45dc2 /src/widgets/itemviews | |
parent | 802e5a45baf3ac7da2cb3be06d10bdd69696fcae (diff) |
Adjust code format, add space after 'if'
Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/widgets/itemviews')
-rw-r--r-- | src/widgets/itemviews/qabstractitemview.cpp | 2 | ||||
-rw-r--r-- | src/widgets/itemviews/qtableview.cpp | 12 | ||||
-rw-r--r-- | src/widgets/itemviews/qtreeview.cpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index fbc616cc97..38fd4f1fcc 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -2727,7 +2727,7 @@ void QAbstractItemView::updateEditorData() void QAbstractItemView::updateEditorGeometries() { Q_D(QAbstractItemView); - if(d->editorIndexHash.isEmpty()) + if (d->editorIndexHash.isEmpty()) return; if (d->delayedPendingLayout) { // doItemsLayout() will end up calling this function again diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp index c02e5bd626..91afd3c7ed 100644 --- a/src/widgets/itemviews/qtableview.cpp +++ b/src/widgets/itemviews/qtableview.cpp @@ -79,7 +79,7 @@ void QSpanCollection::addSpan(QSpanCollection::Span *span) const SubIndex previousList = it_y.value(); for (Span *s : previousList) { //If a subspans intersect the row, we need to split it into subspans - if(s->bottom() >= span->top()) + if (s->bottom() >= span->top()) sub_index.insert(-s->left(), s); } } @@ -90,7 +90,7 @@ void QSpanCollection::addSpan(QSpanCollection::Span *span) //insert the span as supspan in all the lists that intesects the span while(-it_y.key() <= span->bottom()) { (*it_y).insert(-span->left(), span); - if(it_y == index.begin()) + if (it_y == index.begin()) break; --it_y; } @@ -112,7 +112,7 @@ void QSpanCollection::updateSpan(QSpanCollection::Span *span, int old_height) Q_ASSERT(it_y != index.end()); //it_y must exist since the span is in the list while (-it_y.key() <= span->bottom()) { (*it_y).insert(-span->left(), span); - if(it_y == index.begin()) + if (it_y == index.begin()) break; --it_y; } @@ -129,7 +129,7 @@ void QSpanCollection::updateSpan(QSpanCollection::Span *span, int old_height) it_y = index.erase(it_y); } } - if(it_y == index.begin()) + if (it_y == index.begin()) break; --it_y; } @@ -177,7 +177,7 @@ QSet<QSpanCollection::Span *> QSpanCollection::spansInRect(int x, int y, int w, { QSet<Span *> list; Index::const_iterator it_y = index.lowerBound(-y); - if(it_y == index.end()) + if (it_y == index.end()) --it_y; while(-it_y.key() <= y + h) { SubIndex::const_iterator it_x = (*it_y).lowerBound(-x); @@ -191,7 +191,7 @@ QSet<QSpanCollection::Span *> QSpanCollection::spansInRect(int x, int y, int w, break; --it_x; } - if(it_y == index.begin()) + if (it_y == index.begin()) break; --it_y; } diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp index 502d64eaf6..c0b0ee4f2d 100644 --- a/src/widgets/itemviews/qtreeview.cpp +++ b/src/widgets/itemviews/qtreeview.cpp @@ -616,7 +616,7 @@ void QTreeView::setRowHidden(int row, const QModelIndex &parent, bool hide) if (hide) { d->hiddenIndexes.insert(index); - } else if(d->isPersistent(index)) { //if the index is not persistent, it cannot be in the set + } else if (d->isPersistent(index)) { //if the index is not persistent, it cannot be in the set d->hiddenIndexes.remove(index); } |