[Development] QStandardPath search paths
thiago.macieira at intel.com
Wed Jul 31 19:55:02 CEST 2013
On quarta-feira, 31 de julho de 2013 16:33:31, Hausmann Simon wrote:
> I wonder what Filesystem folks think about it (especially Andreas, who was
> around when I added the search dirs with Girish)
My opinion is that the search path feature is at the wrong level of
abstraction. It's also a potential security issue, since filename handling
might not catch the opening of files outside the specified user parameters. It
makes the determination of whether a given file path is absolute or not
Those problems are shared by the file engines. Which we've fortunately got rid
of for Qt 5.
In my opinion, the *correct* way of searching for a file is
QStandardPaths::locate. If you need to determine whether the file should be
opened or not, the API can return you an absolute file name, which you can
This level of feature should be present on a VFS layer, above QFile and QDir.
So I'd like us to decide first: either we deprecate the search path
functionality completely, or we accept them and use them. If we accept them
for use, then I'm ok with adding the QStandardPaths there. Collisions with
what users may have added are not important.
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the Development