summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-01-30 07:44:39 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-01-30 07:44:39 (GMT)
commit4158a1ae13b8bea6ab136f7ae67e22406e711b1f (patch)
tree924ba7af74d8de56d3f9037a75417fe427425de0 /src/script
parente5974b024828578945bd4c349f5f87f82a635225 (diff)
parentafa73122a2a6394ee1a6b9d43c0b71e2bd7c1320 (diff)
downloadQt-4158a1ae13b8bea6ab136f7ae67e22406e711b1f.zip
Qt-4158a1ae13b8bea6ab136f7ae67e22406e711b1f.tar.gz
Qt-4158a1ae13b8bea6ab136f7ae67e22406e711b1f.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (151 commits) expect fail for some PinchArea tests on mac Allow functions to be passed in as values for grouped properties Fix lineHeight autotests. Update Docs, Examples and Demos for new CreateObject overloadable Adding support for group properties in Component::CreateObject() Update test, versioning is fixed so expect-fail no longer needed Test failure fixed - remove XFAIL photoviewer needs QtQuick 1.1 for Image::cache disable some pincharea tests on mac temporarily Fix failing test on mac for Qt.application Fix test breakage for qdeclarativeworkerscript Fix typo in error message. Doc fix for lineHeight. Add support for line spacing in Text element. Fixing right-to-left text in Text and TextInput Fix MaximumLineCount in Text and add tests Ensure simple objects also get the appropriate property cache Add test for Loader implicitWidth/implicitHeight Don't crash when appending a null item Test for passing functions to createObject() for property bindings ...
Diffstat (limited to 'src/script')
-rw-r--r--src/script/bridge/qscriptdeclarativeclass.cpp13
-rw-r--r--src/script/bridge/qscriptdeclarativeclass_p.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/src/script/bridge/qscriptdeclarativeclass.cpp b/src/script/bridge/qscriptdeclarativeclass.cpp
index 0dcf1ec..6126b32 100644
--- a/src/script/bridge/qscriptdeclarativeclass.cpp
+++ b/src/script/bridge/qscriptdeclarativeclass.cpp
@@ -179,6 +179,11 @@ QScriptDeclarativeClass::PersistentIdentifier::operator=(const PersistentIdentif
return *this;
}
+QString QScriptDeclarativeClass::PersistentIdentifier::toString() const
+{
+ return ((JSC::Identifier &)d).ustring();
+}
+
QScriptDeclarativeClass::QScriptDeclarativeClass(QScriptEngine *engine)
: d_ptr(new QScriptDeclarativeClassPrivate)
{
@@ -468,6 +473,14 @@ QString QScriptDeclarativeClass::toString(const Identifier &identifier)
return QString((QChar *)r->data(), r->size());
}
+bool QScriptDeclarativeClass::startsWithUpper(const Identifier &identifier)
+{
+ JSC::UString::Rep *r = (JSC::UString::Rep *)identifier;
+ if (r->size() < 1)
+ return false;
+ return QChar::category((ushort)(r->data()[0])) == QChar::Letter_Uppercase;
+}
+
quint32 QScriptDeclarativeClass::toArrayIndex(const Identifier &identifier, bool *ok)
{
JSC::UString::Rep *r = (JSC::UString::Rep *)identifier;
diff --git a/src/script/bridge/qscriptdeclarativeclass_p.h b/src/script/bridge/qscriptdeclarativeclass_p.h
index 25dc396..e4c18f5 100644
--- a/src/script/bridge/qscriptdeclarativeclass_p.h
+++ b/src/script/bridge/qscriptdeclarativeclass_p.h
@@ -107,6 +107,7 @@ public:
PersistentIdentifier(const PersistentIdentifier &other);
PersistentIdentifier &operator=(const PersistentIdentifier &other);
+ QString toString() const;
private:
friend class QScriptDeclarativeClass;
PersistentIdentifier(QScriptEnginePrivate *e) : identifier(0), engine(e), d(0) {}
@@ -126,6 +127,7 @@ public:
PersistentIdentifier createPersistentIdentifier(const Identifier &);
QString toString(const Identifier &);
+ bool startsWithUpper(const Identifier &);
quint32 toArrayIndex(const Identifier &, bool *ok);
virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &,