Skip to content

Commit

Permalink
Small typo fix
Browse files Browse the repository at this point in the history
Change-Id: Ie26dce967af59f140ebf03debe06aba19bd6a8e8
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Olivier Goffart (Woboq GmbH) <[email protected]>
  • Loading branch information
tronical committed Mar 10, 2020
1 parent ade4e52 commit 4109d6e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/corelib/kernel/qmetatype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ struct DefinedTypesFilter {
};
};

struct QMetaTypeCustomRegistery
struct QMetaTypeCustomRegistry
{
QReadWriteLock lock;
QVector<QtPrivate::QMetaTypeInterface *> registry;
Expand Down Expand Up @@ -180,7 +180,7 @@ struct QMetaTypeCustomRegistery
}
};

Q_GLOBAL_STATIC(QMetaTypeCustomRegistery, customTypeRegistery)
Q_GLOBAL_STATIC(QMetaTypeCustomRegistry, customTypeRegistry)

} // namespace

Expand Down Expand Up @@ -483,7 +483,7 @@ int QMetaType::id() const
if (d_ptr) {
if (d_ptr->typeId)
return d_ptr->typeId;
auto reg = customTypeRegistery();
auto reg = customTypeRegistry();
if (reg) {
return reg->registerCustomType(d_ptr);
}
Expand Down Expand Up @@ -662,7 +662,7 @@ void QMetaType::destruct(void *data) const
void QtMetaTypePrivate::derefAndDestroy(QtPrivate::QMetaTypeInterface *d_ptr)
{
if (d_ptr && !d_ptr->ref.deref()) {
if (auto reg = customTypeRegistery())
if (auto reg = customTypeRegistry())
reg->unregisterDynamicType(d_ptr->typeId.loadRelaxed());
Q_ASSERT(d_ptr->deleteSelf);
d_ptr->deleteSelf(d_ptr);
Expand All @@ -671,7 +671,7 @@ void QtMetaTypePrivate::derefAndDestroy(QtPrivate::QMetaTypeInterface *d_ptr)

Q_CORE_EXPORT void QtMetaTypePrivate::unsafeUnregister(QtPrivate::QMetaTypeInterface *d_ptr)
{
if (auto reg = customTypeRegistery())
if (auto reg = customTypeRegistry())
reg->unregisterDynamicType(d_ptr->typeId.loadRelaxed());
d_ptr->typeId = 0;
}
Expand Down Expand Up @@ -1049,7 +1049,7 @@ void QMetaType::registerStreamOperators(int idx, SaveOperator saveOp,
if (idx < User)
return; //builtin types should not be registered;

if (auto reg = customTypeRegistery()) {
if (auto reg = customTypeRegistry()) {
QWriteLocker locker(&reg->lock);
reg->dataStreamOp[idx] = { saveOp, loadOp };
}
Expand Down Expand Up @@ -1151,7 +1151,7 @@ const char *QMetaType::typeName(int typeId)
return nullptr; // It can happen when someone cast int to QVariant::Type, we should not crash...
}

if (auto reg = customTypeRegistery()) {
if (auto reg = customTypeRegistry()) {
if (auto ti = reg->getCustomType(typeId))
return ti->name;
}
Expand Down Expand Up @@ -1192,7 +1192,7 @@ static inline int qMetaTypeStaticType(const char *typeName, int length)
*/
static int qMetaTypeCustomType_unlocked(const char *typeName, int length)
{
if (auto reg = customTypeRegistery()) {
if (auto reg = customTypeRegistry()) {
#if QT_CONFIG(thread)
Q_ASSERT(!reg->lock.tryLockForWrite());
#endif
Expand All @@ -1215,7 +1215,7 @@ void QMetaType::registerNormalizedTypedef(const NS(QByteArray) & normalizedTypeN
{
if (!metaType.isValid())
return;
if (auto reg = customTypeRegistery()) {
if (auto reg = customTypeRegistry()) {
QWriteLocker lock(&reg->lock);
auto &al = reg->aliases[normalizedTypeName];
if (al)
Expand All @@ -1242,7 +1242,7 @@ static inline int qMetaTypeTypeImpl(const char *typeName, int length)
return QMetaType::UnknownType;
int type = qMetaTypeStaticType(typeName, length);
if (type == QMetaType::UnknownType) {
QReadLocker locker(&customTypeRegistery()->lock);
QReadLocker locker(&customTypeRegistry()->lock);
type = qMetaTypeCustomType_unlocked(typeName, length);
#ifndef QT_NO_QOBJECT
if ((type == QMetaType::UnknownType) && tryNormalizedType) {
Expand Down Expand Up @@ -1397,7 +1397,7 @@ class SaveOperatorSwitch
}
bool delegate(const QMetaTypeSwitcher::NotBuiltinType *data)
{
auto ct = customTypeRegistery();
auto ct = customTypeRegistry();
if (!ct)
return false;
QMetaType::SaveOperator op = nullptr;
Expand Down Expand Up @@ -1448,7 +1448,7 @@ class LoadOperatorSwitch
}
bool delegate(const QMetaTypeSwitcher::NotBuiltinType *data)
{
auto ct = customTypeRegistery();
auto ct = customTypeRegistry();
if (!ct)
return false;
QMetaType::LoadOperator op = nullptr;
Expand Down Expand Up @@ -1734,7 +1734,7 @@ const QMetaObject *QMetaType::metaObjectForType(int type)
static QtPrivate::QMetaTypeInterface *interfaceForType(int typeId)
{
if (typeId >= QMetaType::User) {
if (auto reg = customTypeRegistery())
if (auto reg = customTypeRegistry())
return reg->getCustomType(typeId);
}
if (auto moduleHelper = qModuleHelperForType(typeId))
Expand Down

0 comments on commit 4109d6e

Please sign in to comment.