QtBase  v6.3.1
Classes | Namespaces | Macros | Functions | Variables
tst_qlist.cpp File Reference
#include <QTest>
#include <QAtomicInt>
#include <QThread>
#include <QSemaphore>
#include <QScopedValueRollback>
#include <qlist.h>
#include "tst_qlist.moc"
Include dependency graph for tst_qlist.cpp:

Go to the source code of this file.

Classes

struct  Movable
 
struct  Custom
 
struct  LeakChecker< T >
 
struct  LeakChecker< int >
 
struct  LeakChecker< QString >
 
class  tst_QList
 
struct  SimpleValue< T >
 
struct  ConstructionCounted
 
struct  SharedVectorChecker< T >
 
struct  RemoveLastTestClass
 
struct  Foo
 [4] More...
 
struct  CustomAligned
 

Namespaces

 QTest
 [15]
 

Macros

#define TST_QLIST_CHECK_LEAKS(Type)
 
#define T_FOO   SimpleValue<T>::at(0)
 
#define T_BAR   SimpleValue<T>::at(1)
 
#define T_BAZ   SimpleValue<T>::at(2)
 
#define T_CAT   SimpleValue<T>::at(3)
 
#define T_DOG   SimpleValue<T>::at(4)
 
#define T_BLAH   SimpleValue<T>::at(5)
 
#define QVERIFY_IS_VECTOR_OF(obj, Type)
 
#define CHECK(Type, One, Two, Three)
 

Functions

size_t qHash (const Movable &key, size_t seed=0)
 
QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO (Movable, Q_RELOCATABLE_TYPE)
 
QT_END_NAMESPACE Q_DECLARE_METATYPE (Movable)
 
size_t qHash (const Custom &key, size_t seed=0)
 
 Q_DECLARE_METATYPE (Custom)
 
template<typename It >
decltype(autoqlistCopyAndReferenceFromRange (It first, It last)
 
char * QTest::toString (const ConstructionCounted &cc)
 
template<typename T >
QAtomicPointer< QList< T > > * detachThreadSafetyData ()
 
template<>
QAtomicPointer< QList< int > > * detachThreadSafetyData ()
 

Variables

int fooCtor
 
int fooDtor
 

Macro Definition Documentation

◆ CHECK

#define CHECK (   Type,
  One,
  Two,
  Three 
)
Value:
do { \
const Type v[] = {One, Two, Three}; \
QList v1 = {One, Two, Three}; \
QVERIFY_IS_VECTOR_OF(v1, Type); \
QList v2(v1.begin(), v1.end()); \
QVERIFY_IS_VECTOR_OF(v2, Type); \
QList v3(std::begin(v), std::end(v)); \
QVERIFY_IS_VECTOR_OF(v3, Type); \
} while (false) \
/*end*/
GLint GLfloat GLfloat GLfloat v2
GLsizei const GLfloat * v
[13]
GLuint GLuint end
GLint GLfloat GLfloat v1
GLint GLfloat GLfloat GLfloat GLfloat v3
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
Definition: moc.h:48
@ Two
Definition: tst_qflags.cpp:497
@ One
Definition: tst_qflags.cpp:497

◆ QVERIFY_IS_VECTOR_OF

#define QVERIFY_IS_VECTOR_OF (   obj,
  Type 
)
Value:
QVERIFY2((std::is_same<decltype(obj), QList<Type>>::value), \
Definition: qlist.h:108
constexpr static QMetaType fromType()
typename C::value_type value_type
EGLOutputLayerEXT EGLint EGLAttrib value
GLuint name
GLhandleARB obj
[2]
Definition: qopenglext.h:4164
#define QVERIFY2(statement, description)
Definition: qtestcase.h:76

◆ T_BAR

#define T_BAR   SimpleValue<T>::at(1)

Definition at line 529 of file tst_qlist.cpp.

◆ T_BAZ

#define T_BAZ   SimpleValue<T>::at(2)

Definition at line 530 of file tst_qlist.cpp.

◆ T_BLAH

#define T_BLAH   SimpleValue<T>::at(5)

Definition at line 533 of file tst_qlist.cpp.

◆ T_CAT

#define T_CAT   SimpleValue<T>::at(3)

Definition at line 531 of file tst_qlist.cpp.

◆ T_DOG

#define T_DOG   SimpleValue<T>::at(4)

Definition at line 532 of file tst_qlist.cpp.

◆ T_FOO

#define T_FOO   SimpleValue<T>::at(0)

Definition at line 528 of file tst_qlist.cpp.

◆ TST_QLIST_CHECK_LEAKS

#define TST_QLIST_CHECK_LEAKS (   Type)
Value:
LeakChecker<Type> checker; \
Q_UNUSED(checker);

Definition at line 229 of file tst_qlist.cpp.

Function Documentation

◆ detachThreadSafetyData() [1/2]

template<typename T >
QAtomicPointer<QList<T> >* detachThreadSafetyData ( )

Definition at line 3055 of file tst_qlist.cpp.

◆ detachThreadSafetyData() [2/2]

template<>
QAtomicPointer< QList< Custom > > * detachThreadSafetyData ( )

Definition at line 3055 of file tst_qlist.cpp.

◆ Q_DECLARE_METATYPE() [1/2]

Q_DECLARE_METATYPE ( Custom  )

◆ Q_DECLARE_METATYPE() [2/2]

QT_END_NAMESPACE Q_DECLARE_METATYPE ( Movable  )

◆ Q_DECLARE_TYPEINFO()

QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO ( Movable  ,
Q_RELOCATABLE_TYPE   
)

◆ qHash() [1/2]

size_t qHash ( const Custom key,
size_t  seed = 0 
)
inline

Definition at line 207 of file tst_qlist.cpp.

◆ qHash() [2/2]

size_t qHash ( const Movable key,
size_t  seed = 0 
)
inline

Definition at line 132 of file tst_qlist.cpp.

◆ qlistCopyAndReferenceFromRange()

template<typename It >
decltype(auto) qlistCopyAndReferenceFromRange ( It  first,
It  last 
)

Definition at line 537 of file tst_qlist.cpp.

Variable Documentation

◆ fooCtor

int fooCtor

Definition at line 2864 of file tst_qlist.cpp.

◆ fooDtor

int fooDtor

Definition at line 2865 of file tst_qlist.cpp.