Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-12 09:21:38

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 // Qt-Security score:significant reason:default
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     // ### move into d pointer
0027     QObjectList cleanupObjects;
0028 
0029 private Q_SLOTS:
0030     void objectDestroyed(QObject *);
0031 };
0032 
0033 QT_END_NAMESPACE
0034 
0035 #endif // QOBJECTCLEANUPHANDLER_H