summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Kvinge <jonas@jkvinge.net>2021-10-09 18:51:52 +0200
committerJonas Kvinge <jonas@jkvinge.net>2021-10-15 20:07:09 +0200
commit553a1c48fd7a9078c1a33ad0829eaa84f0afb670 (patch)
tree0901e701467bfa3fb885e8cc7289c45c19509f10
parentdedb29cf23959741593b2fa1481f210cd663cafb (diff)
widgets: Fix typos in source code comments
Pick-to: 6.2 Change-Id: I22f71a53b0f7f0698450123343e25548c889c3e2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
-rw-r--r--src/widgets/dialogs/qdialog.cpp2
-rw-r--r--src/widgets/dialogs/qwizard.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp14
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp4
-rw-r--r--src/widgets/itemviews/qlistview.cpp10
-rw-r--r--src/widgets/itemviews/qtreeview_p.h2
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp4
-rw-r--r--src/widgets/kernel/qapplication.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp2
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp2
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp10
-rw-r--r--src/widgets/styles/qstylesheetstyle_default.cpp4
-rw-r--r--src/widgets/util/qflickgesture.cpp2
-rw-r--r--src/widgets/util/qscroller.cpp2
-rw-r--r--src/widgets/widgets/qcombobox.cpp4
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp2
-rw-r--r--src/widgets/widgets/qdockarealayout.cpp2
-rw-r--r--src/widgets/widgets/qlabel.cpp4
-rw-r--r--src/widgets/widgets/qlineedit.cpp2
-rw-r--r--src/widgets/widgets/qmainwindowlayout_p.h2
-rw-r--r--src/widgets/widgets/qmdiarea.cpp2
-rw-r--r--src/widgets/widgets/qtoolbar.cpp2
-rw-r--r--src/widgets/widgets/qwidgetanimator.cpp2
25 files changed, 44 insertions, 44 deletions
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index 2e51e9eb00..8b60e8952a 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -810,7 +810,7 @@ void QDialog::setVisible(bool visible)
/*
The following block is to handle a special case, and does not
- really follow propper logic in concern of autoDefault and TAB
+ really follow proper logic in concern of autoDefault and TAB
order. However, it's here to ease usage for the users. If a
dialog has a default QPushButton, and first widget in the TAB
order also is a QPushButton, then we give focus to the main
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp
index 04840fc96b..e584db0f15 100644
--- a/src/widgets/dialogs/qwizard.cpp
+++ b/src/widgets/dialogs/qwizard.cpp
@@ -348,7 +348,7 @@ bool QWizardHeader::vistaDisabled() const
bool styleDisabled = false;
QWizard *wiz = parentWidget() ? qobject_cast <QWizard *>(parentWidget()->parentWidget()) : 0;
if (wiz) {
- // Designer dosen't support the Vista style for Wizards. This property is used to turn
+ // Designer doesn't support the Vista style for Wizards. This property is used to turn
// off the Vista style.
const QVariant v = wiz->property("_q_wizard_vista_off");
styleDisabled = v.isValid() && v.toBool();
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
index cfd6e3469f..9fa14a3f90 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
@@ -169,7 +169,7 @@ struct AnchorData : public QSimplexVariable {
qreal sizeAtMaximum;
// References to the classes that represent this anchor in the public world
- // An anchor may represent a LayoutItem, it may also be acessible externally
+ // An anchor may represent a LayoutItem, it may also be accessible externally
// through a GraphicsAnchor "handler".
QGraphicsLayoutItem *item;
QGraphicsAnchor *graphicsAnchor;
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index e0ee0a16ee..69a331a563 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -5036,7 +5036,7 @@ bool QGraphicsItem::collidesWithPath(const QPainterPath &path, Qt::ItemSelection
_q_adjustRect(&rectB);
if (!rectA.intersects(rectB)) {
// This we can determine efficiently. If the two rects neither
- // intersect nor contain eachother, then the two items do not collide.
+ // intersect nor contain each other, then the two items do not collide.
return false;
}
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index e3516d8481..0eceaeacb2 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -712,7 +712,7 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
if (item == dragDropItem)
dragDropItem = nullptr;
- // Reenable selectionChanged() for individual items
+ // Re-enable selectionChanged() for individual items
--selectionChanging;
if (!selectionChanging && selectedItems.size() != oldSelectedItemsSize)
emit q->selectionChanged();
@@ -1439,9 +1439,9 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou
if (mouseEvent->type() == QEvent::GraphicsSceneMouseDoubleClick
&& item != lastMouseGrabberItem && lastMouseGrabberItem) {
// If this item is different from the item that received the last
- // mouse event, and mouseEvent is a doubleclick event, then the
+ // mouse event, and mouseEvent is a double-click event, then the
// event is converted to a press. Known limitation:
- // Triple-clicking will not generate a doubleclick, though.
+ // Triple-clicking will not generate a double-click, though.
QGraphicsSceneMouseEvent mousePress(QEvent::GraphicsSceneMousePress);
mousePress.m_spont = mouseEvent->spontaneous();
mousePress.accept();
@@ -2266,7 +2266,7 @@ void QGraphicsScene::setSelectionArea(const QPainterPath &path,
break;
}
- // Reenable emitting selectionChanged() for individual items.
+ // Re-enable emitting selectionChanged() for individual items.
--d->selectionChanging;
if (!d->selectionChanging && changed)
@@ -2290,7 +2290,7 @@ void QGraphicsScene::clearSelection()
item->setSelected(false);
d->selectedItems.clear();
- // Reenable emitting selectionChanged() for individual items.
+ // Re-enable emitting selectionChanged() for individual items.
--d->selectionChanging;
if (!d->selectionChanging && changed)
@@ -2552,7 +2552,7 @@ void QGraphicsScene::addItem(QGraphicsItem *item)
item->d_ptr->resolvePalette(d->palette.resolveMask());
- // Reenable selectionChanged() for individual items
+ // Re-enable selectionChanged() for individual items
--d->selectionChanging;
if (!d->selectionChanging && d->selectedItems.size() != oldSelectedItemSize)
emit selectionChanged();
@@ -4734,7 +4734,7 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter *
if (itemIsTooSmallToRender || itemIsOutsideVisibleRect) {
// We cannot simply use !drawItem here. If we did it is possible
- // to enter the outter if statement with drawItem == false and minimumRenderSize > 0
+ // to enter the outer if statement with drawItem == false and minimumRenderSize > 0
// and finally end up inside this inner if, even though none of the above two
// conditions are met. In that case we should not return from this function
// but call draw() instead.
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) {
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 456544609e..651a44c990 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -2451,7 +2451,7 @@ void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget)
return; // Widget was not under the cursor when it was hidden/deleted.
if (widgetInShow && widget->parentWidget()->data->in_show)
- return; // Ingore recursive show.
+ return; // Ignore recursive show.
QWidget *mouseGrabber = QWidget::mouseGrabber();
if (mouseGrabber && mouseGrabber != widget)
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 0fe0029d67..ea7ef1468b 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -2642,7 +2642,7 @@ void QWidget::setStyle(QStyle *style)
#ifndef QT_NO_STYLE_STYLESHEET
if (QStyleSheetStyle *styleSheetStyle = qt_styleSheet(style)) {
//if for some reason someone try to set a QStyleSheetStyle, ref it
- //(this may happen for exemple in QButtonDialogBox which propagates its style)
+ //(this may happen for example in QButtonDialogBox which propagates its style)
styleSheetStyle->ref();
d->setStyle_helper(style, false);
} else if (qt_styleSheet(d->extra->style) || !qApp->styleSheet().isEmpty()) {
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index e3563dc301..846300100b 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -1037,7 +1037,7 @@ void QWidgetWindow::handleExposeEvent(QExposeEvent *event)
// If the window becomes not exposed...
if (wPriv->childrenShownByExpose) {
// ... and child widgets was previously shown by the expose event - hide widgets again.
- // This is a workaround, because sometimes when window is minimized programatically,
+ // This is a workaround, because sometimes when window is minimized programmatically,
// the QPA can notify that the window is exposed after changing window state to minimized
// and then, the QPA can send next expose event with null exposed region (not exposed).
wPriv->hideChildren(true);
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index ed21ba2ae4..1697832d7f 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -151,7 +151,7 @@ static QStyleSheetStyleCaches *styleSheetCaches = nullptr;
* the QStyleSheetStyle is a proxy. If used with others proxy style, we may end up with something like:
* QStyleSheetStyle -> ProxyStyle -> QStyleSheetStyle -> OriginalStyle
* Recursion may happen if the style call the widget()->style() again.
- * Not to mention the performence penalty of having two lookup of rules.
+ * Not to mention the performance penalty of having two lookup of rules.
*
* The first instance of QStyleSheetStyle will set globalStyleSheetStyle to itself. The second one
* will notice the globalStyleSheetStyle is not istelf and call its base style directly.
@@ -1418,7 +1418,7 @@ void QRenderRule::drawBackground(QPainter *p, const QRect& rect, const QPoint& o
// ### fix for gradients
const QPainterPath &borderPath = borderClip(originRect(rect, origin));
if (!borderPath.isEmpty()) {
- // Drawn intead of being used as clipping path for better visual quality
+ // Drawn instead of being used as clipping path for better visual quality
bool wasAntialiased = p->renderHints() & QPainter::Antialiasing;
p->setRenderHint(QPainter::Antialiasing);
p->fillPath(borderPath, brush);
@@ -2903,7 +2903,7 @@ void QStyleSheetStyle::polish(QWidget *w)
if (styleSheetCaches->styleRulesCache.contains(w)) {
// the widget accessed its style pointer before polish (or repolish)
- // (exemple: the QAbstractSpinBox constructor ask for the stylehint)
+ // (example: the QAbstractSpinBox constructor ask for the stylehint)
styleSheetCaches->styleRulesCache.remove(w);
styleSheetCaches->hasStyleRuleCache.remove(w);
styleSheetCaches->renderRulesCache.remove(w);
@@ -3956,7 +3956,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
QWindowsStyle::drawControl(ce, &mi, p, w);
if (mi.checkType != QStyleOptionMenuItem::NotCheckable && !mi.checked) {
// We have a style defined, but QWindowsStyle won't draw anything if not checked.
- // So we mimick what QWindowsStyle would do.
+ // So we mimic what QWindowsStyle would do.
int checkcol = qMax<int>(mi.maxIconWidth, QWindowsStylePrivate::windowsCheckMarkWidth);
QRect vCheckRect = visualRect(opt->direction, mi.rect, QRect(mi.rect.x(), mi.rect.y(), checkcol, mi.rect.height()));
if (mi.state.testFlag(State_Enabled) && mi.state.testFlag(State_Selected)) {
@@ -6257,7 +6257,7 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c
#endif // QT_CONFIG(toolbar)
// On mac we make pixel adjustments to layouts which are not
- // desireable when you have custom style sheets on them
+ // desirable when you have custom style sheets on them
case SE_CheckBoxLayoutItem:
case SE_ComboBoxLayoutItem:
case SE_DateTimeEditLayoutItem:
diff --git a/src/widgets/styles/qstylesheetstyle_default.cpp b/src/widgets/styles/qstylesheetstyle_default.cpp
index 1cb1adb2db..25a00e1852 100644
--- a/src/widgets/styles/qstylesheetstyle_default.cpp
+++ b/src/widgets/styles/qstylesheetstyle_default.cpp
@@ -40,7 +40,7 @@
/* This is the default Qt style sheet.
IMPORTANT: This style sheet is primarily meant for defining feature
- capablities of styles. Do NOT add default styling rules here. When in
+ capabilities of styles. Do NOT add default styling rules here. When in
doubt ask the stylesheet maintainer.
The stylesheet in here used to be in a CSS file, but was moved here to
@@ -116,7 +116,7 @@ using namespace QCss;
// found among the Value_* constants, in which case the second should be that
// constant. Otherwise the first parameter is Value::Identifier and the second
// is a string.
-// Adding more values is the same as seperating by spaces in CSS.
+// Adding more values is the same as separating by spaces in CSS.
// Ex. border: 2px solid black;
// ^ ^ ^
diff --git a/src/widgets/util/qflickgesture.cpp b/src/widgets/util/qflickgesture.cpp
index e5457243a0..2b8c316c8d 100644
--- a/src/widgets/util/qflickgesture.cpp
+++ b/src/widgets/util/qflickgesture.cpp
@@ -191,7 +191,7 @@ public:
result = true; // consume this event
} else if (mouseTarget && scrollerIsActive) {
- // we grabbed the mouse expicitly when the scroller became active, so undo that now
+ // we grabbed the mouse explicitly when the scroller became active, so undo that now
sendMouseEvent(nullptr, UngrabMouseBefore);
}
pressDelayEvent.reset(nullptr);
diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp
index ec679293bc..e6164178a8 100644
--- a/src/widgets/util/qscroller.cpp
+++ b/src/widgets/util/qscroller.cpp
@@ -1374,7 +1374,7 @@ void QScrollerPrivate::createScrollingSegments(const QPointF &v,
// v(t) = deltaTime * a * 0.5 * differentialForProgress(t / deltaTime)
// v(0) = vrelease
// v(deltaTime) = 0
- // deltaTime = (2 * vrelease) / (a * differntial(0))
+ // deltaTime = (2 * vrelease) / (a * differential(0))
// pos(t) = integrate(v(t)dt)
// pos(t) = vrelease * t - 0.5 * a * t * t
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 4e2f9c23a0..5e7ae42ebb 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -2711,7 +2711,7 @@ void QComboBox::showPopup()
// Position horizontally.
listRect.moveLeft(above.x());
- // Position vertically so the curently selected item lines up
+ // Position vertically so the currently selected item lines up
// with the combo box.
const QRect currentItemRect = view()->visualRect(view()->currentIndex());
const int offset = listRect.top() - currentItemRect.top();
@@ -3269,7 +3269,7 @@ void QComboBox::keyPressEvent(QKeyEvent *e)
if (!hasEditFocus() || !d->lineEdit)
e->ignore();
} else {
- e->ignore(); // let the surounding dialog have it
+ e->ignore(); // let the surrounding dialog have it
}
break;
#endif
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp
index 81b70b5f90..af8c172306 100644
--- a/src/widgets/widgets/qdatetimeedit.cpp
+++ b/src/widgets/widgets/qdatetimeedit.cpp
@@ -1513,7 +1513,7 @@ QDateTimeEdit::StepEnabled QDateTimeEdit::stepEnabled() const
if (d->wrapping)
return StepEnabled(StepUpEnabled | StepDownEnabled);
// 3 cases. date, time, datetime. each case look
- // at just the relavant component.
+ // at just the relevant component.
QVariant max, min, val;
if (!(d->sections & DateSections_Mask)) {
// time only, no date
diff --git a/src/widgets/widgets/qdockarealayout.cpp b/src/widgets/widgets/qdockarealayout.cpp
index ee200de57d..5a144224db 100644
--- a/src/widgets/widgets/qdockarealayout.cpp
+++ b/src/widgets/widgets/qdockarealayout.cpp
@@ -3298,7 +3298,7 @@ int QDockAreaLayoutInfo::separatorMove(const QList<int> &separator, const QPoint
#if QT_CONFIG(tabbar)
// Sets the correct positions for the separator widgets
-// Allocates new sepearator widgets with getSeparatorWidget
+// Allocates new separator widgets with getSeparatorWidget
void QDockAreaLayout::updateSeparatorWidgets() const
{
int j = 0;
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index 50e63dfd68..d6a9075712 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -1290,7 +1290,7 @@ void QLabelPrivate::_q_movieUpdated(const QRect& rect)
void QLabelPrivate::_q_movieResized(const QSize& size)
{
Q_Q(QLabel);
- q->update(); //we need to refresh the whole background in case the new size is smaler
+ q->update(); //we need to refresh the whole background in case the new size is smaller
valid_hints = false;
_q_movieUpdated(QRect(QPoint(0,0), size));
q->updateGeometry();
@@ -1674,7 +1674,7 @@ QRectF QLabelPrivate::layoutRect() const
if (!control)
return cr;
ensureTextLayouted();
- // Caculate y position manually
+ // Calculate y position manually
qreal rh = control->document()->documentLayout()->documentSize().height();
qreal yo = 0;
if (align & Qt::AlignVCenter)
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 1911620f42..616e1ae424 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -2098,7 +2098,7 @@ void QLineEdit::paintEvent(QPaintEvent *)
// Asian users see an IM selection text as cursor on candidate
// selection phase of input method, so the ordinary cursor should be
// invisible if we have a preedit string. another condition is when inputmask
- // isn't empty,we don't need draw cursor,because cursor and character overlaping
+ // isn't empty,we don't need draw cursor,because cursor and character overlapping
// area is white.
if (d->cursorVisible && !d->control->isReadOnly() && d->control->inputMask().isEmpty())
flags |= QWidgetLineControl::DrawCursor;
diff --git a/src/widgets/widgets/qmainwindowlayout_p.h b/src/widgets/widgets/qmainwindowlayout_p.h
index 0c840d7ac7..20518bc2c9 100644
--- a/src/widgets/widgets/qmainwindowlayout_p.h
+++ b/src/widgets/widgets/qmainwindowlayout_p.h
@@ -384,7 +384,7 @@ private:
#endif // QT_CONFIG(dockwidget)
/* This data structure represents the state of all the tool-bars and dock-widgets. It's value based
- so it can be easilly copied into a temporary variable. All operations are performed without moving
+ so it can be easily copied into a temporary variable. All operations are performed without moving
any widgets. Only when we are sure we have the desired state, we call apply(), which moves the
widgets.
*/
diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp
index 99b2009890..b5671180a2 100644
--- a/src/widgets/widgets/qmdiarea.cpp
+++ b/src/widgets/widgets/qmdiarea.cpp
@@ -2547,7 +2547,7 @@ bool QMdiArea::eventFilter(QObject *object, QEvent *event)
if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) {
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
- // Ingore key events without a Ctrl modifier (except for press/release on the modifier itself).
+ // Ignore key events without a Ctrl modifier (except for press/release on the modifier itself).
if (!(keyEvent->modifiers() & Qt::ControlModifier) && keyEvent->key() != Qt::Key_Control)
return QAbstractScrollArea::eventFilter(object, event);
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp
index 169fbf5de8..7cf5bdf266 100644
--- a/src/widgets/widgets/qtoolbar.cpp
+++ b/src/widgets/widgets/qtoolbar.cpp
@@ -1053,7 +1053,7 @@ bool QToolBar::event(QEvent *event)
case QEvent::Leave:
if (d->state != nullptr && d->state->dragging) {
#ifdef Q_OS_WIN
- // This is a workaround for loosing the mouse on Vista.
+ // This is a workaround for losing the mouse on Vista.
QPoint pos = QCursor::pos();
QMouseEvent fake(QEvent::MouseMove, mapFromGlobal(pos), pos, Qt::NoButton,
QGuiApplication::mouseButtons(), QGuiApplication::keyboardModifiers());
diff --git a/src/widgets/widgets/qwidgetanimator.cpp b/src/widgets/widgets/qwidgetanimator.cpp
index 9a4045196c..ea1e49bf41 100644
--- a/src/widgets/widgets/qwidgetanimator.cpp
+++ b/src/widgets/widgets/qwidgetanimator.cpp
@@ -93,7 +93,7 @@ void QWidgetAnimator::animate(QWidget *widget, const QRect &_final_geometry, boo
animate = animate && !r.isNull() && !_final_geometry.isNull();
- // might make the wigdet go away by sending it to negative space
+ // might make the widget go away by sending it to negative space
const QRect final_geometry = _final_geometry.isValid() || widget->isWindow() ? _final_geometry :
QRect(QPoint(-500 - widget->width(), -500 - widget->height()), widget->size());