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

Inversed result when testing QFileSystemModel::permissions() with flag QFile::WriteUser

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 4.7.3, 4.8.0
    • None
    • Mandriva Linux 2010.2 x86_64
      Mandriva Linux 2010.2 i586

    Description

      using QFileSystemModel, I wrote this to test permissions of some files :

      QFileSystemModel* fsModel = new QFileSystemModel (this);

      [...]

      bool isWritable = fsModel->permissions (index).testFlag (QFile::WriteUser);

      I noticed that isWritable == true when a file is read only (all files in /usr, /boot...)
      and isWritable == false when user can write into ($HOME/*)
      so flag is "inversed"

      I got no such problem using QFileInfo::permissions () : result is OK.

      a French discussion here -> http://www.qtfr.org/viewtopic.php?pid=79229#p79229

      forum member BBenj said that he found same issue with Qt for Mac OS

      Thank for your answer

      PPJ aka Gilles

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            papajaac Gilles Pascual
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes