diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/script/api/qscriptstring.cpp | 10 | ||||
-rw-r--r-- | src/script/api/qscriptstring_p.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/script/api/qscriptstring.cpp b/src/script/api/qscriptstring.cpp index b9c26f8..de707e9 100644 --- a/src/script/api/qscriptstring.cpp +++ b/src/script/api/qscriptstring.cpp @@ -72,7 +72,8 @@ QT_BEGIN_NAMESPACE /*! \internal */ -QScriptStringPrivate::QScriptStringPrivate() +QScriptStringPrivate::QScriptStringPrivate(QScriptEngine *e, const JSC::Identifier &id) + : engine(e), identifier(id) { ref = 0; } @@ -87,12 +88,11 @@ QScriptStringPrivate::~QScriptStringPrivate() /*! \internal */ -void QScriptStringPrivate::init(QScriptString &q, QScriptEngine *engine, const JSC::Identifier &value) +void QScriptStringPrivate::init(QScriptString &q, QScriptEngine *engine, + const JSC::Identifier &value) { Q_ASSERT(!q.isValid()); - q.d_ptr = new QScriptStringPrivate(); - q.d_ptr->identifier = value; - q.d_ptr->engine = engine; + q.d_ptr = new QScriptStringPrivate(engine, value); } /*! diff --git a/src/script/api/qscriptstring_p.h b/src/script/api/qscriptstring_p.h index 74094bf..3413315 100644 --- a/src/script/api/qscriptstring_p.h +++ b/src/script/api/qscriptstring_p.h @@ -69,10 +69,10 @@ class QScriptEngine; class QScriptStringPrivate { public: - QScriptStringPrivate(); + QScriptStringPrivate(QScriptEngine *engine, const JSC::Identifier &id); ~QScriptStringPrivate(); - static void init(QScriptString &q, QScriptEngine *engine, const JSC::Identifier &value); + static void init(QScriptString &q, QScriptEngine *engine, const JSC::Identifier &id); QBasicAtomicInt ref; #ifndef QT_NO_QOBJECT |