Discussion:
[Qt-creator] qbs project file parser
sanjay chopra
2018-05-27 19:09:29 UTC
Permalink
Hi,

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 ?​


*RegardsSanjay*
Christian Gagneraud
2018-05-28 04:06:41 UTC
Permalink
Post by sanjay chopra
Hi,
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 should maybe ask this question on QtCreator mailing list, if it's a QtC
plugin, you shouldn't be Qbs specific.
Surely QtC offers you all the information you need.
Now showing the assembler for an isolated, small piece of code is way
easier than "on the fly" in a C++ project.

Any way interesting.
Post by sanjay chopra
*RegardsSanjay*
_______________________________________________
Qbs mailing list
http://lists.qt-project.org/mailman/listinfo/qbs
Christian Gagneraud
2018-05-28 04:21:12 UTC
Permalink
Post by sanjay chopra
Hi,
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 ?​
If it's for a QtC plugin, you shouldn't be Qbs specific then.Surely QtC
offers you all the information you need.

Chris
Post by sanjay chopra
*RegardsSanjay*
_______________________________________________
Qbs mailing list
http://lists.qt-project.org/mailman/listinfo/qbs
Christian Kandeler
2018-05-28 08:25:00 UTC
Permalink
On Mon, 28 May 2018 00:39:29 +0530
Post by sanjay chopra
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

Loading...