[Development] QStandardPath search paths

David Faure faure at kde.org
Thu Sep 5 10:24:24 CEST 2013


On Tuesday 27 August 2013 08:47:18 Juergen Bocklage-Ryannel wrote:
> or the alternative of deprecating search paths. Anyone have an opinion here?
> > My opinion is to deprecate search paths. That's what
> > QStandardPaths::locate is for.
> 
> If this is about QDir::addSearchPath read on:
> 
> We use it for embedded projects to easily change asset paths between
> developer and target environment. I found it always useful to abstract
> away my own asset locations. Maybe we could also use QStandardPaths but
> only if we could add own path locations (which then would not be
> standard anymore).

QStandardPaths doesn't currently allow to add extra search paths, but I've 
been wondering if anyone would need that, indeed.

My fear is that people add paths which don't work on all platforms, but I 
guess if they are constructed relatively to standard paths returned by 
QStandardPath then it's fine.
Or indeed for apps that target only one OS there's no issue.

For apps there's always the solution of wrapping QStandardPaths into your own 
method. But indeed as soon as Qt itself or any Qt-based framework uses 
QStandardPaths, apps have no way to change what that code sees.

So I'm open to something like this (but I won't have time to implement it for 
5.2).

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5




More information about the Development mailing list