diff options
Diffstat (limited to 'src/corelib/kernel/qmetatype.h')
-rw-r--r-- | src/corelib/kernel/qmetatype.h | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index f704c5b21a..47c3a1c6f6 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -234,7 +234,7 @@ struct AbstractDebugStreamFunction { typedef void (*Stream)(const AbstractDebugStreamFunction *, QDebug&, const void *); typedef void (*Destroy)(AbstractDebugStreamFunction *); - explicit AbstractDebugStreamFunction(Stream s = Q_NULLPTR, Destroy d = Q_NULLPTR) + explicit AbstractDebugStreamFunction(Stream s = nullptr, Destroy d = nullptr) : stream(s), destroy(d) {} Q_DISABLE_COPY(AbstractDebugStreamFunction) Stream stream; @@ -264,7 +264,7 @@ struct AbstractComparatorFunction typedef bool (*LessThan)(const AbstractComparatorFunction *, const void *, const void *); typedef bool (*Equals)(const AbstractComparatorFunction *, const void *, const void *); typedef void (*Destroy)(AbstractComparatorFunction *); - explicit AbstractComparatorFunction(LessThan lt = Q_NULLPTR, Equals e = Q_NULLPTR, Destroy d = Q_NULLPTR) + explicit AbstractComparatorFunction(LessThan lt = nullptr, Equals e = nullptr, Destroy d = nullptr) : lessThan(lt), equals(e), destroy(d) {} Q_DISABLE_COPY(AbstractComparatorFunction) LessThan lessThan; @@ -301,7 +301,7 @@ template<typename T> struct BuiltInEqualsComparatorFunction : public AbstractComparatorFunction { BuiltInEqualsComparatorFunction() - : AbstractComparatorFunction(Q_NULLPTR, equals, destroy) {} + : AbstractComparatorFunction(nullptr, equals, destroy) {} static bool equals(const AbstractComparatorFunction *, const void *l, const void *r) { const T *lhs = static_cast<const T *>(l); @@ -318,7 +318,7 @@ struct BuiltInEqualsComparatorFunction : public AbstractComparatorFunction struct AbstractConverterFunction { typedef bool (*Converter)(const AbstractConverterFunction *, const void *, void*); - explicit AbstractConverterFunction(Converter c = Q_NULLPTR) + explicit AbstractConverterFunction(Converter c = nullptr) : convert(c) {} Q_DISABLE_COPY(AbstractConverterFunction) Converter convert; @@ -513,9 +513,9 @@ public: static TypeFlags typeFlags(int type); static const QMetaObject *metaObjectForType(int type); static bool isRegistered(int type); - static void *create(int type, const void *copy = Q_NULLPTR); + static void *create(int type, const void *copy = nullptr); #if QT_DEPRECATED_SINCE(5, 0) - QT_DEPRECATED static void *construct(int type, const void *copy = Q_NULLPTR) + QT_DEPRECATED static void *construct(int type, const void *copy = nullptr) { return create(type, copy); } #endif static void destroy(int type, void *data); @@ -536,9 +536,9 @@ public: inline TypeFlags flags() const; inline const QMetaObject *metaObject() const; - inline void *create(const void *copy = Q_NULLPTR) const; + inline void *create(const void *copy = nullptr) const; inline void destroy(void *data) const; - inline void *construct(void *where, const void *copy = Q_NULLPTR) const; + inline void *construct(void *where, const void *copy = nullptr) const; inline void destruct(void *data) const; public: @@ -617,7 +617,7 @@ public: return registerConverterFunction(&f, fromTypeId, toTypeId); } - // member function as in "double QString::toDouble(bool *ok = Q_NULLPTR) const" + // member function as in "double QString::toDouble(bool *ok = nullptr) const" template<typename From, typename To> static bool registerConverter(To(From::*function)(bool*) const) { @@ -680,9 +680,9 @@ private: uint sizeExtended() const; QMetaType::TypeFlags flagsExtended() const; const QMetaObject *metaObjectExtended() const; - void *createExtended(const void *copy = Q_NULLPTR) const; + void *createExtended(const void *copy = nullptr) const; void destroyExtended(void *data) const; - void *constructExtended(void *where, const void *copy = Q_NULLPTR) const; + void *constructExtended(void *where, const void *copy = nullptr) const; void destructExtended(void *data) const; static bool registerComparatorFunction(const QtPrivate::AbstractComparatorFunction *f, int type); @@ -782,7 +782,7 @@ struct QMetaTypeFunctionHelper { template <typename T> struct QMetaTypeFunctionHelper<T, /* Accepted */ false> { static void Destruct(void *) {} - static void *Construct(void *, const void *) { return Q_NULLPTR; } + static void *Construct(void *, const void *) { return nullptr; } #ifndef QT_NO_DATASTREAM static void Save(QDataStream &, const void *) {} static void Load(QDataStream &, void *) {} @@ -1020,7 +1020,7 @@ public: public: template<class T> QSequentialIterableImpl(const T*p) : _iterable(p) - , _iterator(Q_NULLPTR) + , _iterator(nullptr) , _metaType_id(qMetaTypeId<typename T::value_type>()) , _metaType_flags(QTypeInfo<typename T::value_type>::isPointer) , _iteratorCapabilities(ContainerAPI<T>::IteratorCapabilities) @@ -1037,20 +1037,20 @@ public: } QSequentialIterableImpl() - : _iterable(Q_NULLPTR) - , _iterator(Q_NULLPTR) + : _iterable(nullptr) + , _iterator(nullptr) , _metaType_id(QMetaType::UnknownType) , _metaType_flags(0) , _iteratorCapabilities(0) - , _size(Q_NULLPTR) - , _at(Q_NULLPTR) - , _moveToBegin(Q_NULLPTR) - , _moveToEnd(Q_NULLPTR) - , _advance(Q_NULLPTR) - , _get(Q_NULLPTR) - , _destroyIter(Q_NULLPTR) - , _equalIter(Q_NULLPTR) - , _copyIter(Q_NULLPTR) + , _size(nullptr) + , _at(nullptr) + , _moveToBegin(nullptr) + , _moveToEnd(nullptr) + , _advance(nullptr) + , _get(nullptr) + , _destroyIter(nullptr) + , _equalIter(nullptr) + , _copyIter(nullptr) { } @@ -1189,7 +1189,7 @@ public: public: template<class T> QAssociativeIterableImpl(const T*p) : _iterable(p) - , _iterator(Q_NULLPTR) + , _iterator(nullptr) , _metaType_id_key(qMetaTypeId<typename T::key_type>()) , _metaType_flags_key(QTypeInfo<typename T::key_type>::isPointer) , _metaType_id_value(qMetaTypeId<typename T::mapped_type>()) @@ -1208,22 +1208,22 @@ public: } QAssociativeIterableImpl() - : _iterable(Q_NULLPTR) - , _iterator(Q_NULLPTR) + : _iterable(nullptr) + , _iterator(nullptr) , _metaType_id_key(QMetaType::UnknownType) , _metaType_flags_key(0) , _metaType_id_value(QMetaType::UnknownType) , _metaType_flags_value(0) - , _size(Q_NULLPTR) - , _find(Q_NULLPTR) - , _begin(Q_NULLPTR) - , _end(Q_NULLPTR) - , _advance(Q_NULLPTR) - , _getKey(Q_NULLPTR) - , _getValue(Q_NULLPTR) - , _destroyIter(Q_NULLPTR) - , _equalIter(Q_NULLPTR) - , _copyIter(Q_NULLPTR) + , _size(nullptr) + , _find(nullptr) + , _begin(nullptr) + , _end(nullptr) + , _advance(nullptr) + , _getKey(nullptr) + , _getValue(nullptr) + , _destroyIter(nullptr) + , _equalIter(nullptr) + , _copyIter(nullptr) { } @@ -1292,13 +1292,13 @@ public: } QPairVariantInterfaceImpl() - : _pair(Q_NULLPTR) + : _pair(nullptr) , _metaType_id_first(QMetaType::UnknownType) , _metaType_flags_first(0) , _metaType_id_second(QMetaType::UnknownType) , _metaType_flags_second(0) - , _getFirst(Q_NULLPTR) - , _getSecond(Q_NULLPTR) + , _getFirst(nullptr) + , _getSecond(nullptr) { } @@ -1374,7 +1374,7 @@ namespace QtPrivate #endif static no_type checkType(...); Q_STATIC_ASSERT_X(sizeof(T), "Type argument of Q_DECLARE_METATYPE(T*) must be fully defined"); - enum { Value = sizeof(checkType(static_cast<T*>(Q_NULLPTR))) == sizeof(yes_type) }; + enum { Value = sizeof(checkType(static_cast<T*>(nullptr))) == sizeof(yes_type) }; }; template<typename T, typename Enable = void> @@ -1419,12 +1419,12 @@ namespace QtPrivate template<typename T, typename Enable = void> struct MetaObjectForType { - static inline const QMetaObject *value() { return Q_NULLPTR; } + static inline const QMetaObject *value() { return nullptr; } }; template<> struct MetaObjectForType<void> { - static inline const QMetaObject *value() { return Q_NULLPTR; } + static inline const QMetaObject *value() { return nullptr; } }; template<typename T> struct MetaObjectForType<T*, typename std::enable_if<IsPointerToTypeDerivedFromQObject<T*>::Value>::type> @@ -1720,7 +1720,7 @@ int qRegisterNormalizedMetaType(const QT_PREPEND_NAMESPACE(QByteArray) &normaliz template <typename T> int qRegisterMetaType(const char *typeName #ifndef Q_QDOC - , T * dummy = Q_NULLPTR + , T * dummy = nullptr , typename QtPrivate::MetaTypeDefinedHelper<T, QMetaTypeId2<T>::Defined && !QMetaTypeId2<T>::IsBuiltIn>::DefinedType defined = QtPrivate::MetaTypeDefinedHelper<T, QMetaTypeId2<T>::Defined && !QMetaTypeId2<T>::IsBuiltIn>::Defined #endif ) @@ -1737,7 +1737,7 @@ int qRegisterMetaType(const char *typeName template <typename T> void qRegisterMetaTypeStreamOperators(const char *typeName #ifndef Q_QDOC - , T * /* dummy */ = Q_NULLPTR + , T * /* dummy */ = nullptr #endif ) { @@ -2150,7 +2150,7 @@ inline QMetaType::QMetaType(const ExtensionFlag extensionFlags, const QMetaTypeI , m_loadOp(loadOp) , m_constructor(constructor) , m_destructor(destructor) - , m_extension(Q_NULLPTR) + , m_extension(nullptr) , m_size(size) , m_typeFlags(theTypeFlags) , m_extensionFlags(extensionFlags) |