diff options
author | Jonas Kvinge <jonas@jkvinge.net> | 2021-10-11 19:14:08 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-10-12 10:52:39 +0000 |
commit | ce24eaf5ad744345c991dea8c99c0913877ec1e4 (patch) | |
tree | 2156110411fbb7092e9969608a6955f26d60cd6f | |
parent | 6ac7df6d6b4a0c555988925b25a2997bae264411 (diff) |
qcocoa: Fix typos in source code comments
Change-Id: Ide20e1d133891890a7673c8403ea91b489baa8f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 93f808b781ea3a5d6a2d756a3361d36858830238)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaintegration.mm | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoamenu.mm | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoamenubar.mm | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoatheme.mm | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.h | 4 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 8 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qmacclipboard.mm | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.mm | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview_keys.mm | 2 |
11 files changed, 15 insertions, 15 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm index 40d8f639fc..c5bb1eb865 100644 --- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm @@ -343,7 +343,7 @@ QT_USE_NAMESPACE return item.enabled; // FIXME Test with with Qt as plugin or embedded QWindow. auto *platformItem = nativeItem.platformMenuItem; - if (!platformItem) // Try a bit harder with orphan menu itens + if (!platformItem) // Try a bit harder with orphan menu items return item.hasSubmenu || (item.enabled && (item.action != @selector(qt_itemFired:))); // Menu-holding items are always enabled, as it's conventional in Cocoa diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm index 042abae1ca..423a8a1ccd 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm @@ -688,7 +688,7 @@ bool QCocoaEventDispatcherPrivate::hasModalSession() const void QCocoaEventDispatcherPrivate::cleanupModalSessions() { // Go through the list of modal sessions, and end those - // that no longer has a window assosiated; no window means + // that no longer has a window associated; no window means // the session has logically ended. The reason we wait like // this to actually end the sessions for real (rather than at the // point they were marked as stopped), is that ending a session diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 1ab30df7e8..7523c5d6ea 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -163,7 +163,7 @@ QCocoaIntegration::QCocoaIntegration(const QStringList ¶mList) if (qEnvironmentVariableIsEmpty("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM")) { // Applications launched from plain executables (without an app - // bundle) are "background" applications that does not take keybaord + // bundle) are "background" applications that does not take keyboard // focus or have a dock icon or task switcher entry. Qt Gui apps generally // wants to be foreground applications so change the process type. (But // see the function implementation for exceptions.) diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm index d6af2a5523..5023afa3a6 100644 --- a/src/plugins/platforms/cocoa/qcocoamenu.mm +++ b/src/plugins/platforms/cocoa/qcocoamenu.mm @@ -324,7 +324,7 @@ void QCocoaMenu::syncSeparatorsCollapsible(bool enable) if (!item->isSeparator()) continue; - // sync the visiblity directly + // sync the visibility directly item->sync(); } } diff --git a/src/plugins/platforms/cocoa/qcocoamenubar.mm b/src/plugins/platforms/cocoa/qcocoamenubar.mm index a2a8535547..2e0eeb06e3 100644 --- a/src/plugins/platforms/cocoa/qcocoamenubar.mm +++ b/src/plugins/platforms/cocoa/qcocoamenubar.mm @@ -196,7 +196,7 @@ void QCocoaMenuBar::syncMenu_helper(QPlatformMenu *menu, bool menubarUpdate) BOOL shouldHide = YES; if (cocoaMenu->isVisible()) { - // If the NSMenu has no visble items, or only separators, we should hide it + // If the NSMenu has no visible items, or only separators, we should hide it // on the menubar. This can happen after syncing the menu items since they // can be moved to other menus. for (NSMenuItem *item in cocoaMenu->nsMenu().itemArray) diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm index 8f0f6b90d8..6b2dfafd92 100644 --- a/src/plugins/platforms/cocoa/qcocoatheme.mm +++ b/src/plugins/platforms/cocoa/qcocoatheme.mm @@ -209,7 +209,7 @@ static QHash<QPlatformTheme::Palette, QPalette*> qt_mac_createRolePalettes() } else { // selectedMenuItemColor would presumably be the correct color to use as the background // for selected menu items. But that color is always blue, and doesn't follow the - // appearance color in system preferences. So we therefore deliberatly choose to use + // appearance color in system preferences. So we therefore deliberately choose to use // keyboardFocusIndicatorColor instead, which appears to have the same color value. selectedMenuItemColor = [NSColor keyboardFocusIndicatorColor]; } diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h index 6496a12b3d..42b5b5e117 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.h +++ b/src/plugins/platforms/cocoa/qcocoawindow.h @@ -285,8 +285,8 @@ public: // for QNSView return upper < right.upper; } }; - QHash<quintptr, BorderRange> m_contentBorderAreas; // identifer -> uppper/lower - QHash<quintptr, bool> m_enabledContentBorderAreas; // identifer -> enabled state (true/false) + QHash<quintptr, BorderRange> m_contentBorderAreas; // identifier -> uppper/lower + QHash<quintptr, bool> m_enabledContentBorderAreas; // identifier -> enabled state (true/false) #if QT_CONFIG(vulkan) VkSurfaceKHR m_vulkanSurface = nullptr; diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 282d62b02c..f9fe9c106f 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -253,7 +253,7 @@ bool QCocoaWindow::isForeignWindow() const QRect QCocoaWindow::geometry() const { - // QWindows that are embedded in a NSView hiearchy may be considered + // QWindows that are embedded in a NSView hierarchy may be considered // top-level from Qt's point of view but are not from Cocoa's point // of view. Embedded QWindows get global (screen) geometry. if (isEmbedded()) { @@ -1125,7 +1125,7 @@ NSWindow *QCocoaWindow::nativeWindow() const void QCocoaWindow::setEmbeddedInForeignView() { - // Release any previosly created NSWindow. + // Release any previously created NSWindow. [m_nsWindow closeAndRelease]; m_nsWindow = 0; } @@ -1828,7 +1828,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window) if (!m_enabledContentBorderAreas.value(range.identifier, false)) continue; - // Is this sub-range adjacent to or overlaping the + // Is this sub-range adjacent to or overlapping the // existing total border area range? If so merge // it into the total range, if (range.upper <= (effectiveTopContentBorderThickness + 1)) @@ -1879,7 +1879,7 @@ bool QCocoaWindow::testContentBorderAreaPosition(int position) const if (!m_drawContentBorderGradient || !isContentView()) return false; - // Determine if the given y postion (relative to the content area) is inside the + // Determine if the given y position (relative to the content area) is inside the // unified toolbar area. Note that the value returned by contentBorderThicknessForEdge // includes the title bar height; subtract it. const int contentBorderThickness = [m_view.window contentBorderThicknessForEdge:NSMaxYEdge]; diff --git a/src/plugins/platforms/cocoa/qmacclipboard.mm b/src/plugins/platforms/cocoa/qmacclipboard.mm index 35eaa8e328..23c8749b5d 100644 --- a/src/plugins/platforms/cocoa/qmacclipboard.mm +++ b/src/plugins/platforms/cocoa/qmacclipboard.mm @@ -191,7 +191,7 @@ OSStatus QMacPasteboard::promiseKeeper(PasteboardRef paste, PasteboardItemID id, if (!promise.itemId) { // There was no promise that could deliver data for the - // given id and flavor. This should not happend. + // given id and flavor. This should not happen. qDebug("Pasteboard: %d: Request for %ld, %s, but no promise found!", __LINE__, promise_id, qPrintable(flavorAsQString)); return cantGetFlavorErr; } diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 453ef9a0cd..d3f1a211de 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -322,7 +322,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSViewMouseMoveHelper); // the QWindow. The latter means that the QWindow should have keyboard // focus. But those two are not necessarily the same; A tool window could e.g be // rendered as Active while the parent window, which is also Active, has - // input focus. But we currently don't distiguish between that cleanly in Qt. + // input focus. But we currently don't distinguish between that cleanly in Qt. // Since we don't want a QWindow to be rendered as Active when the NSWindow // it belongs to is not key, we skip calling handleWindowActivated when // that is the case. Instead, we wait for the window to become key, and handle diff --git a/src/plugins/platforms/cocoa/qnsview_keys.mm b/src/plugins/platforms/cocoa/qnsview_keys.mm index a9a27ebc8a..a1d5e6d382 100644 --- a/src/plugins/platforms/cocoa/qnsview_keys.mm +++ b/src/plugins/platforms/cocoa/qnsview_keys.mm @@ -154,7 +154,7 @@ const bool keyUpAccepted = [self handleKeyEvent:nsevent]; // Propagate the keyUp if neither Qt accepted it nor the corresponding KeyDown was - // accepted. Qt text controls wil often not use and ignore keyUp events, but we + // accepted. Qt text controls will often not use and ignore keyUp events, but we // want to avoid propagating unmatched keyUps. const bool keyDownAccepted = m_acceptedKeyDowns.remove(nsevent.keyCode); if (!keyUpAccepted && !keyDownAccepted) |