diff options
author | Jonas Kvinge <jonas@jkvinge.net> | 2021-10-09 18:51:52 +0200 |
---|---|---|
committer | Jonas Kvinge <jonas@jkvinge.net> | 2021-10-15 20:07:09 +0200 |
commit | 553a1c48fd7a9078c1a33ad0829eaa84f0afb670 (patch) | |
tree | 0901e701467bfa3fb885e8cc7289c45c19509f10 /src/widgets/itemviews | |
parent | dedb29cf23959741593b2fa1481f210cd663cafb (diff) |
widgets: Fix typos in source code comments
Pick-to: 6.2
Change-Id: I22f71a53b0f7f0698450123343e25548c889c3e2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/itemviews')
-rw-r--r-- | src/widgets/itemviews/qabstractitemview.cpp | 4 | ||||
-rw-r--r-- | src/widgets/itemviews/qlistview.cpp | 10 | ||||
-rw-r--r-- | src/widgets/itemviews/qtreeview_p.h | 2 | ||||
-rw-r--r-- | src/widgets/itemviews/qtreewidget.cpp | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index bb4aa3457c..d782eb71ab 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -2523,7 +2523,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event) break; case Qt::Key_Enter: case Qt::Key_Return: - // ### we can't open the editor on enter, becuse + // ### we can't open the editor on enter, because // some widgets will forward the enter event back // to the viewport, starting an endless loop if (state() != EditingState || hasFocus()) { @@ -3354,7 +3354,7 @@ void QAbstractItemView::update(const QModelIndex &index) Q_D(QAbstractItemView); if (index.isValid()) { const QRect rect = visualRect(index); - //this test is important for peformance reason + //this test is important for performance reason //For example in dataChanged we simply update all the cells without checking //it can be a major bottleneck to update rects that aren't even part of the viewport if (d->viewport->rect().intersects(rect)) diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp index f9e3082962..0dba849711 100644 --- a/src/widgets/itemviews/qlistview.cpp +++ b/src/widgets/itemviews/qlistview.cpp @@ -1417,7 +1417,7 @@ void QListView::setSelection(const QRect &rect, QItemSelectionModel::SelectionFl top = bottom; bottom = tmp; } - // if the rect are on differnet lines, expand + // if the rect are on different lines, expand if (top.top() != bottom.top()) { // top rectangle if (isRightToLeft()) @@ -1934,7 +1934,7 @@ QSize QListViewPrivate::itemSize(const QStyleOptionViewItem &option, const QMode const QAbstractItemDelegate *delegate = q->itemDelegateForIndex(index); return delegate ? delegate->sizeHint(option, index) : QSize(); } - if (!cachedItemSize.isValid()) { // the last item is probaly the largest, so we use its size + if (!cachedItemSize.isValid()) { // the last item is probably the largest, so we use its size int row = model->rowCount(root) - 1; QModelIndex sample = model->index(row, column, root); const QAbstractItemDelegate *delegate = q->itemDelegateForIndex(sample); @@ -2671,7 +2671,7 @@ void QListModeViewBase::doStaticLayout(const QListViewLayoutInfo &info) flowPositions.append(flowPosition); segmentPositions.append(info.wrap ? segPosition + deltaSegPosition : INT_MAX); } - // if the new items are visble, update the viewport + // if the new items are visible, update the viewport QRect changedRect(topLeft, rect.bottomRight()); if (clipRect().intersects(changedRect)) viewport()->update(); @@ -2977,7 +2977,7 @@ bool QIconModeViewBase::filterDropEvent(QDropEvent *e) // do not delete item on internal move, see filterStartDrag() dd->dropEventMoved = true; e->accept(); // we have handled the event - // if the size has not grown, we need to check if it has shrinked + // if the size has not grown, we need to check if it has shrunk if (contentsSize != contents) { if ((contentsSize.width() <= contents.width() || contentsSize.height() <= contents.height())) { @@ -3269,7 +3269,7 @@ void QIconModeViewBase::doDynamicLayout(const QListViewLayoutInfo &info) // insert items in tree for (int row = insertFrom; row <= info.last; ++row) tree.insertLeaf(items.at(row).rect(), row); - // if the new items are visble, update the viewport + // if the new items are visible, update the viewport QRect changedRect(topLeft, rect.bottomRight()); if (clipRect().intersects(changedRect)) viewport()->update(); diff --git a/src/widgets/itemviews/qtreeview_p.h b/src/widgets/itemviews/qtreeview_p.h index 57ec3caed0..6304911118 100644 --- a/src/widgets/itemviews/qtreeview_p.h +++ b/src/widgets/itemviews/qtreeview_p.h @@ -264,7 +264,7 @@ public: int autoExpandDelay; QBasicTimer openTimer; - // used for drawing hilighted expand/collapse indicators + // used for drawing highlighted expand/collapse indicators mutable int hoverBranch; // used for blocking recursion when calling setViewportMargins from updateGeometries diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp index 805cf92b9c..cc94149e84 100644 --- a/src/widgets/itemviews/qtreewidget.cpp +++ b/src/widgets/itemviews/qtreewidget.cpp @@ -779,7 +779,7 @@ Qt::DropActions QTreeModel::supportedDropActions() const void QTreeModel::itemChanged(QTreeWidgetItem *item) { - SkipSorting skipSorting(this); //this is kind of wrong, but not doing this would kill performence + SkipSorting skipSorting(this); //this is kind of wrong, but not doing this would kill performance QModelIndex left = index(item, 0); QModelIndex right = index(item, item->columnCount() - 1); emit dataChanged(left, right); @@ -810,7 +810,7 @@ void QTreeModel::emitDataChanged(QTreeWidgetItem *item, int column, const QList< return; } - SkipSorting skipSorting(this); //This is a little bit wrong, but not doing it would kill performence + SkipSorting skipSorting(this); //This is a little bit wrong, but not doing it would kill performance QModelIndex bottomRight, topLeft; if (column == -1) { |