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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Invalid
    • Affects Version/s: 5.12, 5.15, 6.2
    • Fix Version/s: None
    • Component/s: GUI: Look'n'Feel
    • Labels:
      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
        2. qicon-test.py
          0.4 kB
        For Gerrit Dashboard: QTBUG-96113
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            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