Re Windows,
the QDesktopServices::StandardLocation enum handles the system paths. Config 
*is* data, and goes into the correct place according to application/user data
HomeLocation/(yourdir or .yourdir)- user config / data (dot is a unix 
convention)
DataLocation - application system wide config

Also, the registry is a storage location. Speaking of which QSettings might be 
a valid mechanism for your software as well, since that is the Windows Way. 
Personally, I'd put any config in the registry that other programs would need 
to use, and use a config file for the rest. QSettings supports that too.



----- Original Message -----
From: David Faure <[email protected]>
To: [email protected]
Cc: 
Sent: Wednesday, August 17, 2011 7:50 AM
Subject: [Qt5-feedback] Standard paths

QDesktopServices currently has storageLocation(StandardLocation) which only 
returns a user-writable location (following the XDG standard, on x11).

I would like to
1) extend this to return the path for configuration files (XDG_CONFIG_HOME on 
x11)
2) extend this to also return system paths where files can be read from, i.e. 
methods that return a QStringList rather than just a QString
(using XDG_DATA_DIRS and XDG_CONFIG_DIRS, on x11)
3) move the whole feature to QtCore rather than QtGui.

For source compatibility reasons, my idea would be to create a 
QCoreDesktopServices, and let QDesktopServices inherit from it, and move the 
location-related methods to the Core class. This way, existing code that uses 
QDesktopServices will keep compiling.

My current code for this is at 
http://www.davidfaure.fr/2011/qcoredesktopservices.h

In terms of implementation, I wonder if Windows and Mac have "system paths" 
for config and data. Unless I get some input on this, I'll just implement it 
to return the current storageLocation() string.

Any objections/input before I finish this and make a merge request with it?

-- 
David Faure, [email protected], http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).

_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to