[Qt-creator] .pro files parser Interface

Jeandet alexis alexis.jeandet at lpp.polytechnique.fr
Wed Dec 12 13:50:24 CET 2012


Le 12/12/2012 13:23, Konstantin Tokarev a écrit :
>
> 12.12.2012, 14:23, "Jeandet alexis" <alexis.jeandet at lpp.polytechnique.fr>:
>> Hello,
>>
>> I would like to write a Qt-creator plugin for flashing some
>> microcontrollers(such as CortexM family or Leon3) because I also use
>> Qt-creator as standalone IDE without Qt library. I've read this good
>> introduction
>> http://www.vcreatelogic.com/downloads/files/Writing-Qt-Creator-Plugins.pdf
>> and I'm able to run a simple plugin.
>> But in my case I would like to access pro/pri files from my plugin, I've
>> looked inside Qt-creator source and specially inside Qt4ProjectManager
>> plugin, I've found some informations in Qt4ProFileNode class and
>> Qt4Project::update*Model.
> It would be great if your plugin was NOT bound to Qt4ProjectManager by design.
Yes this is also my feeling.
> This may require adding new APIs to ProjectExplorer, depending on data you'd
> like to access.
>
In my case I need to get some customs variables in pro/pri files. They 
look like:

CPU=stm32f4xxxG
BSP=STM32F4Discovery
DESTDIR=somepath

My plugin would use them to find the binary file to load (This could be 
done with /ProjectExplorer::RunConfigurations/  I think), but it need to 
know the CPU target and the the BSP to use the good tool and protocol to 
flash the target.

The problem is that they are in different files => I need to follow 
inclusion and sometime I need to evaluate qmake functions such as 
"contains(variablename, value)". I would prefer to use the same API as 
QtCreator,qmake,...  if there is one?


Thanks,
Alexis.



More information about the Qt-creator mailing list