From 9d2cc4dd766ca6538e17040b6ac845ed880ab0fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Fri, 10 Jun 2022 17:34:41 +0200 Subject: Fix typos in docs and comments Found by codespell Pick-to: 6.4 Change-Id: Ie3e301a23830c773a2e9aff487c702a223d246eb Reviewed-by: Nicholas Bennett Reviewed-by: Edward Welbourne --- src/plugins/platforms/cocoa/qmultitouch_mac.mm | 2 +- .../optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm | 2 +- src/plugins/platforms/ios/qiosdocumentpickercontroller.mm | 2 +- src/plugins/platforms/ios/qiostextinputoverlay.mm | 8 ++++---- src/plugins/platforms/ios/qiostextresponder.mm | 2 +- src/plugins/platforms/ios/qiosviewcontroller.mm | 4 ++-- src/plugins/platforms/ios/qioswindow.mm | 4 ++-- src/plugins/platforms/wasm/qwasmcompositor.cpp | 2 +- src/plugins/platforms/wasm/qwasmintegration.cpp | 2 +- src/plugins/platforms/wasm/qwasmscreen.cpp | 4 ++-- src/plugins/platforms/windows/qwindowswindow.cpp | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/cocoa/qmultitouch_mac.mm b/src/plugins/platforms/cocoa/qmultitouch_mac.mm index 40683bbaf8..73d103c5e3 100644 --- a/src/plugins/platforms/cocoa/qmultitouch_mac.mm +++ b/src/plugins/platforms/cocoa/qmultitouch_mac.mm @@ -145,7 +145,7 @@ QCocoaTouch::getCurrentTouchPointList(NSEvent *event, bool acceptSingleTouch) // Next: sadly, we need to check that our touch hash is in // sync with cocoa. This is typically not the case after a system - // gesture happend (like a four-finger-swipe to show expose). + // gesture happened (like a four-finger-swipe to show expose). if (_touchCount != _currentTouches.size()) { // Remove all instances, and basically start from scratch: diff --git a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm index 3f29c26cc4..0ca911f68b 100644 --- a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm +++ b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm @@ -188,7 +188,7 @@ public: // We can only load images from the asset library async. And this might take time, since it // involves showing the authorization dialog. But the QFile API is synchronuous, so we need to - // wait until we have access to the data. [ALAssetLibrary assetForUrl:] will shedule a block on + // wait until we have access to the data. [ALAssetLibrary assetForUrl:] will schedule a block on // the current thread. But instead of spinning the event loop to force the block to execute, we // wrap the call inside a synchronuous dispatch queue so that it executes on another thread. dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); diff --git a/src/plugins/platforms/ios/qiosdocumentpickercontroller.mm b/src/plugins/platforms/ios/qiosdocumentpickercontroller.mm index 544d9b9b88..6421895624 100644 --- a/src/plugins/platforms/ios/qiosdocumentpickercontroller.mm +++ b/src/plugins/platforms/ios/qiosdocumentpickercontroller.mm @@ -71,7 +71,7 @@ // "Called on the delegate when the user has taken action to dismiss the // presentation successfully, after all animations are finished. - // This is not called if the presentation is dismissed programatically." + // This is not called if the presentation is dismissed programmatically." // So if document picker's view was dismissed, for example by swiping it away, // we got this method called. But not if the dialog was cancelled or a file diff --git a/src/plugins/platforms/ios/qiostextinputoverlay.mm b/src/plugins/platforms/ios/qiostextinputoverlay.mm index f0e88d417a..512ab77bd2 100644 --- a/src/plugins/platforms/ios/qiostextinputoverlay.mm +++ b/src/plugins/platforms/ios/qiostextinputoverlay.mm @@ -51,7 +51,7 @@ static void executeBlockWithoutAnimation(Block block) // ------------------------------------------------------------------------- /** QIOSEditMenu is just a wrapper class around UIMenuController to - ease showing and hiding it correcly. + ease showing and hiding it correctly. */ @interface QIOSEditMenu : NSObject @property (nonatomic, assign) BOOL visible; @@ -792,7 +792,7 @@ static void executeBlockWithoutAnimation(Block block) SelectionPair selection = querySelection(); int touchTextPos = QPlatformInputContext::queryFocusObject(Qt::ImCursorPosition, touchPoint).toInt(); - // Ensure that the handels cannot be dragged past each other + // Ensure that the handles cannot be dragged past each other if (_dragOnCursor) selection.second = (touchTextPos > selection.first) ? touchTextPos : selection.first + 1; else @@ -920,7 +920,7 @@ static void executeBlockWithoutAnimation(Block block) // But note, we only want to hide the menu, and not clear the selection. // Only when the user taps inside the input area do we want to clear the // selection as well. This is different from native behavior, but done so - // deliberatly for cross-platform consistency. This will let the user click on + // deliberately for cross-platform consistency. This will let the user click on // e.g "Bold" and "Italic" buttons elsewhere in the UI to modify the selected text. return; } @@ -933,7 +933,7 @@ static void executeBlockWithoutAnimation(Block block) } // When no menu is showing, and the touch is inside the input - // area, we check if we should show it. We wan't to do so if + // area, we check if we should show it. We want to do so if // the tap doesn't result in the cursor changing position. _cursorPosOnPress = QInputMethod::queryFocusObject(Qt::ImCursorPosition, QVariant()).toInt(); } diff --git a/src/plugins/platforms/ios/qiostextresponder.mm b/src/plugins/platforms/ios/qiostextresponder.mm index 8e2043af86..8069ddb601 100644 --- a/src/plugins/platforms/ios/qiostextresponder.mm +++ b/src/plugins/platforms/ios/qiostextresponder.mm @@ -111,7 +111,7 @@ // By keeping the responder (QIOSTextInputResponder in this case) // retained, we ensure that all messages sent to the view during -// its lifetime in a window hierarcy will be able to traverse the +// its lifetime in a window hierarchy will be able to traverse the // responder chain. - (void)willMoveToWindow:(UIWindow *)window { diff --git a/src/plugins/platforms/ios/qiosviewcontroller.mm b/src/plugins/platforms/ios/qiosviewcontroller.mm index 668e077803..c4e8968232 100644 --- a/src/plugins/platforms/ios/qiosviewcontroller.mm +++ b/src/plugins/platforms/ios/qiosviewcontroller.mm @@ -205,7 +205,7 @@ { // The initial frame computed during startup may happen before the view has // a window, meaning our calculations above will be wrong. We ensure that the - // frame is set correctly once we have a window to base our calulations on. + // frame is set correctly once we have a window to base our calculations on. [self setFrame:self.window.bounds]; } @@ -405,7 +405,7 @@ // Prevent recursion caused by updating the status bar appearance (position // or visibility), which in turn may cause a layout of our subviews, and // a reset of window-states, which themselves affect the view controller - // properties such as the statusbar visibilty. + // properties such as the statusbar visibility. if (m_updatingProperties) return; diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm index 7d904d7642..240a2d9915 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -68,7 +68,7 @@ QIOSWindow::~QIOSWindow() // According to the UIResponder documentation, Cocoa Touch should react to system interruptions // that "might cause the view to be removed from the window" by sending touchesCancelled, but in // practice this doesn't seem to happen when removing the view from its superview. To ensure that - // Qt's internal state for touch and mouse handling is kept consistent, we therefor have to force + // Qt's internal state for touch and mouse handling is kept consistent, we therefore have to force // cancellation of all touch events. [m_view touchesCancelled:[NSSet set] withEvent:0]; @@ -259,7 +259,7 @@ void QIOSWindow::requestActivateWindow() { // Note that several windows can be active at the same time if they exist in the same // hierarchy (transient children). But only one window can be QGuiApplication::focusWindow(). - // Dispite the name, 'requestActivateWindow' means raise and transfer focus to the window: + // Despite the name, 'requestActivateWindow' means raise and transfer focus to the window: if (blockedByModal()) return; diff --git a/src/plugins/platforms/wasm/qwasmcompositor.cpp b/src/plugins/platforms/wasm/qwasmcompositor.cpp index 9fc4dedb9b..014a719a25 100644 --- a/src/plugins/platforms/wasm/qwasmcompositor.cpp +++ b/src/plugins/platforms/wasm/qwasmcompositor.cpp @@ -422,7 +422,7 @@ void QWasmCompositor::requestUpdateWindow(QWasmWindow *window, UpdateRequestDeli requestUpdate(); } -// Requests an upate/new frame using RequestAnimationFrame +// Requests an update/new frame using RequestAnimationFrame void QWasmCompositor::requestUpdate() { if (m_requestAnimationFrameId != -1) diff --git a/src/plugins/platforms/wasm/qwasmintegration.cpp b/src/plugins/platforms/wasm/qwasmintegration.cpp index 32f2fefb9a..76c751064d 100644 --- a/src/plugins/platforms/wasm/qwasmintegration.cpp +++ b/src/plugins/platforms/wasm/qwasmintegration.cpp @@ -119,7 +119,7 @@ QWasmIntegration::QWasmIntegration() } } else if (!qtCanvasElements.isUndefined()) { qWarning() << "The qtCanvaseElements property is deprecated. Qt will stop reading" - << "it in some future veresion, please use qtContainerElements instead"; + << "it in some future version, please use qtContainerElements instead"; emscripten::val length = qtCanvasElements["length"]; int count = length.as(); for (int i = 0; i < count; ++i) diff --git a/src/plugins/platforms/wasm/qwasmscreen.cpp b/src/plugins/platforms/wasm/qwasmscreen.cpp index f2d600dcb0..15f2fa69cc 100644 --- a/src/plugins/platforms/wasm/qwasmscreen.cpp +++ b/src/plugins/platforms/wasm/qwasmscreen.cpp @@ -173,7 +173,7 @@ bool QWasmScreen::hasSpecialHtmlTargets() const { static bool gotIt = []{ // specialHTMLTargets is a JavaScript Array if available. Note that it is - // an abort() function if not, so a simple isUndefined() test wont't work here. + // an abort() function if not, so a simple isUndefined() test won't work here. return emscripten::val::module_property("specialHTMLTargets") ["constructor"]["name"].as() == std::string("Array"); }(); @@ -286,7 +286,7 @@ void QWasmScreen::updateQScreenAndCanvasRenderSize() m_canvas.set("width", canvasSize.width()); m_canvas.set("height", canvasSize.height()); - // Returns the html elments document/body position + // Returns the html elements document/body position auto getElementBodyPosition = [](const emscripten::val &element) -> QPoint { emscripten::val bodyRect = element["ownerDocument"]["body"].call("getBoundingClientRect"); emscripten::val canvasRect = element.call("getBoundingClientRect"); diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index db51d4fbae..61d512a33f 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1440,7 +1440,7 @@ void QWindowCreationContext::applyToMinMaxInfo(MINMAXINFO *mmi) const \list \li Raster type: handleWmPaint() is implemented to to bitblt the image. The DC can be accessed - via getDC/Relase DC, which has a special handling + via getDC/releaseDC, which has special handling when within a paint event (in that case, the DC obtained from BeginPaint() is returned). -- cgit v1.2.3