corelib: Fix typos in documentation

Pick-to: 5.15 6.2
Change-Id: I64d63af708bc6ddaabd12450eb3089e5077f849e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Jonas Kvinge 2021-10-09 14:52:31 +02:00
parent 231fec7ca2
commit 18e1711f7a
38 changed files with 55 additions and 55 deletions

View File

@ -539,7 +539,7 @@
If you do not use Q_DECLARE_TYPEINFO,
Qt will use
\l {https://en.cppreference.com/w/cpp/types/is_trivial} {std::is_trivial_v<T>}
to indentify primitive
to identify primitive
types and it will require both
\l {https://en.cppreference.com/w/cpp/types/is_trivially_copyable} {std::is_trivially_copyable_v<T>}
and

View File

@ -191,7 +191,7 @@
}
\endcode
All the common rules and recomendations regarding writing to bindable
All the common rules and recommendations regarding writing to bindable
properties also apply here. As soon as the base class implementation is
called, all the observers are notified about the change to the property.
This means that class invariants must be met before calling the base

View File

@ -518,7 +518,7 @@
\li \c QVariant::isNull() now only returns \c true if the \c QVariant is empty or contains a
\c nullptr. In Qt 5, it also returned true for classes in qtbase which had an \c isNull method
themselves if that one returned true. Code relying on the old behavior needs to check whether
the contained value returs isNull however such code is unlikely to occur in practice, as
the contained value returns isNull however such code is unlikely to occur in practice, as
\c isNull() is rarely the property one is interested in (compare \c QString::isEmpty() / \c isNull()
and \c QTime::isValid / \c isNull).

View File

@ -583,7 +583,7 @@ static_assert(sizeof(qint64) == 8, "Internal error, qint64 is misdefined");
\relates QFlags
Calculates the hash for the flags \a flags, using \a seed
to seed the calcualtion.
to seed the calculation.
*/
/*!
@ -4194,7 +4194,7 @@ bool qunsetenv(const char *varName)
Qt will try to detect the class of a type using
\l {https://en.cppreference.com/w/cpp/types/is_trivial} {std::is_trivial_v<T>}
to indentify primitive
to identify primitive
types and it will require both
\l {https://en.cppreference.com/w/cpp/types/is_trivially_copyable} {std::is_trivially_copyable_v<T>}
and

View File

@ -671,7 +671,7 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel
position in the deterministic sequence as the \a other object was. Both
objects will generate the same sequence from this point on.
For that reason, it is not adviseable to create a copy of
For that reason, it is not advisable to create a copy of
QRandomGenerator::global(). If one needs an exclusive deterministic
generator, consider instead using securelySeeded() to obtain a new object
that shares no relationship with the QRandomGenerator::global().

View File

@ -1201,7 +1201,7 @@ qint64 QAbstractFileEngine::readLine(char *data, qint64 maxlen)
QIODevice can provide a faster implementation by making use of its
internal buffer. For engines that already provide a fast readLine()
implementation, returning false for this extension can avoid
unnnecessary double-buffering in QIODevice.
unnecessary double-buffering in QIODevice.
\value MapExtension Whether the file engine provides the ability to map
a file to memory.

View File

@ -1204,9 +1204,9 @@ QDir::Filters QDir::filter() const
files that the application can read, write, or execute, and symlinks
to such files/directories can be listed.
To retrieve the permissons for a directory, use the
To retrieve the permissions for a directory, use the
entryInfoList() function to get the associated QFileInfo objects
and then use the QFileInfo::permissons() to obtain the permissions
and then use the QFileInfo::permissions() to obtain the permissions
and ownership for each file.
*/

View File

@ -1311,7 +1311,7 @@ QByteArray QIODevice::readAll()
This function reads a line of ASCII characters from the device, up
to a maximum of \a maxSize - 1 bytes, stores the characters in \a
data, and returns the number of bytes read. If a line could not be
read but no error ocurred, this function returns 0. If an error
read but no error occurred, this function returns 0. If an error
occurs, this function returns the length of what could be read, or
-1 if nothing was read.

View File

@ -208,7 +208,7 @@ void QLoggingSettingsParser::setContent(QTextStream &stream)
/*!
\internal
Parses one line of the configuation file
Parses one line of the configuration file
*/
void QLoggingSettingsParser::parseNextLine(QStringView line)

View File

@ -630,7 +630,7 @@ bool QResource::isValid() const
possible compression algorithm.
If this function returns QResource::ZstdCompression, you need to use the
Zstandard library functios (\c{<zstd.h> header). Qt does not provide a
Zstandard library functions (\c{<zstd.h> header). Qt does not provide a
wrapper.
See \l{http://facebook.github.io/zstd/zstd_manual.html}{Zstandard manual}.

View File

@ -79,7 +79,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn QBasicTimer::QBasicTimer()
Contructs a basic timer.
Constructs a basic timer.
\sa start()
*/

View File

@ -252,7 +252,7 @@ QT_BEGIN_NAMESPACE
\value WindowStateChange The \l{QWindow::windowState()}{window's state} (minimized, maximized or full-screen) has changed (QWindowStateChangeEvent).
\value WindowTitleChange The window title has changed.
\value WindowUnblocked The window is unblocked after a modal dialog exited.
\value WinIdChange The window system identifer for this native widget has changed.
\value WinIdChange The window system identifier for this native widget has changed.
\value ZOrderChange The widget's z-order has changed. This event is never sent to top level windows.
User events should have values between \c User and \c{MaxUser}:
@ -293,7 +293,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
Contructs an event object of type \a type.
Constructs an event object of type \a type.
*/
QEvent::QEvent(Type type)
: t(type), m_reserved(0),

View File

@ -889,7 +889,7 @@ QDeadlineTimer QDeadlineTimer::addNSecs(QDeadlineTimer dt, qint64 nsecs) noexcep
\fn bool QDeadlineTimer::operator!=(QDeadlineTimer d1, QDeadlineTimer d2)
Returns true if the deadline on \a d1 and the deadline in \a d2 are
diferent, false otherwise. The timer type used to create the two deadlines
different, false otherwise. The timer type used to create the two deadlines
is ignored. This function is equivalent to:
\snippet code/src_corelib_kernel_qdeadlinetimer.cpp 9

View File

@ -2150,7 +2150,7 @@ int QMetaMethod::revision() const
Returns whether the method is const qualified.
\note This method might errorneously return \c false for a const method
\note This method might erroneously return \c false for a const method
if it belongs to a library compiled against an older version of Qt.
*/
bool QMetaMethod::isConst() const
@ -3280,7 +3280,7 @@ QVariant QMetaProperty::read(const QObject *object) const
If \a value is not of the same type type as the property, a conversion
is attempted. An empty QVariant() is equivalent to a call to reset()
if this property is resetable, or setting a default-constructed object
if this property is resettable, or setting a default-constructed object
otherwise.
\sa read(), reset(), isWritable()

View File

@ -1621,7 +1621,7 @@ Q_GLOBAL_STATIC(QMetaTypeMutableViewRegistry, customTypesMutableViewRegistry)
Registers a method \a function like To From::function(bool *ok) const as converter from type From
to type To in the meta type system. Returns \c true if the registration succeeded, otherwise false.
The \a ok pointer can be used by the function to indicate whether the conversion succceeded.
The \a ok pointer can be used by the function to indicate whether the conversion succeeded.
\snippet qmetatype/registerConverters.cpp [memberOk]
*/

View File

@ -1479,7 +1479,7 @@ QString QPropertyBindingError::description() const
instance of T and behaves mostly like \l QProperty.
It is one of the classes implementing \l {Qt Bindable Properties}.
Unlike QProperty, it stores its management data structure in
the sourrounding QObject.
the surrounding QObject.
The extra template parameters are used to identify the surrounding
class and a member function of that class acting as a change handler.

View File

@ -311,7 +311,7 @@ private:
Returns a reference to d_ptr, except when d_ptr points to a proxy.
In that case, a reference to proxy->d_ptr is returned instead.
To properly support proxying, direct access to d_ptr only occcurs when
To properly support proxying, direct access to d_ptr only occurs when
- a function actually deals with proxying (e.g.
QPropertyDelayedNotifications::addProperty),
- only the tag value is accessed (e.g. hasBinding) or

View File

@ -1105,7 +1105,7 @@ void QTranslatorPrivate::clear()
If \a n is not -1, it is used to choose an appropriate form for
the translation (e.g. "%n file found" vs. "%n files found").
If you need to programatically insert translations into a
If you need to programmatically insert translations into a
QTranslator, this function can be reimplemented.
\sa load()

View File

@ -145,7 +145,7 @@ QDataStream &operator>>(QDataStream &ds, QCborSimpleType &st)
\value PositiveBignum A positive number of arbitrary length, encoded as a byte array in
network byte order. For example, the number 2\sup{64} is represented by
a byte array containing the byte value 0x01 followed by 8 zero bytes.
\value NegativeBignum A negative number of arbirary length, encoded as the absolute value
\value NegativeBignum A negative number of arbitrary length, encoded as the absolute value
of that number, minus one. For example, a byte array containing
byte value 0x02 followed by 8 zero bytes represents the number
-2\sup{65} - 1.
@ -230,7 +230,7 @@ QDataStream &operator>>(QDataStream &ds, QCborSimpleType &st)
element.
\value UnexpectedBreak The CBOR stream contains a Break where it is not allowed (data is
corrupt and the error is not recoverable).
\value UnknownType The CBOR stream contains an unknown/unparseable Type (data is corrupt
\value UnknownType The CBOR stream contains an unknown/unparsable Type (data is corrupt
and the and the error is not recoverable).
\value IllegalType The CBOR stream contains a known type in a position it is not allowed
to exist (data is corrupt and the error is not recoverable).

View File

@ -1591,7 +1591,7 @@ void QCborMap::detach(qsizetype reserved)
/*!
\fn QCborMap::ConstIterator::value_type QCborMap::ConstIterator::operator*() const
Returns a pair containing the curent item's key and value.
Returns a pair containing the current item's key and value.
\sa key(), value()
*/

View File

@ -830,7 +830,7 @@ QCborStreamReader::QCborStreamReader(const QByteArray &data)
Creates a QCborStreamReader object that will parse the CBOR stream found by
reading from \a device. QCborStreamReader does not take ownership of \a
device, so it must remain valid until this oject is destroyed.
device, so it must remain valid until this object is destroyed.
*/
QCborStreamReader::QCborStreamReader(QIODevice *device)
: d(new QCborStreamReaderPrivate(device))

View File

@ -138,9 +138,9 @@ QT_BEGIN_NAMESPACE
\snippet code/src_corelib_io_qdatastream.cpp 4
You can select which byte order to use when serializing data. The
default setting is big endian (MSB first). Changing it to little
endian breaks the portability (unless the reader also changes to
little endian). We recommend keeping this setting unless you have
default setting is big-endian (MSB first). Changing it to little-endian
breaks the portability (unless the reader also changes to
little-endian). We recommend keeping this setting unless you have
special requirements.
\target raw
@ -500,7 +500,7 @@ void QDataStream::setStatus(Status status)
The \a bo parameter can be QDataStream::BigEndian or
QDataStream::LittleEndian.
The default setting is big endian. We recommend leaving this
The default setting is big-endian. We recommend leaving this
setting unless you have special requirements.
\sa byteOrder()

View File

@ -3199,7 +3199,7 @@ void QXmlStreamWriter::setAutoFormatting(bool enable)
/*!
\since 4.4
Returns \c true if auto formattting is enabled, otherwise \c false.
Returns \c true if auto formatting is enabled, otherwise \c false.
*/
bool QXmlStreamWriter::autoFormatting() const
{

View File

@ -1264,7 +1264,7 @@ QByteArray &QByteArray::operator=(const char *str)
you can use the return value of data() and constData() as arguments to
functions that expect '\\0'-terminated strings. If the QByteArray object was
created from a \l{fromRawData()}{raw data} that didn't include the trailing
'\\0'-termination byte, then QByteArray doesn't add it automaticall unless a
'\\0'-termination byte, then QByteArray doesn't add it automatically unless a
\l{deep copy} is created.
Example:
@ -4083,7 +4083,7 @@ QByteArray &QByteArray::setNum(qulonglong n, int base)
Represent the floating-point number \a n as text.
Sets this byte array to a string representating \a n, with a given \a format
Sets this byte array to a string representing \a n, with a given \a format
and \a precision (with the same meanings as for \l {QString::number(double,
char, int)}), and returns a reference to this byte array.
@ -4101,7 +4101,7 @@ QByteArray &QByteArray::setNum(double n, char format, int precision)
Represent the floating-point number \a n as text.
Sets this byte array to a string representating \a n, with a given \a format
Sets this byte array to a string representing \a n, with a given \a format
and \a precision (with the same meanings as for \l {QString::number(double,
char, int)}), and returns a reference to this byte array.
@ -4111,7 +4111,7 @@ QByteArray &QByteArray::setNum(double n, char format, int precision)
/*!
Returns a byte-array representing the whole number \a n as text.
Returns a byte array containing a string representating \a n, using the
Returns a byte array containing a string representing \a n, using the
specified \a base (ten by default). Bases 2 through 36 are supported, using
letters for digits beyond 9: A is ten, B is eleven and so on.

View File

@ -1125,7 +1125,7 @@
\value MeasurementSystem a QLocale::MeasurementSystem enum specifying the measurement system
\value AMText a string that represents the system AM designator associated with a 12-hour clock.
\value PMText a string that represents the system PM designator associated with a 12-hour clock.
\value FirstDayOfWeek a Qt::DayOfWeek enum specifiying the first day of the week
\value FirstDayOfWeek a Qt::DayOfWeek enum specifying the first day of the week
\value CurrencySymbol a string that represents a currency in a format QLocale::CurrencyFormat.
\value CurrencyToString a localized string representation of a number with a currency symbol. Converts a QSystemLocale::CurrencyToStringArgument stored in the in variant to a QString.
\value UILanguages a list of strings representing locale names that could be used for UI translation.

View File

@ -1628,13 +1628,13 @@ static qsizetype toLatin1Len(qsizetype l) { return l + 1; }
\value Utf16 Create a converter to or from UTF-16. When decoding, the byte order will get automatically
detected by a leading byte order mark. If none exists or when encoding, the system byte order will
be assumed.
\value Utf16BE Create a converter to or from big endian UTF-16.
\value Utf16LE Create a converter to or from litte endian UTF-16.
\value Utf16BE Create a converter to or from big-endian UTF-16.
\value Utf16LE Create a converter to or from little-endian UTF-16.
\value Utf32 Create a converter to or from UTF-32. When decoding, the byte order will get automatically
detected by a leading byte order mark. If none exists or when encoding, the system byte order will
be assumed.
\value Utf32BE Create a converter to or from big endian UTF-32.
\value Utf32LE Create a converter to or from litte endian UTF-32.
\value Utf32BE Create a converter to or from big-endian UTF-32.
\value Utf32LE Create a converter to or from little-endian UTF-32.
\value Latin1 Create a converter to or from ISO-8859-1 (Latin1).
\value System Create a converter to or from the underlying encoding of the
operating systems locale. This is always assumed to be UTF-8 for Unix based

View File

@ -99,7 +99,7 @@
If \c testFuture gets canceled, its state is propagated to the next then(),
which will be also canceled. So in this case \c {Block 6} will be called.
QFuture also offers ways to interact with a runnning computation. For
QFuture also offers ways to interact with a running computation. For
instance, the computation can be canceled with the cancel() function. To
suspend or resume the computation, use the setSuspended() function or one of
the suspend(), resume(), or toggleSuspended() convenience functions. Be aware
@ -173,8 +173,8 @@
/*! \fn template <typename T> void QFuture<T>::cancel()
Cancels the asynchronous computation represented by this future. Note that
the cancelation is asynchronous. Use waitForFinished() after calling
cancel() when you need synchronous cancelation.
the cancellation is asynchronous. Use waitForFinished() after calling
cancel() when you need synchronous cancellation.
Results currently available may still be accessed on a canceled future,
but new results will \e not become available after calling this function.

View File

@ -114,8 +114,8 @@ QFutureWatcherBase::QFutureWatcherBase(QObject *parent)
/*! \fn template <typename T> void QFutureWatcher<T>::cancel()
Cancels the asynchronous computation represented by the future(). Note that
the cancelation is asynchronous. Use waitForFinished() after calling
cancel() when you need synchronous cancelation.
the cancellation is asynchronous. Use waitForFinished() after calling
cancel() when you need synchronous cancellation.
Currently available results may still be accessed on a canceled QFuture,
but new results will \e not become available after calling this function.

View File

@ -622,7 +622,7 @@ bool QSemaphore::tryAcquire(int n, int timeout)
/*!
\fn QSemaphoreReleaser::swap(QSemaphoreReleaser &other)
Exchanges the responsibilites of \c{*this} and \a other.
Exchanges the responsibilities of \c{*this} and \a other.
Unlike move assignment, neither of the two objects ever releases its
semaphore, if any, as a consequence of swapping.

View File

@ -253,7 +253,7 @@ QThreadPrivate::~QThreadPrivate()
\section1 Managing Threads
QThread will notifiy you via a signal when the thread is
QThread will notify you via a signal when the thread is
started() and finished(), or you can use isFinished() and
isRunning() to query the state of the thread.

View File

@ -427,7 +427,7 @@ void QThreadPoolPrivate::stealAndRunRunnable(QRunnable *runnable)
\ingroup thread
QThreadPool manages and recyles individual QThread objects to help reduce
QThreadPool manages and recycles individual QThread objects to help reduce
thread creation costs in programs that use threads. Each Qt application
has one global QThreadPool object, which can be accessed by calling
globalInstance().

View File

@ -225,7 +225,7 @@ void QThreadStorageData::finish(void **p)
The hasLocalData() function allows the programmer to determine if
data has previously been set using the setLocalData() function.
This is also useful for lazy initializiation.
This is also useful for lazy initialization.
If T is a pointer type, QThreadStorage takes ownership of the data
(which must be created on the heap with \c new) and deletes it when

View File

@ -498,7 +498,7 @@ Q_GLOBAL_STATIC(QtPrivate::QCalendarRegistry, calendarRegistry);
\section1 Instantiating backends
Backends may be defined by third-party, plugin or user code. When such
custom backends are registered they shall be alloced a unique ID, by
custom backends are registered they shall be allocated a unique ID, by
which client code may access it. A custom backend instance can have no names
if access by name is not needed, or impractical (e.g. because the backend
is not a singleton and constructing names for each instance would not make

View File

@ -4483,7 +4483,7 @@ QDateTime QDateTime::addSecs(qint64 s) const
}
/*!
Returns a QDateTime object containing a datetime \a msecs miliseconds
Returns a QDateTime object containing a datetime \a msecs milliseconds
later than the datetime of this object (or earlier if \a msecs is
negative).

View File

@ -1357,7 +1357,7 @@ QList<QPointF> static inline tcbToBezier(const TCBPoints &tcbPoints)
/*!
Adds a segment of a TCB bezier spline to define a custom easing curve.
It is only applicable if type() is QEasingCurve::TCBSpline.
The spline has to start explitly at (0.0, 0.0) and has to end at (1.0, 1.0) to
The spline has to start explicitly at (0.0, 0.0) and has to end at (1.0, 1.0) to
be a valid easing curve.
The tension \a t changes the length of the tangent vector.
The continuity \a c changes the sharpness in change between the tangents.

View File

@ -780,7 +780,7 @@
Example:
\snippet code/src_corelib_tools_qlist.cpp emplace
\note It is garanteed that the element will be created in place
\note It is guaranteed that the element will be created in place
at the beginning, but after that it might be copied or
moved to the right position.

View File

@ -669,7 +669,7 @@
from the map, and returns an iterator to the next item in the
map.
\note The iterator \a pos \e must be valid and dereferencable.
\note The iterator \a pos \e must be valid and dereferenceable.
\sa remove()
*/

View File

@ -189,7 +189,7 @@ QList<int> QVersionNumber::segments() const
/*!
\fn int QVersionNumber::segmentAt(int index) const
Returns the segement value at \a index. If the index does not exist,
Returns the segment value at \a index. If the index does not exist,
returns 0.
\sa segments(), segmentCount()