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

Add option to QXmlStreamWriter for enclose attribute values with single quote

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 5.15.0
    • None
    • All

      An option to choose between single quoted or double quoted attribute values could be desirable.

      With single quote, qDebug() logging facilities do not escape the quoting. Sure we can use qDebug("%s", ...); but it's remove advantages of using the qDebug() << ...;

      Also, double quoting make the task of copying output of QXmlStreamWriter to paste it in a .cpp file more tedious unless escaped, but if escaped, the logging output become tedious to read.

       

      "<?xml version=\"1.0\" encoding=\"UTF-8\"?><stream:stream xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" id=\"id\" from=\"ex.com\" to=\"foo@ex.com\" version=\"1.0\" xml:lang=\"en\">"

      vs

      "<?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='id' from='ex.com' to='foo@ex.com' version='1.0' xml:lang='en'>"

      Yeah it's estheticism but I like estheticism

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

            Unassigned Unassigned
            xakz Sasha Chiu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes