nemomobile/qtcontacts-sqlite — pull request #90 by martyone (2013-10-25 09:35:35+00:00)
Title: [qtcontacts-sqlite] Fix: Check for read/write capability using QFileInfo

This fixes e4f626a (Check for read/write capability using QFileInfo).

Met the bug while executing commhistory-daemon tests.

QFileInfo::permission(QFile::ReadGroup | QFile::WriteGroup) only checks
file permission bits. It does not honore process' GID. As a result it
always claims the 'privileged' directory is RW to the user, as it is
installed with 0070 mode set.

Note that there is also difference between corresponding QFile::*User
and QFile::*Owner R/W/X flags and it seems Qt API documentation is not
accurate about this - the note about platform difference between Windows
and Unix seems to not be true anymore (not sure though).

Comment replaced because QDir::isReadable() actually supports group
permissions, but there is no QDir::isWritable().