diff options
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index e5b7681a7c..6791970461 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -39,6 +39,7 @@ #include <QHash> #include <private/qv4value_p.h> #include <private/qv4executableallocator_p.h> +#include <private/qqmlrefcount_p.h> QT_BEGIN_NAMESPACE @@ -559,18 +560,16 @@ struct TypeReferenceMap : QHash<int, TypeReference> // CompilationUnit * (for functions that need to clean up) // CompiledData::Function *compiledFunction -struct Q_QML_PRIVATE_EXPORT CompilationUnit +struct Q_QML_PRIVATE_EXPORT CompilationUnit : public QQmlRefCount { #ifdef V4_BOOTSTRAP CompilationUnit() - : refCount(0) - , data(0) + : data(0) {} virtual ~CompilationUnit() {} #else CompilationUnit() - : refCount(0) - , data(0) + : data(0) , engine(0) , runtimeStrings(0) , runtimeLookups(0) @@ -580,10 +579,6 @@ struct Q_QML_PRIVATE_EXPORT CompilationUnit virtual ~CompilationUnit(); #endif - void ref() { ++refCount; } - void deref() { if (!--refCount) delete this; } - - int refCount; Unit *data; // Called only when building QML, when we build the header for JS first and append QML data |