-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.0
-
None
-
d11a15081c6385bb32ce78c8501fc259f56b2be2
In src/declarative/util/qdeclarativepropertymap.h there are lines:
class Q_DECLARATIVE_EXPORT QDeclarativePropertyMap : public QObject { Q_OBJECT public: QDeclarativePropertyMap(QObject *parent = 0); virtual ~QDeclarativePropertyMap(); QVariant value(const QString &key) const; void insert(const QString &key, const QVariant &value); void clear(const QString &key); Q_INVOKABLE QStringList keys() const; ...
but the docs (e.g. http://doc.qt.nokia.com/4.7-snapshot/qdeclarativepropertymap.html) do not list "QStringList keys() const" as one of public functions.
It's really, really nasty that this function is not mentioned in the docs, because this function is incredibly useful: if one just reads only docs then it seems that the only way to loop over all key-value pairs in the map would be to keep track of keys added to the map yourself (which would be a huge overhead)...
UPDATE: it seems to be a problem with all public Q_INVOKABLE functions! For example, src/declarative/qml/qdeclarativecomponent.h has a public function "errorString()" which is not mentioned in the docs (e.g. http://doc.qt.nokia.com/4.7-snapshot/qdeclarativecomponent.html) at all!