diff options
author | Harald Fernengel <harald@trolltech.com> | 2009-08-21 09:02:17 (GMT) |
---|---|---|
committer | Harald Fernengel <harald@trolltech.com> | 2009-08-21 09:02:17 (GMT) |
commit | 38e0c07a78fb585e23c4ff8947be737a28b2257c (patch) | |
tree | d6b1bd21d1971c6cde4dfc95c19b8abc4ad57296 /src/script/api/qscriptstring.cpp | |
parent | a44894a39113e0eb9d4f7c912eee4671b3f391c1 (diff) | |
download | Qt-38e0c07a78fb585e23c4ff8947be737a28b2257c.zip Qt-38e0c07a78fb585e23c4ff8947be737a28b2257c.tar.gz Qt-38e0c07a78fb585e23c4ff8947be737a28b2257c.tar.bz2 |
compile again after merge
Diffstat (limited to 'src/script/api/qscriptstring.cpp')
-rw-r--r-- | src/script/api/qscriptstring.cpp | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/src/script/api/qscriptstring.cpp b/src/script/api/qscriptstring.cpp index 41593d2..b9c26f8 100644 --- a/src/script/api/qscriptstring.cpp +++ b/src/script/api/qscriptstring.cpp @@ -46,23 +46,6 @@ QT_BEGIN_NAMESPACE -/*! \internal */ -struct QScriptStringPrivatePointerDeleter -{ - static inline void cleanup(QScriptStringPrivate *d) - { - if (!d || d->ref.deref()) - return; - - if (d->nameId) { - d->engine->uninternString(d); - } else { - // the engine has already been deleted - delete d; - } - } -}; - /*! \since 4.4 \class QScriptString @@ -107,10 +90,9 @@ QScriptStringPrivate::~QScriptStringPrivate() void QScriptStringPrivate::init(QScriptString &q, QScriptEngine *engine, const JSC::Identifier &value) { Q_ASSERT(!q.isValid()); - q.d_ptr.data_ptr() = new QScriptStringPrivate(); + q.d_ptr = new QScriptStringPrivate(); q.d_ptr->identifier = value; q.d_ptr->engine = engine; - q.d_ptr->ref.ref(); } /*! @@ -125,10 +107,8 @@ QScriptString::QScriptString() Constructs a new QScriptString that is a copy of \a other. */ QScriptString::QScriptString(const QScriptString &other) - : d_ptr(other.d_ptr.data()) + : d_ptr(other.d_ptr) { - if (d_ptr) - d_ptr->ref.ref(); } /*! @@ -143,14 +123,7 @@ QScriptString::~QScriptString() */ QScriptString &QScriptString::operator=(const QScriptString &other) { - if (d_ptr == other.d_ptr) - return *this; - if (d_ptr && !d_ptr->ref.deref()) { - delete d_ptr; - } - d_ptr.reset(other.d_ptr); - if (d_ptr) - d_ptr->ref.ref(); + d_ptr = other.d_ptr; return *this; } |