int QMetaType::registerType(const char *typeName, Destructor destructor,
Constructor constructor)
{
- QVector<QCustomTypeInfo> *ct = customTypes();
- if (!ct || !typeName || !destructor || !constructor)
+ if (!typeName || !destructor || !constructor)
return -1;
#ifdef QT_NO_QOBJECT
if (!idx) {
QWriteLocker locker(customTypesLock());
+ QVector<QCustomTypeInfo> *ct = customTypes();
idx = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(),
normalizedTypeName.size());
if (!idx) {
*/
int QMetaType::registerTypedef(const char* typeName, int aliasId)
{
- QVector<QCustomTypeInfo> *ct = customTypes();
- if (!ct || !typeName)
+ if (!typeName)
return -1;
#ifdef QT_NO_QOBJECT
}
QWriteLocker locker(customTypesLock());
+ QVector<QCustomTypeInfo> *ct = customTypes();
idx = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(),
normalizedTypeName.size());
*/
void QMetaType::unregisterType(const char *typeName)
{
- QVector<QCustomTypeInfo> *ct = customTypes();
- if (!ct || !typeName)
+ if (!typeName)
return;
#ifdef QT_NO_QOBJECT
NS(QByteArray) normalizedTypeName = QMetaObject::normalizedType(typeName);
#endif
QWriteLocker locker(customTypesLock());
+ QVector<QCustomTypeInfo> *ct = customTypes();
for (int v = 0; v < ct->count(); ++v) {
if (ct->at(v).typeName == typeName) {
QCustomTypeInfo &inf = (*ct)[v];