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

QIcon::fromTheme() does not support all the xdg icon-theme directories nor XPM icons

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.1.0 , 5.1.1, 5.2.0
    • Fix Version/s: Some future release
    • Component/s: GUI: Look'n'Feel
    • Labels:
      None
    • Environment:
      Ubuntu 13.10
    • Commits:
      f6f797a6c3b794d14c312855bacc8b5b89ea6127

      Description

      Icon Theme Specification (http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html) states that /usr/share/pixmaps should be one of the default paths to search for icons. Currently QIconLoader does not support loading icons from this directory.

      The spec also says that XPM icons must be supported (although for backwards compability reasons).

      In order to load icons from ~/.icons and /usr/share/pixmaps QIconLoader must also implement a fallback to load icons directly from base dirs (as stated in the spec).

      I've prepared patches to fix these missing functionalities.

      QGenericUnixTheme::xdgIconThemePaths: add /usr/share/pixmaps:
      https://codereview.qt-project.org/63987

      QIconLoader::findIconHelper: also search for XPM images:
      https://codereview.qt-project.org/63988

      QIconLoader::loadIcon: search icons directly from base dirs:
      https://codereview.qt-project.org/63989

      Add QIcon::fromTheme() unit tests:
      https://codereview.qt-project.org/63990

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              dfaure_kdab David Faure
              Reporter:
              wellark Antti Kaijanmäki
              Votes:
              5 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews