diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-12 20:10:57 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-12 20:32:24 (GMT) |
commit | 88c6dc6ec7f73de279703b30874b30511901854b (patch) | |
tree | 15d1b87a2f10bbaf9d8e08a8bee75de9ed71afe6 /src/script | |
parent | 18e548c3f705fa6b4ebfac80fe79fe49dac54a0a (diff) | |
download | Qt-88c6dc6ec7f73de279703b30874b30511901854b.zip Qt-88c6dc6ec7f73de279703b30874b30511901854b.tar.gz Qt-88c6dc6ec7f73de279703b30874b30511901854b.tar.bz2 |
Make simple function getters inline
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 14 | ||||
-rw-r--r-- | src/script/api/qscriptengine_p.h | 4 | ||||
-rw-r--r-- | src/script/api/qscriptvalue.cpp | 5 | ||||
-rw-r--r-- | src/script/api/qscriptvalue_p.h | 2 |
4 files changed, 3 insertions, 22 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 9f9242c..e8ea222 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -1363,20 +1363,6 @@ void QScriptEnginePrivate::detachAllRegisteredScriptValues() } } -QScriptEnginePrivate *QScriptEnginePrivate::get(QScriptEngine *q) -{ - if (!q) - return 0; - return q->d_func(); -} - -QScriptEngine *QScriptEnginePrivate::get(QScriptEnginePrivate *d) -{ - if (!d) - return 0; - return d->q_func(); -} - #ifdef QT_NO_QOBJECT QScriptEngine::QScriptEngine() diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index 572f361..86c7616 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -113,8 +113,8 @@ public: QScriptEnginePrivate(); virtual ~QScriptEnginePrivate(); - static QScriptEnginePrivate *get(QScriptEngine*); - static QScriptEngine *get(QScriptEnginePrivate*); + static QScriptEnginePrivate *get(QScriptEngine *q) { return q ? q->d_func() : 0; } + static QScriptEngine *get(QScriptEnginePrivate *d) { return d ? d->q_func() : 0; } static bool convert(const QScriptValue &value, int type, void *ptr, diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index aa0e8cb..b02802c 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -348,11 +348,6 @@ bool QScriptValuePrivate::isJSC() const return (type == JSC); } -QScriptValuePrivate *QScriptValuePrivate::get(const QScriptValue &q) -{ - return q.d_ptr; -} - QScriptValue QScriptValuePrivate::property(const QString &name, int resolveMode) const { QScriptEnginePrivate *eng_p = QScriptEnginePrivate::get(engine); diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h index 3359cba..b19435c 100644 --- a/src/script/api/qscriptvalue_p.h +++ b/src/script/api/qscriptvalue_p.h @@ -130,7 +130,7 @@ public: QVariant &variantValue() const; void setVariantValue(const QVariant &value); - static QScriptValuePrivate *get(const QScriptValue &q); + static QScriptValuePrivate *get(const QScriptValue &q) { return q.d_ptr; } QScriptValue property(const JSC::Identifier &id, int resolveMode) const; QScriptValue property(const QString &, int resolveMode) const; |