Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1918

QUrl.toString() doesn't take QUrl.UrlFormattingOption

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.3.0
    • PySide
    • None

      The QUrl::toString docs specify that the argument is a QUrl::FormattingOptions, also noting that:

      The options from QUrl::ComponentFormattingOptions are also possible.

      and when combining them, that seems to work in PySide6 too:

      >>> QUrl("https://qt.io").toString(QUrl.PrettyDecoded | QUrl.UrlFormattingOption.RemovePassword)
      'https://qt.io'
      

      yet only passing a single UrlFormattingOption does not:

      >>> QUrl("https://qt.io").toString(QUrl.UrlFormattingOption.RemovePassword)
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      TypeError: 'PySide6.QtCore.QUrl.toString' called with wrong argument types:
        PySide6.QtCore.QUrl.toString(UrlFormattingOption)
      Supported signatures:
        PySide6.QtCore.QUrl.toString(PySide6.QtCore.QUrl.FormattingOptions = Instance(QUrl.FormattingOptions(QUrl.ComponentFormattingOption.PrettyDecoded)))
      

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

            crmaurei Cristian Maureira-Fredes
            the compiler Florian Bruhin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes