42 #include "private/qdeclarativepropertycache_p.h" 44 #include "private/qdeclarativeengine_p.h" 45 #include "private/qdeclarativebinding_p.h" 46 #include <QtCore/qdebug.h> 65 if (propType == qMetaTypeId<QDeclarativeBinding *>()) {
67 }
else if (propType == qMetaTypeId<QScriptValue>()) {
103 const char *returnType = m.
typeName();
195 for (
int ii = methodCount - 1; ii >= 3; --ii) {
205 if (methodNameRef == property) {
240 append(engine, metaObject, -1, propertyFlags, methodFlags, signalFlags);
257 for (
int ii = methodOffset; ii < methodCount; ++ii) {
265 methodName = methodName.
left(parenIdx);
273 data->
flags |= methodFlags;
275 data->
flags |= signalFlags;
300 for (
int ii = propOffset; ii < propCount; ++ii) {
311 data->load(p, engine);
312 data->flags |= propertyFlags;
338 append(engine, metaObject);
389 if (!metaObject || coreIndex == -1)
392 if (flags & IsFunction) {
398 name = name.
left(parenIdx);
423 cache = enginePrivate->
cache(obj);
455 cache = enginePrivate->
cache(obj);
QDeclarativePropertyCache * propertyCache
static QDeclarativeData * get(const QObject *object, bool create=false)
The QHash::const_iterator class provides an STL-style const iterator for QHash and QMultiHash...
#define QT_END_NAMESPACE
This macro expands to.
void clear()
Removes all items from the hash.
void updateRecur(QDeclarativeEngine *, const QMetaObject *)
int count(const T &t) const
Returns the number of occurrences of value in the vector.
QByteArray toUtf8() const Q_REQUIRED_RESULT
Returns a UTF-8 representation of the string as a QByteArray.
IndexCache methodIndexCache
QDeclarativePropertyCache * cache(QObject *obj)
Returns a QDeclarativePropertyCache for obj if one is available.
void update(QDeclarativeEngine *, const QMetaObject *)
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
static QDeclarativeEnginePrivate * get(QDeclarativeEngine *e)
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
PersistentIdentifier createPersistentIdentifier(const QString &)
const T value(const Key &key) const
Returns the value associated with the key.
IdentifierCache identifierCache
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
void resize(int size)
Sets the size of the vector to size.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
QStringRef leftRef(int n) const Q_REQUIRED_RESULT
Returns a substring reference to the n leftmost characters of the string.
AllowedRevisionCache allowedRevisionCache
#define QT_BEGIN_NAMESPACE
This macro expands to.
QString left(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n leftmost characters of the string.
void clear()
Removes all the elements from the vector and releases the memory used by the vector.
static Data create(const QMetaObject *, const QString &)
The QStringList class provides a list of strings.
QDeclarativeMetaType::TypeCategory typeCategory(int) const
Data * property(const QScriptDeclarativeClass::Identifier &id) const
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
void append(const T &t)
Inserts value at the end of the vector.
static const char * data(const QByteArray &arr)
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Type
This enum type defines the types of variable that a QVariant can contain.
void load(const QMetaProperty &, QDeclarativeEngine *engine=0)
QDeclarativeEngine * qmlEngine() const
QStringList propertyNames() const
The QStringRef class provides a thin wrapper around QString substrings.
const T & at(int i) const
Returns the item at index position i in the vector.
QDeclarativeObjectScriptClass * objectClass
QDeclarativeEngine * engine
void append(QDeclarativeEngine *, const QMetaObject *, Data::Flag propertyFlags=Data::NoFlags, Data::Flag methodFlags=Data::NoFlags, Data::Flag signalFlags=Data::NoFlags)
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the hash...
The QDeclarativeEngine class provides an environment for instantiating QML components.
virtual ~QDeclarativePropertyCache()
static QByteArray methodName(const char *signature, int nameLength)
Makes a deep copy of the first nameLength characters of the given method signature and returns the co...
if(void) toggleToolbarShown
iterator begin()
Returns an STL-style iterator pointing to the first item in the hash.
QDeclarativePropertyCache(QDeclarativeEngine *)
Creates a new empty QDeclarativePropertyCache.
The QDeclarativeCleanup provides a callback when a QDeclarativeEngine is deleted. ...
QScriptDeclarativeClass::PersistentIdentifier identifier
void reserve(int size)
Attempts to allocate memory for at least size elements.
The QScriptValue class acts as a container for the Qt Script data types.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
QString toString(const Identifier &)
uint overrideIndexIsProperty
QDeclarativePropertyCache * copy() const
QList< Key > keys() const
Returns a list containing all the keys in the hash, in an arbitrary order.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
static Flags flagsForProperty(const QMetaProperty &, QDeclarativeEngine *engine=0)