Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:07:32

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 
0004 #ifndef QOBJECTCLEANUPHANDLER_H
0005 #define QOBJECTCLEANUPHANDLER_H
0006 
0007 #include <QtCore/qobject.h>
0008 
0009 QT_BEGIN_NAMESPACE
0010 
0011 class Q_CORE_EXPORT QObjectCleanupHandler : public QObject
0012 {
0013     Q_OBJECT
0014 
0015 public:
0016     QObjectCleanupHandler();
0017     ~QObjectCleanupHandler();
0018 
0019     QObject *add(QObject *object);
0020     void remove(QObject *object);
0021     bool isEmpty() const;
0022     void clear();
0023 
0024 private:
0025     // ### move into d pointer
0026     QObjectList cleanupObjects;
0027 
0028 private Q_SLOTS:
0029     void objectDestroyed(QObject *);
0030 };
0031 
0032 QT_END_NAMESPACE
0033 
0034 #endif // QOBJECTCLEANUPHANDLER_H