File indexing completed on 2026-05-29 08:19:09
0001
0002
0003
0004 #ifndef QITERABLE_IMPL_H
0005 #define QITERABLE_IMPL_H
0006
0007 #include <QtCore/qglobal.h>
0008 #include <QtCore/qvariant.h>
0009
0010 QT_BEGIN_NAMESPACE
0011
0012 namespace QIterablePrivate {
0013
0014 template<typename Callback>
0015 static QVariant retrieveElement(QMetaType type, Callback callback)
0016 {
0017 QVariant v(type);
0018 void *dataPtr;
0019 if (type == QMetaType::fromType<QVariant>())
0020 dataPtr = &v;
0021 else
0022 dataPtr = v.data();
0023 callback(dataPtr);
0024 return v;
0025 }
0026
0027 }
0028
0029 QT_END_NAMESPACE
0030
0031 #endif