From 93f808b781ea3a5d6a2d756a3361d36858830238 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 11 Oct 2021 19:14:08 +0200 Subject: qcocoa: Fix typos in source code comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pick-to: 6.2 5.15 Change-Id: Ide20e1d133891890a7673c8403ea91b489baa8f6 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm | 2 +- src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm | 2 +- src/plugins/platforms/cocoa/qcocoaintegration.mm | 2 +- src/plugins/platforms/cocoa/qcocoamenu.mm | 2 +- src/plugins/platforms/cocoa/qcocoamenubar.mm | 2 +- src/plugins/platforms/cocoa/qcocoatheme.mm | 2 +- src/plugins/platforms/cocoa/qcocoawindow.h | 4 ++-- src/plugins/platforms/cocoa/qcocoawindow.mm | 8 ++++---- src/plugins/platforms/cocoa/qmacclipboard.mm | 2 +- src/plugins/platforms/cocoa/qnsview.mm | 2 +- 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 c32b8d9c30..8b346fa89f 100644 --- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm @@ -359,7 +359,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 b5d9d48a8a..b8954509b9 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 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 1aa65c6611..0c82d5b653 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.h +++ b/src/plugins/platforms/cocoa/qcocoawindow.h @@ -281,8 +281,8 @@ public: // for QNSView return upper < right.upper; } }; - QHash m_contentBorderAreas; // identifer -> uppper/lower - QHash m_enabledContentBorderAreas; // identifer -> enabled state (true/false) + QHash m_contentBorderAreas; // identifier -> uppper/lower + QHash 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 d5d0797fa5..991a5879db 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -246,7 +246,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()) { @@ -1115,7 +1115,7 @@ NSWindow *QCocoaWindow::nativeWindow() const void QCocoaWindow::setEmbeddedInForeignView() { - // Release any previosly created NSWindow. + // Release any previously created NSWindow. [m_nsWindow closeAndRelease]; m_nsWindow = 0; } @@ -1795,7 +1795,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)) @@ -1846,7 +1846,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 2edbf67b6f..96ab7ab168 100644 --- a/src/plugins/platforms/cocoa/qnsview_keys.mm +++ b/src/plugins/platforms/cocoa/qnsview_keys.mm @@ -148,7 +148,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) -- cgit v1.2.3