#include "qstringlist.h"
#include "qvector.h"
#include "qlocale.h"
+#include "qstdcontainers_p.h"
#ifndef QT_BOOTSTRAPPED
# include "qeasingcurve.h"
};
Q_DECLARE_TYPEINFO(QCustomTypeInfo, Q_MOVABLE_TYPE);
-Q_GLOBAL_STATIC(QVector<QCustomTypeInfo>, customTypes)
+Q_GLOBAL_STATIC(QStdVector<QCustomTypeInfo>, customTypes)
Q_GLOBAL_STATIC(QReadWriteLock, customTypesLock)
#ifndef QT_NO_DATASTREAM
if (idx < User)
return; //builtin types should not be registered;
QWriteLocker locker(customTypesLock());
- QVector<QCustomTypeInfo> *ct = customTypes();
+ QStdVector<QCustomTypeInfo> *ct = customTypes();
if (!ct)
return;
QCustomTypeInfo &inf = (*ct)[idx - User];
return MetaTypeTbl[type - FirstCoreExtType + GuiTypeCount + LastCoreType + 2].typeName;
} else if (type >= User) {
QReadLocker locker(customTypesLock());
- const QVector<QCustomTypeInfo> * const ct = customTypes();
+ const QStdVector<QCustomTypeInfo> * const ct = customTypes();
return ct && ct->count() > type - User && !ct->at(type - User).typeName.isEmpty()
? ct->at(type - User).typeName.constData() : nullptr;
}
*/
static int qMetaTypeCustomType_unlocked(const char *typeName, int length)
{
- const QVector<QCustomTypeInfo> * const ct = customTypes();
+ const QStdVector<QCustomTypeInfo> * const ct = customTypes();
if (!ct)
return 0;
if (!idx) {
QWriteLocker locker(customTypesLock());
- QVector<QCustomTypeInfo> *ct = customTypes();
+ QStdVector<QCustomTypeInfo> *ct = customTypes();
idx = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(),
normalizedTypeName.size());
if (!idx) {
}
QWriteLocker locker(customTypesLock());
- QVector<QCustomTypeInfo> *ct = customTypes();
+ QStdVector<QCustomTypeInfo> *ct = customTypes();
idx = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(),
normalizedTypeName.size());
NS(QByteArray) normalizedTypeName = QMetaObject::normalizedType(typeName);
#endif
QWriteLocker locker(customTypesLock());
- QVector<QCustomTypeInfo> *ct = customTypes();
+ QStdVector<QCustomTypeInfo> *ct = customTypes();
for (int v = 0; v < ct->count(); ++v) {
if (ct->at(v).typeName == typeName) {
QCustomTypeInfo &inf = (*ct)[v];
return false;
}
QReadLocker locker(customTypesLock());
- const QVector<QCustomTypeInfo> * const ct = customTypes();
+ const QStdVector<QCustomTypeInfo> * const ct = customTypes();
return (ct && (ct->count() > type - User) && !ct->at(type - User).typeName.isEmpty());
}
break;
default: {
QReadLocker locker(customTypesLock());
- const QVector<QCustomTypeInfo> * const ct = customTypes();
+ const QStdVector<QCustomTypeInfo> * const ct = customTypes();
if (!ct)
return false;
break;
default: {
QReadLocker locker(customTypesLock());
- const QVector<QCustomTypeInfo> * const ct = customTypes();
+ const QStdVector<QCustomTypeInfo> * const ct = customTypes();
if (!ct)
return false;
constr = qMetaTypeGuiHelper[type - FirstGuiType].constr;
} else {
QReadLocker locker(customTypesLock());
- const QVector<QCustomTypeInfo> * const ct = customTypes();
+ const QStdVector<QCustomTypeInfo> * const ct = customTypes();
if (type < User || !ct || ct->count() <= type - User)
return 0;
if (ct->at(type - User).typeName.isEmpty())
destr = qMetaTypeGuiHelper[type - FirstGuiType].destr;
} else {
QReadLocker locker(customTypesLock());
- const QVector<QCustomTypeInfo> * const ct = customTypes();
+ const QStdVector<QCustomTypeInfo> * const ct = customTypes();
if (type < User || !ct || ct->count() <= type - User)
break;
if (ct->at(type - User).typeName.isEmpty())
#include "qdbusutil_p.h"
#include "qdbusmetatype_p.h"
#include "qdbusargument_p.h"
+#include "qstdcontainers_p.h"
#include <dbus/dbus.h>
#include <string.h>
}
Q_CONSTRUCTOR_FUNCTION(QDBusMetaTypeIdInit);
-Q_GLOBAL_STATIC(QVector<QDBusCustomTypeInfo>, customTypes)
+Q_GLOBAL_STATIC(QStdVector<QDBusCustomTypeInfo>, customTypes)
Q_GLOBAL_STATIC(QReadWriteLock, customTypesLock)
/*!
DemarshallFunction df)
{
QWriteLocker locker(customTypesLock());
- QVector<QDBusCustomTypeInfo> *ct = customTypes();
+ QStdVector<QDBusCustomTypeInfo> *ct = customTypes();
if (id < 0 || !mf || !df || !ct)
return; // error!
MarshallFunction mf;
{
QReadLocker locker(customTypesLock());
- QVector<QDBusCustomTypeInfo> *ct = customTypes();
+ QStdVector<QDBusCustomTypeInfo> *ct = customTypes();
if (id >= ct->size())
return false; // non-existent
DemarshallFunction df;
{
QReadLocker locker(customTypesLock());
- QVector<QDBusCustomTypeInfo> *ct = customTypes();
+ QStdVector<QDBusCustomTypeInfo> *ct = customTypes();
if (id >= ct->size())
return false; // non-existent
// try the database
{
QReadLocker locker(customTypesLock());
- QVector<QDBusCustomTypeInfo> *ct = customTypes();
+ QStdVector<QDBusCustomTypeInfo> *ct = customTypes();
if (type >= ct->size())
return nullptr; // type not registered with us
// re-acquire lock
QWriteLocker locker(customTypesLock());
- QVector<QDBusCustomTypeInfo> *ct = customTypes();
+ QStdVector<QDBusCustomTypeInfo> *ct = customTypes();
QDBusCustomTypeInfo *info = &(*ct)[type];
info->signature = signature;