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

QFont crashes in family() after setFamilies with empty list

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 6.1.0
    • 6.1
    • GUI: Font handling
    • None
    • 8302ca22f42f984a16187fae209bdc1d79bc18da (qt/qtbase/dev)

    Description

      #include <QFont>
      
      #include <QDebug>
      
      
      
      int main(int argc ,char *argv) {
      
        QFont font;
      
        font.setFamilies({}); // perfect fine
      
        qDebug() << font.family(); // ASSERT: "!isEmpty()" in file ...
      
      }
      

      I'm not sure what the correct behavior should be, but asserting is wrong.

      Attachments

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

        Activity

          People

            andysh Andy Shaw
            fabiankosmale Fabian Kosmale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes