corelib: Fix typos in source code comments

Pick-to: 6.2
Change-Id: Ic78afb67143112468c6f84677ac88f27a74b53aa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Jonas Kvinge 2021-10-09 15:06:03 +02:00
parent 651d7debe1
commit 231fec7ca2
50 changed files with 67 additions and 67 deletions

View File

@ -297,7 +297,7 @@ set_target_properties(Core PROPERTIES INTERFACE_QT_COORD_TYPE "${QT_COORD_TYPE}"
set_property(TARGET Core APPEND PROPERTY COMPATIBLE_INTERFACE_STRING QT_COORD_TYPE)
# Handle qtConfig(thread): CONFIG += thread like in qt.prf.
# Aka if the feature is enabled, publically link against the threading library.
# Aka if the feature is enabled, publicly link against the threading library.
# This also ensures the link flag is in the .prl file.
if(QT_FEATURE_thread)
target_link_libraries(Platform INTERFACE Threads::Threads)

View File

@ -24,7 +24,7 @@ function(qt6_android_generate_deployment_settings target)
# _qt_internal_android_format_deployment_paths converts sensitive paths to the CMake format
# that is supported by JSON as well. The function should be called as many times as
# qt6_android_generate_deployment_settings, because users may change properties that contain
# paths inbetween the calls.
# paths in between the calls.
_qt_internal_android_format_deployment_paths(${target})
# Avoid calling the function body twice because of 'file(GENERATE'.

View File

@ -1297,7 +1297,7 @@ function(qt6_extract_metatypes target)
set(${arg_OUTPUT_FILES} "${metatypes_file}" PARENT_SCOPE)
endif()
# Chech whether the generated json file needs to be installed.
# Check whether the generated json file needs to be installed.
# Executable metatypes.json files should not be installed. Qt non-prefix builds should also
# not install the files.
set(should_install FALSE)
@ -1606,7 +1606,7 @@ function(__qt_internal_propagate_object_library target object_library)
# All object libraries mark themselves with the _is_qt_propagated_object_library property.
# Using a finalizer approach we walk through the target dependencies and look for libraries
# using the _is_qt_propagated_object_library property. Then, objects of the collected libraries
# are moved to the beginnig of the linker line using target_sources.
# are moved to the beginning of the linker line using target_sources.
#
# Note: target_link_libraries works well with linkers other than ld. If user didn't enforce
# a finalizer we rely on linker to resolve circular dependencies between objects and static
@ -1685,7 +1685,7 @@ function(__qt_internal_propagate_object_library target object_library)
":${objects}>"
)
# target_link_options works well since CMake 3.17 which has policy CMP0099 set to NEW for the
# minimum required CMake version greated than or equal 3.17. The default is OLD. See
# minimum required CMake version greater than or equal to 3.17. The default is OLD. See
# https://cmake.org/cmake/help/git-master/policy/CMP0099.html for details.
# This provides yet another way of linking object libraries if user sets the policy to NEW
# before calling find_package(Qt...).

View File

@ -792,7 +792,7 @@ void QAnimationDriver::advanceAnimation()
/*!
Advances the animation. This function should be continously called
Advances the animation. This function should be continuously called
by the driver while the animation is running.
*/

View File

@ -247,7 +247,7 @@ QAbstractAnimation *QAnimationGroup::takeAnimation(int index)
}
QAbstractAnimation *animation = d->animations.at(index);
QAbstractAnimationPrivate::get(animation)->group = nullptr;
// ### removing from list before doing setParent to avoid inifinite recursion
// ### removing from list before doing setParent to avoid infinite recursion
// in ChildRemoved event
d->animations.removeAt(index);
animation->setParent(nullptr);

View File

@ -122,7 +122,7 @@ public:
private:
Q_DISABLE_COPY(MyClass) // OK - copy constructor and assignment operators
// are now disabled, so the compiler won't implicitely
// are now disabled, so the compiler won't implicitly
// generate them.
};
//! [4]

View File

@ -53,9 +53,9 @@
// may use these definitions in your own code, but be aware that we
// will remove them once Qt depends on the C++ version that supports
// them in namespace std. There will be NO deprecation warning, the
// definitons will JUST go away.
// definitions will JUST go away.
//
// If you can't agree to these terms, don't use these definitons!
// If you can't agree to these terms, don't use these definitions!
//
// We mean it.
//

View File

@ -52,9 +52,9 @@
// may use these definitions in your own code, but be aware that we
// will remove them once Qt depends on the C++ version that supports
// them in namespace std. There will be NO deprecation warning, the
// definitons will JUST go away.
// definitions will JUST go away.
//
// If you can't agree to these terms, don't use these definitons!
// If you can't agree to these terms, don't use these definitions!
//
// We mean it.
//

View File

@ -1,6 +1,6 @@
/* This file is used to generate the Qt configuration info for the Core library.
* The 'qt_generate_qconfig_cpp' cmake routine
* contains variables that replace '@' entires in this file. It's important to
* contains variables that replace '@' entries in this file. It's important to
* align these values with the following:
*
* - QLibraryInfo::LibraryPath enum in qtbase/src/corelib/global/qlibraryinfo.h

View File

@ -127,7 +127,7 @@ inline constexpr quint8 qbswap_helper(quint8 source)
/*
* T qbswap(T source).
* Changes the byte order of a value from big endian to little endian or vice versa.
* Changes the byte order of a value from big-endian to little-endian or vice versa.
* This function can be used if you are not concerned about alignment issues,
* and it is therefore a bit more convenient and in most cases more efficient.
*/
@ -164,7 +164,7 @@ inline double qbswap(double source)
/*
* qbswap(const T src, const void *dest);
* Changes the byte order of \a src from big endian to little endian or vice versa
* Changes the byte order of \a src from big-endian to little-endian or vice versa
* and stores the result in \a dest.
* There is no alignment requirements for \a dest.
*/

View File

@ -1090,7 +1090,7 @@ struct QMessagePattern
QString backtraceSeparator;
int backtraceDepth;
};
QList<BacktraceParams> backtraceArgs; // backtrace argumens in sequence of %{backtrace
QList<BacktraceParams> backtraceArgs; // backtrace arguments in sequence of %{backtrace
#endif
bool fromEnvironment;
@ -1497,7 +1497,7 @@ static QBasicAtomicPointer<void (QtMsgType, const QMessageLogContext &, const QS
// ------------------------ Alternate logging sinks -------------------------
#if defined(QT_BOOTSTRAPPED)
// Boostrapped tools always print to stderr, so no need for alternate sinks
// Bootstrapped tools always print to stderr, so no need for alternate sinks
#else
#if QT_CONFIG(slog2)

View File

@ -231,7 +231,7 @@ static void fallback_fill(quint32 *ptr, qsizetype left) noexcept
static QBasicAtomicInteger<unsigned> seed = Q_BASIC_ATOMIC_INITIALIZER(0U);
static void fallback_update_seed(unsigned value)
{
// Update the seed to be used for the fallback mechansim, if we need to.
// Update the seed to be used for the fallback mechanism, if we need to.
// We can't use QtPrivate::QHashCombine here because that is not an atomic
// operation. A simple XOR will have to do then.
seed.fetchAndXorRelaxed(value);

View File

@ -72,7 +72,7 @@ __declspec(selectany) auto *__wmemchr_symbol_loader_value = wmemchr(L"", L'0', 0
# include <qcoreevent.h>
# include <qiodevice.h>
# include <qlist.h>
# include <qvariant.h> /* All moc genereated code has this include */
# include <qvariant.h> /* All moc generated code has this include */
# include <qobject.h>
# if QT_CONFIG(regularexpression)
# include <qregularexpression.h>

View File

@ -2256,7 +2256,7 @@ QString qt_normalizePathSegments(const QString &name, QDirPrivate::PathNormaliza
if (prefixLength) {
if (!isEmpty && out[used] == '/') {
// Eventhough there is a prefix the out string is a slash. This happens, if the input
// Even though there is a prefix the out string is a slash. This happens, if the input
// string only consists of a prefix followed by one or more slashes. Just skip the slash.
++used;
}

View File

@ -130,11 +130,11 @@ uint QFileInfoPrivate::getFileFlags(QAbstractFileEngine::FileFlags request) cons
Q_ASSERT(fileEngine); // should never be called when using the native FS
// We split the testing into tests for for LinkType, BundleType, PermsMask
// and the rest.
// Tests for file permissions on Windows can be slow, expecially on network
// Tests for file permissions on Windows can be slow, especially on network
// paths and NTFS drives.
// In order to determine if a file is a symlink or not, we have to lstat().
// If we're not interested in that information, we might as well avoid one
// extra syscall. Bundle detecton on Mac can be slow, expecially on network
// extra syscall. Bundle detecton on Mac can be slow, especially on network
// paths, so we separate out that as well.
QAbstractFileEngine::FileFlags req;
@ -1677,7 +1677,7 @@ QDebug operator<<(QDebug dbg, const QFileInfo &fi)
QDirIterator it(dir);
while (it.hasNext()) {
// Implicit conversion from QString (returned by it.next()):
// may create unnecessary data strucutres and cause additional
// may create unnecessary data structures and cause additional
// accesses to the file system. Unless this macro is defined,
// this line does not compile.

View File

@ -214,7 +214,7 @@ qint64 QFSFileEnginePrivate::nativeSize() const
// ### Don't flush; for buffered files, we should get away with ftell.
thatQ->flush();
// Always retrive the current information
// Always retrieve the current information
metaData.clearFlags(QFileSystemMetaData::SizeAttribute);
bool filled = false;
if (fileHandle != INVALID_HANDLE_VALUE && openMode != QIODevice::NotOpen )

View File

@ -395,7 +395,7 @@ static QString qt_create_commandline(const QString &program, const QStringList &
programName = QLatin1Char('\"') + programName + QLatin1Char('\"');
programName.replace(QLatin1Char('/'), QLatin1Char('\\'));
// add the prgram as the first arg ... it works better
// add the program as the first arg ... it works better
args = programName + QLatin1Char(' ');
}

View File

@ -1100,7 +1100,7 @@ QConfFileSettingsPrivate::QConfFileSettingsPrivate(QSettings::Format format,
for (const auto &dir : qAsConst(dirs))
paths.append(dir + QLatin1Char('/') + orgFile);
// Note: No check for existence of files is done intentionaly.
// Note: No check for existence of files is done intentionally.
for (const auto &path : qAsConst(paths))
confFiles.append(QConfFile::fromName(path, false));
} else

View File

@ -108,7 +108,7 @@ static bool isProcessLowIntegrity() {
auto* token_info = reinterpret_cast<TOKEN_MANDATORY_LABEL*>(token_info_buf.data());
DWORD token_info_length = token_info_buf.size();
if (!GetTokenInformation(process_token, TokenIntegrityLevel, token_info, token_info_length, &token_info_length)) {
// grow bufer and retry GetTokenInformation
// grow buffer and retry GetTokenInformation
token_info_buf.resize(token_info_length);
token_info = reinterpret_cast<TOKEN_MANDATORY_LABEL*>(token_info_buf.data());
if (!GetTokenInformation(process_token, TokenIntegrityLevel, token_info, token_info_length, &token_info_length))

View File

@ -198,7 +198,7 @@ QFileSystemEntry::NativePath QTemporaryFileName::generateNext()
Generates a unique file path from the template \a templ and creates a new
file based based on those parameters: the \c templ.length characters in \c
templ.path starting at \c templ.pos will be replacd by a random sequence of
templ.path starting at \c templ.pos will be replaced by a random sequence of
characters. \a mode specifies the file mode bits (not used on Windows).
Returns true on success and sets the file handle on \a file. On error,

View File

@ -3814,7 +3814,7 @@ QUrl QUrl::fromUserInput(const QString &userInput, const QString &workingDirecto
return QUrl::fromLocalFile(fileInfo.absoluteFilePath());
}
// Check first for files, since on Windows drive letters can be interpretted as schemes
// Check first for files, since on Windows drive letters can be interpreted as schemes
if (QDir::isAbsolutePath(trimmedString))
return QUrl::fromLocalFile(trimmedString);
@ -3822,7 +3822,7 @@ QUrl QUrl::fromUserInput(const QString &userInput, const QString &workingDirecto
// Check the most common case of a valid url with a scheme
// We check if the port would be valid by adding the scheme to handle the case host:port
// where the host would be interpretted as the scheme
// where the host would be interpreted as the scheme
if (url.isValid()
&& !url.scheme().isEmpty()
&& urlPrepended.port() == -1)

View File

@ -169,7 +169,7 @@ public:
#ifdef Q_QDOC
private:
// We need to let qdoc think that FormattingOptions is a normal QFlags, but
// it needs to be a QUrlTwoFlags for compiling default arguments of somme functions.
// it needs to be a QUrlTwoFlags for compiling default arguments of some functions.
template<typename T> struct QFlags : QUrlTwoFlags<T, ComponentFormattingOption>
{ using QUrlTwoFlags<T, ComponentFormattingOption>::QUrlTwoFlags; };
public:

View File

@ -533,7 +533,7 @@ private:
} // anonymous namespace
/*
Check CONTEXTJ rules accroding to RFC 5892, appendix A.1 & A.2.
Check CONTEXTJ rules according to RFC 5892, appendix A.1 & A.2.
Rule Set for U+200C (ZWNJ):

View File

@ -212,7 +212,7 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QItemSelectionModel::SelectionFlags)
// We export each out-of-line method invidually to prevent MSVC from
// We export each out-of-line method individually to prevent MSVC from
// exporting the whole QList class.
class QItemSelection : public QList<QItemSelectionRange>
{

View File

@ -171,7 +171,7 @@ void QCFSocketNotifier::registerSocketNotifier(QSocketNotifier *notifier)
CFOptionFlags flags = CFSocketGetSocketFlags(socketInfo->socket);
// QSocketNotifier doesn't close the socket upon destruction/invalidation
flags &= ~kCFSocketCloseOnInvalidate;
// Expicitly disable automatic re-enable, as we do that manually on each runloop pass
// Explicitly disable automatic re-enable, as we do that manually on each runloop pass
flags &= ~(kCFSocketAutomaticallyReenableWriteCallBack | kCFSocketAutomaticallyReenableReadCallBack);
CFSocketSetSocketFlags(socketInfo->socket, flags);

View File

@ -145,7 +145,7 @@ private:
#endif
/*
Helper class that automates refernce counting for CFtypes.
Helper class that automates reference counting for CFtypes.
After constructing the QCFType object, it can be copied like a
value-based type.

View File

@ -281,7 +281,7 @@ bool QEventDispatcherCoreFoundation::processEvents(QEventLoop::ProcessEventsFlag
}
if (m_processEvents.deferredWakeUp) {
// We may be processing events recursivly as a result of processing a posted event,
// We may be processing events recursively as a result of processing a posted event,
// in which case we need to signal the run-loop source so that this iteration of
// processEvents will take care of the newly posted events.
m_postedEventsRunLoopSource.signal();

View File

@ -108,7 +108,7 @@ bool qt_asyncify_suspend()
}
// Wakes any currently suspended main thread. Returns true if the main
// thread was suspended, in which case it will now be asynchonously woken.
// thread was suspended, in which case it will now be asynchronously woken.
bool qt_asyncify_resume()
{
if (!g_is_asyncify_suspended)
@ -456,7 +456,7 @@ void QEventDispatcherWasm::callProcessEvents(void *context)
// In the unlikely event that we get a callProcessEvents() call for
// a previous main thread event dispatcher (i.e. the QApplication
// object was deleted and crated again): just ignore it and return.
// object was deleted and created again): just ignore it and return.
if (context != g_mainThreadEventDispatcher)
return;
@ -534,7 +534,7 @@ void QEventDispatcherWasm::updateNativeTimer()
}
// Static timer activation callback. Must be called on the main thread
// and will then either process timers on the main thrad or wake and
// and will then either process timers on the main thread or wake and
// process timers on a secondary thread.
void QEventDispatcherWasm::callProcessTimers(void *context)
{

View File

@ -141,7 +141,7 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QMetaType ty
if (data.metaType() == type || !data.isValid())
return data;
// provide more conversion possiblities than just what QVariant provides
// provide more conversion possibilities than just what QVariant provides
// URLs can be lists as well...
if ((typeId == QMetaType::QUrl && data.metaType().id() == QMetaType::QVariantList)

View File

@ -766,7 +766,7 @@ void QPropertyObserverPointer::notify(QUntypedPropertyData *propertyDataPtr)
* 1. Before executing any action which might modify the list, we insert a placeholder node after the current node.
* As that one is stack allocated and owned by us, we can rest assured that it is
* still there after the action has executed, and placeHolder->next points to the actual next node in the list.
* Note that taking next at the beginning of the loop does not work, as the execuated action might either move
* Note that taking next at the beginning of the loop does not work, as the executed action might either move
* or delete that node.
* 2. After the triggered action has finished, we can use the next pointer in the placeholder node as a safe way to
* retrieve the next node.

View File

@ -201,7 +201,7 @@ struct BindingFunctionVTable
static_assert (std::is_invocable_r_v<bool, Callable, QMetaType, QUntypedPropertyData *> );
auto untypedEvaluationFunction = static_cast<Callable *>(f);
return std::invoke(*untypedEvaluationFunction, metaType, dataPtr);
} else if constexpr (!std::is_same_v<PropertyType, void>) { // check for void to woraround MSVC issue
} else if constexpr (!std::is_same_v<PropertyType, void>) { // check for void to workaround MSVC issue
Q_UNUSED(metaType);
QPropertyData<PropertyType> *propertyPtr = static_cast<QPropertyData<PropertyType> *>(dataPtr);
// That is allowed by POSIX even if Callable is a function pointer

View File

@ -89,7 +89,7 @@
QT_BEGIN_NAMESPACE
namespace { // annonymous used to hide QVariant handlers
namespace { // anonymous used to hide QVariant handlers
/*!
\internal
@ -292,7 +292,7 @@ static void customClear(QVariant::Private *d)
}
} // annonymous used to hide QVariant handlers
} // anonymous used to hide QVariant handlers
/*!
\class QVariant

View File

@ -548,7 +548,7 @@ private:
// int variant, so delete this constructor:
QVariant(QMetaType::Type) = delete;
// These constructors don't create QVariants of the type associcated
// These constructors don't create QVariants of the type associated
// with the enum, as expected, but they would create a QVariant of
// type int with the value of the enum value.
// Use QVariant v = QColor(Qt::red) instead of QVariant v = Qt::red for

View File

@ -1,6 +1,6 @@
# List of files that need to be packaged as resources.
# This file exists solely because of unit tests that need access to this
# information as well. This was previosly handled by referrencing a qrc
# information as well. This was previously handled by referencing a qrc
# file with the same information
set(corelib_mimetypes_resource_file

View File

@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
namespace qstdweb {
// DOM API in C++, implemented using emscripten val.h and bind.h.
// This is private API and can be extened and changed as needed.
// This is private API and can be extended and changed as needed.
class ArrayBuffer;
class Blob;

View File

@ -1080,7 +1080,7 @@ static int compareElementNoData(const Element &e1, const Element &e2)
// -1 -> INT64_MAX + 1 = INT64_MAX - (-1)
// -2 -> INT64_MAX + 2 = INT64_MAX - (-2)
// INT64_MIN -> UINT64_MAX = INT64_MAX - INT64_MIN
// Note how the unsigned arithmethic is well defined in C++ (it's
// Note how the unsigned arithmetic is well defined in C++ (it's
// always performed modulo 2^64).
auto makeSortable = [](qint64 v) {
quint64 u = quint64(v);

View File

@ -105,7 +105,7 @@ public:
Q_DECLARE_TYPEINFO(QXmlStreamAttribute, Q_RELOCATABLE_TYPE);
// We export each out-of-line method invidually to prevent MSVC from
// We export each out-of-line method individually to prevent MSVC from
// exporting the whole QList class.
class QXmlStreamAttributes : public QList<QXmlStreamAttribute>
{

View File

@ -1568,7 +1568,7 @@ static auto fullConvertCase(char32_t uc, QUnicodeTables::Case which) noexcept
while (length--)
*pp++ = *specialCase++;
} else {
// so far, case convertion never changes planes (guaranteed by the qunicodetables generator)
// so far, case conversion never changes planes (guaranteed by the qunicodetables generator)
for (char16_t c : QChar::fromUcs4(uc + caseDiff))
*pp++ = c;
}

View File

@ -572,7 +572,7 @@ QString qt_readEscapedFormatString(QStringView format, int *idx)
++i;
if (i == format.size())
return QString();
if (format.at(i).unicode() == '\'') { // "''" outside of a quoted stirng
if (format.at(i).unicode() == '\'') { // "''" outside of a quoted string
++i;
return QLatin1String("'");
}

View File

@ -777,8 +777,8 @@ static void qt_to_latin1_internal(uchar *dst, const char16_t *src, qsizetype len
});
# endif
#elif defined(__ARM_NEON__)
// Refer to the documentation of the SSE2 implementation
// this use eactly the same method as for SSE except:
// Refer to the documentation of the SSE2 implementation.
// This uses exactly the same method as for SSE except:
// 1) neon has unsigned comparison
// 2) packing is done to 64 bits (8 x 8bits component).
if (length >= 16) {
@ -8334,7 +8334,7 @@ static int getEscape(const Char *uc, qsizetype *pos, qsizetype len, int maxNumbe
the int contains the numerical number as parsed from the placeholder.
3. Next, collect all the non-negative ints found, sort them in ascending order and
remove duplicates.
3a. If the result has more entires than multiArg() was given replacement strings,
3a. If the result has more entries than multiArg() was given replacement strings,
we have found placeholders we can't satisfy with replacement strings. That is
fine (there could be another .arg() call coming after this one), so just
truncate the result to the number of actual multiArg() replacement strings.

View File

@ -1258,7 +1258,7 @@ static inline Form form(unsigned short uc) {
(Consonant Nukta? Halant)* Consonant Halant
IndependentVowel VowelMark? StressMark?
We return syllable boundaries on invalid combinations aswell
We return syllable boundaries on invalid combinations as well
*/
static qsizetype indic_nextSyllableBoundary(QChar::Script script, const char16_t *s, qsizetype start, qsizetype end, bool *invalid)
{

View File

@ -143,7 +143,7 @@ template <typename BaseClass> struct QGenericAtomicOps
#if 0
// These functions have no default implementation
// Archictectures must implement them
// Architectures must implement them
static inline constexpr bool isTestAndSetNative() noexcept;
static inline constexpr bool isTestAndSetWaitFree() noexcept;
template <typename T, typename X> static inline

View File

@ -505,7 +505,7 @@ bool QReadWriteLockPrivate::lockForWrite(int timeout)
if (elapsed > timeout) {
if (waitingReaders && !waitingWriters && !writerCount) {
// We timed out and now there is no more writers or waiting writers, but some
// readers were queueud (probably because of us). Wake the waiting readers.
// readers were queued (probably because of us). Wake the waiting readers.
readerCond.wakeAll();
}
return false;

View File

@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
ResultStore stores indexed results. Results can be added and retrieved
either individually batched in a QList. Retriveing results and checking
which indexes are in the store can be done either by iterating or by random
accees. In addition results kan be removed from the front of the store,
access. In addition results can be removed from the front of the store,
either individually or in batches.
*/
@ -62,7 +62,7 @@ namespace QtPrivate {
class ResultItem
{
public:
ResultItem(const void *_result, int _count) : m_count(_count), result(_result) { } // contruct with vector of results
ResultItem(const void *_result, int _count) : m_count(_count), result(_result) { } // construct with vector of results
ResultItem(const void *_result) : m_count(0), result(_result) { } // construct with result
ResultItem() : m_count(0), result(nullptr) { }
bool isValid() const { return result != nullptr; }

View File

@ -181,7 +181,7 @@ QThread *QThread::create(Function &&f, Args &&... args)
value for anything. In Qt we use the handle to check if threads are identical,
for which the TCB is sufficient.
So we use the fastest possible way, rathern than spend time on returning
So we use the fastest possible way, rather than spend time on returning
some pseudo-interoperable value.
*/
inline Qt::HANDLE QThread::currentThreadId() noexcept

View File

@ -74,7 +74,7 @@ static QByteArray toWindowsIdLiteral(quint16 windowsIdKey)
}
/*
Base class implementing common utility routines, only intantiate for a null tz.
Base class implementing common utility routines, only instantiate for a null tz.
*/
QTimeZonePrivate::QTimeZonePrivate()

View File

@ -198,7 +198,7 @@ int QAndroidTimeZonePrivate::daylightTimeOffset(qint64 atMSecsSinceEpoch) const
bool QAndroidTimeZonePrivate::hasDaylightTime() const
{
if ( androidTimeZone.isValid() )
/* note: the Java function only tests for future DST transtions, not past */
/* note: the Java function only tests for future DST transitions, not past */
return androidTimeZone.callMethod<jboolean>("useDaylightTime" );
else
return false;

View File

@ -275,7 +275,7 @@ static int ucalDaylightOffset(const QByteArray &id)
QIcuTimeZonePrivate::QIcuTimeZonePrivate()
: m_ucal(nullptr)
{
// TODO No ICU C API to obtain sysem tz, assume default hasn't been changed
// TODO No ICU C API to obtain system tz, assume default hasn't been changed
init(ucalDefaultTimeZoneId());
}
@ -459,7 +459,7 @@ QTimeZonePrivate::Data QIcuTimeZonePrivate::previousTransition(qint64 beforeMSec
QByteArray QIcuTimeZonePrivate::systemTimeZoneId() const
{
// No ICU C API to obtain sysem tz
// No ICU C API to obtain system tz
// TODO Assume default hasn't been changed and is the latests system
return ucalDefaultTimeZoneId();
}

View File

@ -637,13 +637,13 @@ static QList<QTimeZonePrivate::Data> calculatePosixTransitions(const QByteArray
if (parts.count() < 3 || parts.at(1).isEmpty() || parts.at(2).isEmpty())
return result; // Malformed.
// Get the std to dst transtion details
// Get the std to dst transition details
const int twoOClock = 7200; // Default transition time, when none specified
const auto dstParts = parts.at(1).split('/');
const QByteArray dstDateRule = dstParts.at(0);
const int dstTime = dstParts.count() < 2 ? twoOClock : parsePosixTransitionTime(dstParts.at(1));
// Get the dst to std transtion details
// Get the dst to std transition details
const auto stdParts = parts.at(2).split('/');
const QByteArray stdDateRule = stdParts.at(0);
const int stdTime = stdParts.count() < 2 ? twoOClock : parsePosixTransitionTime(stdParts.at(1));

View File

@ -980,7 +980,7 @@ public:
detach();
// key and value may belong to this map. As such, we need to copy
// them to ensure they stay valid througout the iteration below
// them to ensure they stay valid throughout the iteration below
// (which may destroy them)
const Key keyCopy = key;
const T valueCopy = value;