Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-14281

QDeclarativePropertyMap docs do not mention keys() function

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.7.2
    • 4.7.0
    • Documentation
    • 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!

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            jerome.pasion Jerome Pasion
            wiecko Marek Wieckowski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes