How to use QT Creator code parser to parse .h or .cpp files?



  • Hi,

    I'm trying to build a plugin for qt creator that generates "implementation" for an interface provided by third party.
    Basically there is a collection of .h files that the plugin has to parse and based on the classes defined in those interfaces the plugin should create .cpp files with the classes names and give dummy implementation of the methods specified in that interface.

    I saw that qt creator is using a rock solid code parser in terms of parsing files and determine what symbols (variables, methods ....) are present in a file (.h or .cpp).

    I'm wondering how can I connect to that parser and trigger parsing of a file at a specified path.

    If someone here could give me some help I'll really appreciate it.

    Thanks


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Not a direct answer but you should take a look at Qt Creator's ClangCodeModel plugin, that might give you hints to get started.

    Hope it helps



  • thanks, will try to see if I can get something out of that plugin. :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.