[QBS] System-wide configuration
christian.kandeler at digia.com
Fri Aug 2 18:13:14 CEST 2013
On 08/02/2013 02:44 PM, Ruslan Nigmatullin wrote:
> 02.08.2013, 16:17, "Christian Kandeler" <christian.kandeler at digia.com>:
>> On 08/01/2013 03:26 PM, Ruslan Nigmatullin wrote:
>>> Currently it's impossible to configure QBS by package systems like rpm/dpkg as it doesn't support system-wide configuration files and reads configs only from home directory. That makes impossible to install qbs package and use it for building some software in building system without changing of qbs configuration in home directory.
>>> Would qbs sometime support reading configs from /etc/xdg/QtProject/qbs.conf and possibly from /etc/xdg/QtProject/qbs/*.conf (the last option is need for ability install independently profiles gcc.conf, clang.conf, qt5.conf, qt4.conf, etc)?
>> Yes, the general idea makes sense. I'll put it on my short-term to-do list.
> If I would like to implement it myself - how to obtain system configuration directory? QSettings doesn't support reading configuration from qbs/*.conf. In Qt5 I can just use QStandardPaths to find all $base/qbs/*.conf files, but Qt4 has no such way (QDesktopServices had no config-path support).
> Should multi-files configuration reading be implemented as special case for Unix-like host systems (with xdg-compatible behaviour)?
For the first iteration, I would suggest just using
QSettings::SystemScope, which maps to one system-wide config file. We
can discuss the other issue separately (perhaps different QSettings
objects per profile?).
More information about the Qbs