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

QDomDocument missing parameter names in `toString()` and `toByteArray()`

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4: Low
    • 6.8.0 FF
    • 6.6.3
    • XML: DOM
    • None
    • All
    • 9785ffe94 (dev), f4cb42ed0 (dev)

    Description

      In qdom.h:

          // Qt extensions
          QString toString(int = 1) const;
          QByteArray toByteArray(int = 1) const;
      

      While not ideal that public-facing methods have nameless parameters, it is not a major problem, as the Doxygen documentation is populated in the definition file.

      However, PySide, via Shiboken, does attempt to source parameter names automatically from the target header files. Since the names are missing, arg__1 placeholders are automatically provided in the Python bindings for these two methods (see https://doc.qt.io/qtforpython-6/PySide6/QtXml/QDomDocument.html#PySide6.QtXml.PySide6.QtXml.QDomDocument.toString).

      Although PySide could work around it [by modifying the function in the value type to provide names manually], it would probably make sense to apply the fix in Qt instead, which could be as trivial as:

            // Qt extensions
      -     QString toString(int = 1) const;
      -     QByteArray toByteArray(int = 1) const;
      +     QString toString(int indent = 1) const;
      +     QByteArray toByteArray(int indent = 1) const;
      

      Attachments

        Issue Links

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

          Activity

            People

              sgaist Samuel Gaist
              christian.aguilera.foundry Christian Aguilera
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes