File indexing completed on 2026-09-12 09:21:38
0001
0002
0003
0004
0005 #ifndef QOBJECTCLEANUPHANDLER_H
0006 #define QOBJECTCLEANUPHANDLER_H
0007
0008 #include <QtCore/qobject.h>
0009
0010 QT_BEGIN_NAMESPACE
0011
0012 class Q_CORE_EXPORT QObjectCleanupHandler : public QObject
0013 {
0014 Q_OBJECT
0015
0016 public:
0017 QObjectCleanupHandler();
0018 ~QObjectCleanupHandler();
0019
0020 QObject *add(QObject *object);
0021 void remove(QObject *object);
0022 bool isEmpty() const;
0023 void clear();
0024
0025 private:
0026
0027 QObjectList cleanupObjects;
0028
0029 private Q_SLOTS:
0030 void objectDestroyed(QObject *);
0031 };
0032
0033 QT_END_NAMESPACE
0034
0035 #endif