summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-06-10 17:34:41 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-06-15 19:49:40 +0000
commitf837925c570b4930f1c70f974bd2b7bb06aa21fb (patch)
tree17f52b9b005546a444211c44a17848957c52fafe /src/corelib
parentf3e7d0fb3047141436fd67e9195f908dc9771df6 (diff)
Fix typos in docs and comments
Found by codespell Change-Id: Ie3e301a23830c773a2e9aff487c702a223d246eb Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 9d2cc4dd766ca6538e17040b6ac845ed880ab0fe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qfilesystemengine_win.cpp4
-rw-r--r--src/corelib/kernel/qeventdispatcher_wasm.cpp6
-rw-r--r--src/corelib/kernel/qmath.qdoc2
-rw-r--r--src/corelib/platform/wasm/qstdweb.cpp4
-rw-r--r--src/corelib/serialization/qxmlstream.g2
-rw-r--r--src/corelib/thread/qfuture_impl.h4
-rw-r--r--src/corelib/thread/qfutureinterface.cpp2
-rw-r--r--src/corelib/thread/qreadwritelock_p.h2
-rw-r--r--src/corelib/thread/qsemaphore.cpp2
-rw-r--r--src/corelib/time/qlocaltime.cpp2
10 files changed, 15 insertions, 15 deletions
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index 91d672b52d..a04878ca3b 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -565,7 +565,7 @@ QNativeFilePermissions::QNativeFilePermissions(std::optional<QFileDevice::Permis
Return pointer to a \c SECURITY_ATTRIBUTES object describing the permissions.
The returned pointer many be null if default permissions were requested or
- during bootstrap. The calles must call \c isOk() to check if the object
+ during bootstrap. The callers must call \c isOk() to check if the object
was successfully constructed before using this method.
*/
SECURITY_ATTRIBUTES *QNativeFilePermissions::securityAttributes()
@@ -1157,7 +1157,7 @@ bool QFileSystemEngine::fillPermissions(const QFileSystemEntry &entry, QFileSyst
// Check for generic permissions and file-specific bits that most closely
// represent POSIX permissions.
- // Contants like FILE_GENERIC_{READ,WRITE,EXECUTE} cannot be used
+ // Constants like FILE_GENERIC_{READ,WRITE,EXECUTE} cannot be used
// here because they contain permission bits shared between all of them.
if (accessMask & (GENERIC_READ | FILE_READ_DATA))
data.entryFlags |= readFlags;
diff --git a/src/corelib/kernel/qeventdispatcher_wasm.cpp b/src/corelib/kernel/qeventdispatcher_wasm.cpp
index 9cff1eb723..c733f46c14 100644
--- a/src/corelib/kernel/qeventdispatcher_wasm.cpp
+++ b/src/corelib/kernel/qeventdispatcher_wasm.cpp
@@ -613,7 +613,7 @@ void QEventDispatcherWasm::socketError(int socket, int err, const char* msg, voi
// Emscripten makes socket callbacks while the main thread is busy-waiting for a mutex,
// which can cause deadlocks if the callback code also tries to lock the same mutex.
// This is most easily reproducible by adding print statements, where each print requires
- // taking a mutex lock. Work around this by runnign the callback asynchronously, i.e. by using
+ // taking a mutex lock. Work around this by running the callback asynchronously, i.e. by using
// a native zero-timer, to make sure the main thread stack is completely unwond before calling
// the Qt handler.
// It is currently unclear if this problem is caused by code in Qt or in Emscripten, or
@@ -702,7 +702,7 @@ void QEventDispatcherWasm::setSocketState(int socket, bool setReadyRead, bool se
state.readyRead |= setReadyRead;
state.readyWrite |= setReadyWrite;
- // Wake any waiters for the given readyness. The waiter consumes
+ // Wake any waiters for the given readiness. The waiter consumes
// the ready state, returning the socket to not-ready.
if (QEventDispatcherWasm *waiter = state.waiter)
if ((state.readyRead && state.waitForReadyRead) || (state.readyWrite && state.waitForReadyWrite))
@@ -828,7 +828,7 @@ void QEventDispatcherWasm::runOnMainThread(std::function<void(void)> fn)
fn();
}
-// Runs a function on the main thread. The function alwas runs asynchronously,
+// Runs a function on the main thread. The function always runs asynchronously,
// also if the calling thread is the main thread.
void QEventDispatcherWasm::runOnMainThreadAsync(std::function<void(void)> fn)
{
diff --git a/src/corelib/kernel/qmath.qdoc b/src/corelib/kernel/qmath.qdoc
index 8f704148a0..c15a20d94f 100644
--- a/src/corelib/kernel/qmath.qdoc
+++ b/src/corelib/kernel/qmath.qdoc
@@ -170,7 +170,7 @@
This is as for the two-argument and three-argument forms, supported by
std::hypot(), but with as many numeric parameters as you care to pass to
- it. Uses \a first and each of the \a rest as co-ordinates, performing a
+ it. Uses \a first and each of the \a rest as coordinates, performing a
calculation equivalent to squaring each, summing and returning the square
root, save that underflow and overflow are avoided as far as possible.
diff --git a/src/corelib/platform/wasm/qstdweb.cpp b/src/corelib/platform/wasm/qstdweb.cpp
index af9937dcb3..a915c031fe 100644
--- a/src/corelib/platform/wasm/qstdweb.cpp
+++ b/src/corelib/platform/wasm/qstdweb.cpp
@@ -252,13 +252,13 @@ void Uint8Array::set(const Uint8Array &source)
m_uint8Array.call<void>("set", source.m_uint8Array); // copies source content
}
-// Copies the Uint8Array conent to a destination on the heap
+// Copies the Uint8Array content to a destination on the heap
void Uint8Array::copyTo(char *destination) const
{
Uint8Array(destination, length()).set(*this);
}
-// Copies the Uint8Array conent to a destination on the heap
+// Copies the Uint8Array content to a destination on the heap
void Uint8Array::copy(char *destination, const Uint8Array &source)
{
Uint8Array(destination, source.length()).set(source);
diff --git a/src/corelib/serialization/qxmlstream.g b/src/corelib/serialization/qxmlstream.g
index 03cfec9e05..d06c371eb8 100644
--- a/src/corelib/serialization/qxmlstream.g
+++ b/src/corelib/serialization/qxmlstream.g
@@ -52,7 +52,7 @@
%token IMPLIED "IMPLIED"
%token FIXED "FIXED"
--- conent spec
+-- content spec
%token EMPTY "EMPTY"
%token ANY "ANY"
%token PCDATA "PCDATA"
diff --git a/src/corelib/thread/qfuture_impl.h b/src/corelib/thread/qfuture_impl.h
index 3435ea382b..8e96b943ef 100644
--- a/src/corelib/thread/qfuture_impl.h
+++ b/src/corelib/thread/qfuture_impl.h
@@ -423,7 +423,7 @@ void Continuation<Function, ResultType, ParentResultType>::runFunction()
fulfillPromiseWithResult();
} else {
// This assert normally should never fail, this is to make sure
- // that nothing unexpected happend.
+ // that nothing unexpected happened.
static_assert(std::is_invocable_v<Function, QFuture<ParentResultType>>,
"The continuation is not invocable with the provided arguments");
fulfillPromise(parentFuture);
@@ -438,7 +438,7 @@ void Continuation<Function, ResultType, ParentResultType>::runFunction()
fulfillVoidPromise();
} else {
// This assert normally should never fail, this is to make sure
- // that nothing unexpected happend.
+ // that nothing unexpected happened.
static_assert(std::is_invocable_v<Function, QFuture<ParentResultType>>,
"The continuation is not invocable with the provided arguments");
function(parentFuture);
diff --git a/src/corelib/thread/qfutureinterface.cpp b/src/corelib/thread/qfutureinterface.cpp
index 9f70c3e535..8cdc10a94b 100644
--- a/src/corelib/thread/qfutureinterface.cpp
+++ b/src/corelib/thread/qfutureinterface.cpp
@@ -860,7 +860,7 @@ bool QFutureInterfaceBase::isChainCanceled() const
while (parent) {
// If the future is in Canceled state because it had an exception, we want to
// continue checking the chain of parents for cancellation, otherwise if the exception
- // is handeled inside the chain, it won't be interrupted even though cancellation has
+ // is handled inside the chain, it won't be interrupted even though cancellation has
// been requested.
if ((parent->state.loadRelaxed() & Canceled) && !parent->hasException)
return true;
diff --git a/src/corelib/thread/qreadwritelock_p.h b/src/corelib/thread/qreadwritelock_p.h
index b0f4e1e5f5..e1d42fbbf3 100644
--- a/src/corelib/thread/qreadwritelock_p.h
+++ b/src/corelib/thread/qreadwritelock_p.h
@@ -49,7 +49,7 @@ public:
void release();
static QReadWriteLockPrivate *allocate();
- // Recusive mutex handling
+ // Recursive mutex handling
Qt::HANDLE currentWriter = {};
struct Reader {
diff --git a/src/corelib/thread/qsemaphore.cpp b/src/corelib/thread/qsemaphore.cpp
index 190f56a10e..664085eb2b 100644
--- a/src/corelib/thread/qsemaphore.cpp
+++ b/src/corelib/thread/qsemaphore.cpp
@@ -484,7 +484,7 @@ bool QSemaphore::tryAcquire(int n, int timeout)
It is equivalent to calling \c{tryAcquire(1, timeout)}, where the call
times out on the given \a timeout value. The function returns \c true
- on accquiring the resource successfully.
+ on acquiring the resource successfully.
\sa tryAcquire(), try_acquire(), try_acquire_until()
*/
diff --git a/src/corelib/time/qlocaltime.cpp b/src/corelib/time/qlocaltime.cpp
index 70a63d132e..e9721f5c8b 100644
--- a/src/corelib/time/qlocaltime.cpp
+++ b/src/corelib/time/qlocaltime.cpp
@@ -249,7 +249,7 @@ int getCurrentStandardUtcOffset()
#else
qTzSet();
const time_t curr = time(nullptr);
- /* Set t to the UTC represntation of curr; the time whose local standard
+ /* Set t to the UTC representation of curr; the time whose local standard
time representation coincides with that differs from curr by local time's
standard offset. Note that gmtime() leaves the tm_isdst flag set to 0,
so mktime() will, even if local time is currently using DST, return the