[Qt-creator] [Qbs] qbs project file parser

Christian Kandeler christian.kandeler at qt.io
Mon May 28 10:25:00 CEST 2018


On Mon, 28 May 2018 00:39:29 +0530
sanjay chopra <sanjuchopracool at gmail.com> wrote:

> I am thinking of writing a plugin for qtcreator which shows assembly output
> of ource at the time of editing(like godbolt.org), I am using qbs as build
> system. Qbs can have different build setting(compiler flags) for each
> source file, is there any library for parsing qbs file and read settings
> (compiler flags) for a source file in project ?‚Äč

You can retrieve this information via the qbs API. In fact, Creator's code model does exactly that. If you are writing a Qt Creator plugin, then the most sensible option is probably to get that information from the code model. That way, your plugin will work independently of the build system. (I do not know whether the code model currently exports the information, but if it does not, that can probably be changed if you present a good use case.)


Christian



More information about the Qt-creator mailing list