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

        For Gerrit Dashboard: QTBUG-88781
        # Subject Branch Project Status CR V

        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