diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2011-08-04 13:16:12 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-08-04 14:38:49 +0200 |
commit | d4b6e43e7f096925d5761e53860a35b995a4eb0a (patch) | |
tree | 8f84933adab074e9f96183b3094ced58a6779bbf /src/declarative/qml/v8/qjsvalue_p.h | |
parent | 5a594e5bfd2f000204bd4c883719e0069ad3a772 (diff) |
Move QJSValue InvalidValue definition to "inline" header
Avoid warning "inline function ‘QJSValuePrivate::QJSValuePrivate()’
used but never defined" when only qjsvalue_p.h is included
for a compilation unit.
Change-Id: I75bb49dedbfcedf5f71c25210371f03663572b46
Reviewed-on: http://codereview.qt.nokia.com/2620
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/declarative/qml/v8/qjsvalue_p.h')
-rw-r--r-- | src/declarative/qml/v8/qjsvalue_p.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/declarative/qml/v8/qjsvalue_p.h b/src/declarative/qml/v8/qjsvalue_p.h index 2e24ad0ae3..8189f45d59 100644 --- a/src/declarative/qml/v8/qjsvalue_p.h +++ b/src/declarative/qml/v8/qjsvalue_p.h @@ -186,30 +186,6 @@ private: inline bool prepareArgumentsForCall(v8::Handle<v8::Value> argv[], const QJSValueList& arguments) const; }; -// This template is used indirectly by the Q_GLOBAL_STATIC macro below -template<> -class QGlobalStaticDeleter<QJSValuePrivate> -{ -public: - QGlobalStatic<QJSValuePrivate> &globalStatic; - QGlobalStaticDeleter(QGlobalStatic<QJSValuePrivate> &_globalStatic) - : globalStatic(_globalStatic) - { - globalStatic.pointer->ref.ref(); - } - - inline ~QGlobalStaticDeleter() - { - if (!globalStatic.pointer->ref.deref()) { // Logic copy & paste from SharedDataPointer - delete globalStatic.pointer; - } - globalStatic.pointer = 0; - globalStatic.destroyed = true; - } -}; - -Q_GLOBAL_STATIC(QJSValuePrivate, InvalidValue) - QT_END_NAMESPACE #endif |