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

Qt5 QIcon::fromTheme() can't load icon themes owned by root

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • Some future release
    • 5.0.0, 5.0.1, 5.0.2, 5.2.0, 5.2.1
    • GUI: Look'n'Feel
    • None
    • Ubuntu 13.04 / 13.10 and Manjaro 0.8.9 (but applicable on any (Linux) OS I believe)

    Description

      I'm using Ubuntu 13.04 / 13.10 and Manjaro 0.8.9 (though this should be the same on any (Linux) OS), using Qt 5.0. When using QIcon::fromTheme("..."), if that icon theme is owned by root, it doesn't load any icon (it can't find the icon theme actually), but if that same icon theme is owned by user, it loads the icons just fine.

      Test case: i used AwOken icon theme, which i copied to home folder. I then used QIcon::setThemeSearchPaths(QStringList() << ("/home/mark/")); and Icon::setThemeName("AwOken"); and then i played with permission on Awoken icon theme. If theme.index file from AwOken was owned by root, it couldn't find any file. If theme.index was owned by user, but the icons were owned by root, it could load some of the icons, and for some it just loaded a null icon (e.g. it didn't load 'exit', but it loaded 'gtk-preferences'). If both the icons and theme.index were loaded by user, everything was ok, it loaded all icons successfully.

      If the icon theme is found in /usr/share/icons, every time QIcon::fromTheme("...") fails...

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            markd Marius Donci
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes