summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-write/qcleanuphandler.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-write/qcleanuphandler.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-write/qcleanuphandler.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/noncore/apps/opie-write/qcleanuphandler.h b/noncore/apps/opie-write/qcleanuphandler.h
index 5c5bf16..2d6eb7c 100644
--- a/noncore/apps/opie-write/qcleanuphandler.h
+++ b/noncore/apps/opie-write/qcleanuphandler.h
@@ -38,17 +38,13 @@
38 38
39#ifndef QT_H 39#ifndef QT_H
40#include <qlist.h> 40#include <qlist.h>
41#endif // QT_H 41#endif // QT_H
42 42
43template<class Type> 43template<class Type>
44#ifdef Q_NO_TEMPLATE_EXPORT
45class QCleanupHandler 44class QCleanupHandler
46#else
47class Q_EXPORT QCleanupHandler
48#endif
49{ 45{
50public: 46public:
51 QCleanupHandler() : cleanupObjects( 0 ) {} 47 QCleanupHandler() : cleanupObjects( 0 ) {}
52 ~QCleanupHandler() { clear(); } 48 ~QCleanupHandler() { clear(); }
53 49
54 Type* add( Type **object ) { 50 Type* add( Type **object ) {
@@ -85,17 +81,13 @@ public:
85 81
86private: 82private:
87 QPtrList<Type*> *cleanupObjects; 83 QPtrList<Type*> *cleanupObjects;
88}; 84};
89 85
90template<class Type> 86template<class Type>
91#ifdef Q_NO_TEMPLATE_EXPORT
92class QSingleCleanupHandler 87class QSingleCleanupHandler
93#else
94class Q_EXPORT QSingleCleanupHandler
95#endif
96{ 88{
97public: 89public:
98 QSingleCleanupHandler() : object( 0 ) {} 90 QSingleCleanupHandler() : object( 0 ) {}
99 ~QSingleCleanupHandler() { 91 ~QSingleCleanupHandler() {
100 if ( object ) { 92 if ( object ) {
101 delete *object; 93 delete *object;
@@ -109,17 +101,13 @@ public:
109 void reset() { object = 0; } 101 void reset() { object = 0; }
110private: 102private:
111 Type **object; 103 Type **object;
112}; 104};
113 105
114template<class Type> 106template<class Type>
115#ifdef Q_NO_TEMPLATE_EXPORT
116class QSharedCleanupHandler 107class QSharedCleanupHandler
117#else
118class Q_EXPORT QSharedCleanupHandler
119#endif
120{ 108{
121public: 109public:
122 QSharedCleanupHandler() : object( 0 ) {} 110 QSharedCleanupHandler() : object( 0 ) {}
123 ~QSharedCleanupHandler() { 111 ~QSharedCleanupHandler() {
124 if ( object ) { 112 if ( object ) {
125 if ( (*object)->deref() ) 113 if ( (*object)->deref() )