qobjectcleanuphandler.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/kernel/qobjectcleanuphandler.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3QObjectCleanupHandler::QObjectCleanupHandler()-
4{-
5}-
6-
7-
8-
9-
10-
11-
12-
13QObjectCleanupHandler::~QObjectCleanupHandler()-
14{-
15 clear();-
16}
never executed: end of block
0
17-
18-
19-
20-
21-
22-
23-
24QObject *QObjectCleanupHandler::add(QObject* object)-
25{-
26 if (!object
!objectDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
27 return
never executed: return 0;
0;
never executed: return 0;
0
28-
29 connect(object, qFlagLocation("2""destroyed(QObject*)" "\0" __FILE__ ":" "99"), this, qFlagLocation("1""objectDestroyed(QObject*)" "\0" __FILE__ ":" "99"));-
30 cleanupObjects.insert(0, object);-
31 return
never executed: return object;
object;
never executed: return object;
0
32}-
33-
34-
35-
36-
37-
38-
39-
40void QObjectCleanupHandler::remove(QObject *object)-
41{-
42 int index;-
43 if ((
(index = clean...object)) != -1Description
TRUEnever evaluated
FALSEnever evaluated
index = cleanupObjects.indexOf(object)) != -1
(index = clean...object)) != -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
44 cleanupObjects.removeAt(index);-
45 disconnect(object, qFlagLocation("2""destroyed(QObject*)" "\0" __FILE__ ":" "115"), this, qFlagLocation("1""objectDestroyed(QObject*)" "\0" __FILE__ ":" "115"));-
46 }
never executed: end of block
0
47}
never executed: end of block
0
48-
49-
50-
51-
52-
53-
54-
55bool QObjectCleanupHandler::isEmpty() const-
56{-
57 return
never executed: return cleanupObjects.isEmpty();
cleanupObjects.isEmpty();
never executed: return cleanupObjects.isEmpty();
0
58}-
59-
60-
61-
62-
63-
64-
65-
66void QObjectCleanupHandler::clear()-
67{-
68 while (!cleanupObjects.isEmpty()
!cleanupObjects.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
69 delete cleanupObjects.takeFirst();
never executed: delete cleanupObjects.takeFirst();
0
70}
never executed: end of block
0
71-
72void QObjectCleanupHandler::objectDestroyed(QObject *object)-
73{-
74 remove(object);-
75}
never executed: end of block
0
76-
77-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9