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

QAndroidPlatformFontDatabase::populateFontDatabase() executed six times at startup

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.3.0 Beta1
    • GUI: Font handling
    • None
    • Android

    Description

      QAndroidPlatformFontDatabase::populateFontDatabase() is called six times during app startup.

      This should be avoided by the following code in QFontDatabasePrivate::ensureFontDatabase()

      QFontDatabasePrivate *QFontDatabasePrivate::ensureFontDatabase()
      {
          QFontDatabasePrivate *d = privateDb();
          if (d->count == 0) {
              if (Q_UNLIKELY(qGuiApp == nullptr || QGuiApplicationPrivate::platformIntegration() == nullptr))
                  qFatal("QFontDatabase: Must construct a QGuiApplication before accessing QFontDatabase");
      
              initializeDb();
          }
          return d;
      }
      

      but somehow this does not work. d->count is zero when we enter this method. When we exit it, it is 86. Next time we encounter the check, it is zero again. I have no idea what is going on.

      Attachments

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

        Activity

          People

            andreasbuhr Andreas Buhr
            andreasbuhr Andreas Buhr
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes