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

Invalid warning message in debug builds when using QFont::setFamily() with comma split

    XMLWordPrintable

    Details

    • Commits:
      a2cb9ae8cc (qt/qtbase/dev) a2cb9ae8cc (qt/tqtc-qtbase/dev) a6081a8163 (qt/qtbase/6.4) a6081a8163 (qt/tqtc-qtbase/6.4)

      Description

      When using QFont::setFamily() with a string that has comma in it, an invalid warning message is shown:

      From Qt 6.2, QFont::setFamily() will no long split the family string on the comma and will keep it as a single family
      

      The family is still actually split in Qt 6.2 (and 6.3), so the warning message should be updated for future Qt release when the change is planned to be made again.

      Culprit code in qfont.cpp@844:

      void QFont::setFamily(const QString &family)
      {
      #ifdef QT_DEBUG
          if (family.contains(QLatin1Char(','))) {
              qWarning("From Qt 6.2, QFont::setFamily() will no long split the family string on the comma"
                       " and will keep it as a single family");
          }
      #endif
          setFamilies(splitIntoFamilies(family));
      }
      

        Attachments

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

          Activity

            People

            Assignee:
            jannej Janne Juntunen
            Reporter:
            jussi_witick Jussi Witick
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes