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

QIcon::fromTheme returns same icon after QIcon::setThemeName

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.12, 5.15, 6.2
    • GUI: Look'n'Feel
    • None

    Description

      When using `QIcon::fromTheme` to select icons from an icon theme, the cache is overly aggressive and returns the same pixmap after setting the new theme with `QIcon::setThemeName`.

      The attached patch resolves this by clearing the in-memory cache when `setThemeName` is called.

      Attachments

        1. qicon-clear-cache.patch
          0.4 kB
          Rodney Dawes
        2. qicon-test.py
          0.4 kB
          Rodney Dawes
        For Gerrit Dashboard: QTBUG-96113
        # Subject Branch Project Status CR V

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            dobey Rodney Dawes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change