Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Force file parsing intellisense
Forum Update on Monday, May 27th 2025

[Solved] Force file parsing intellisense

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    moravas
    wrote on last edited by
    #1

    Hi People,

    First of all: if I know well, the intellisense of the Qt Creator parses only the included files. My question is the following:
    Can I anyway force the intellisense which files should parse?

    Regards,
    Norbert

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      [quote author="moravas" date="1394520475"]Can I anyway force the intellisense which files should parse?[/quote]

      You have answered yourself in the first sentence, didn't you?

      More to the point: do you want to remove some files from being parsed? Or add some additional ones? I don't really understand what you are asking about/ what is your aim here, so it's hard to give you a good answer.

      (Z(:^

      1 Reply Last reply
      0
      • M Offline
        M Offline
        moravas
        wrote on last edited by
        #3

        Hi,

        I would like add files that must be parsed by the intellisense. This is my post about the problem:
        http://qt-project.org/forums/viewthread/38731/
        I didn't get answer so I started a new thread in this section...

        Regards,
        Norbert

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          I don't see any problem in your other thread. If I understand correctly, in your header file you are using forward declaration:
          @
          // header:
          class apple;

          // source:
          #include "apple.h"
          @

          This is standard practice and Qt Creator handles it correctly. It will not allow you to use symbols from apple.h in the header file because they are not visible there: only the source file has all the information.

          (Z(:^

          1 Reply Last reply
          0
          • M Offline
            M Offline
            moravas
            wrote on last edited by
            #5

            Hi,

            not really: the header doesn't contain any forward declaration, just in my example: an inheritance from an unknown type. But: in the compiler viewpoint, the code will be correct because the compiler compiles the .cpp file, which includes the headers in the right order. Let's considering my example
            @
            #include "someclass.h"
            #include "apple.h"
            //...implementation
            @

            in the case above, after the preprocessing, the source will be correct:

            • the "someclass" type is defined before use.

            Let's swap the first and the second line:
            @
            #include "apple.h"
            #include "someclass.h"
            //...implementation
            @

            In that case, you will get an "undefined type error", because the compiler doesn't found the "someclass" type, but you would like to use it.
            And there are a lots of scenario in our project, like that. Why ...? I don't know, but I would like the intellisense to parses explicit given file as well.

            Regards,
            Norbert

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              OK, now it is clearer to me, but I have no answer ;) I think one should always clearly include the headers that a file uses (but I understand that is out of the question in your case, where the project is big and old).

              You could maybe try adding the headers to the INCLUDEPATH, but I doubt that would help.

              (Z(:^

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved