qcocoa: Fix typos in source code comments
Pick-to: 6.2 5.15 Change-Id: Ide20e1d133891890a7673c8403ea91b489baa8f6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
9bf555e3c8
commit
93f808b781
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.)
|
||||
|
@ -324,7 +324,7 @@ void QCocoaMenu::syncSeparatorsCollapsible(bool enable)
|
||||
if (!item->isSeparator())
|
||||
continue;
|
||||
|
||||
// sync the visiblity directly
|
||||
// sync the visibility directly
|
||||
item->sync();
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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];
|
||||
}
|
||||
|
@ -281,8 +281,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;
|
||||
|
@ -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];
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user