Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qobjectcleanuphandler.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QOBJECTCLEANUPHANDLER_H
5#define QOBJECTCLEANUPHANDLER_H
6
7#include <QtCore/qobject.h>
8
10
12{
13 Q_OBJECT
14
15public:
16 QObjectCleanupHandler();
17 ~QObjectCleanupHandler();
18
19 QObject *add(QObject *object);
20 void remove(QObject *object);
21 bool isEmpty() const;
22 void clear();
23
24private:
25 // ### move into d pointer
26 QObjectList cleanupObjects;
27
28private Q_SLOTS:
29 void objectDestroyed(QObject *);
30};
31
32QT_END_NAMESPACE
33
34#endif // QOBJECTCLEANUPHANDLER_H