Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Auto location of routines in Qt creator
QtWS25 Last Chance

Auto location of routines in Qt creator

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
creatorlocator functio
5 Posts 2 Posters 1.7k 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.
  • K Offline
    K Offline
    koahnig
    wrote on last edited by
    #1

    I have a rather large class with numerous of short access routines. Therefore, I had decided to inline implementations for those access routines.
    Since the class declaration including the inline after the class declaration grew out of proportion I decided to the whole header file into two sections. One section holds only the class declaration (MyClass_decl.h) and the other section holds the inline routines (MyClass_impl.h). My initial large header file shrinks to basically two entries including those new header header files.

    MyClass.h

    #include "MyClass_decl.h"
    #include "MyClass_impl.h"
    

    The header "MyClass.h" is included whereever I need as before.
    Compilation and all works fine. However, I have problems with Qt creator's locator functionality. When placing the cursor on an access routine and pressing F2 I can find only the access routines declaration in the header file, now "MyClass_decl.h", but not the actual implementation in "MyClass_impl.h". Also when placing the cursor on the inline implementation the actual calls to the access function in my source are not found. Overall this is getting quite a nusiance.

    Has anyone mastered to convince Qt creator to operate as traditionally in such setups?

    Vote the answer(s) that helped you to solve your issue(s)

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

      I didn't ;-) One idea that comes to my mind is to try it out with clang code model vs. the standard one. Maybe one will work better than the other in that regard.

      (Z(:^

      K 1 Reply Last reply
      2
      • sierdzioS sierdzio

        I didn't ;-) One idea that comes to my mind is to try it out with clang code model vs. the standard one. Maybe one will work better than the other in that regard.

        K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        @sierdzio

        Super!

        That does the trick.

        At first I looked around for changing to clang code model and found a setting that could not be activated because clang code model plugin was not loaded. After activation/loading of clang code model plugin the locator does what I need.

        I needed to include "MyClass_decl.h" also in "MyClass_impl.h" otherwise the plugin was complaining.

        At the moment I saw only that loading the proejcts took ages, but could be a result of first loading process. Will keep an eye on this part.

        Thanks a lot.

        Vote the answer(s) that helped you to solve your issue(s)

        sierdzioS 1 Reply Last reply
        0
        • K koahnig

          @sierdzio

          Super!

          That does the trick.

          At first I looked around for changing to clang code model and found a setting that could not be activated because clang code model plugin was not loaded. After activation/loading of clang code model plugin the locator does what I need.

          I needed to include "MyClass_decl.h" also in "MyClass_impl.h" otherwise the plugin was complaining.

          At the moment I saw only that loading the proejcts took ages, but could be a result of first loading process. Will keep an eye on this part.

          Thanks a lot.

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          @koahnig said in Auto location of routines in Qt creator:

          At the moment I saw only that loading the proejcts took ages, but could be a result of first loading process. Will keep an eye on this part.

          Yes, many people say that clang model is slower for them. I don't notice that on modern QtC versions (but possibly because I'm on SSD drive & Linux so IO is not a bottleneck).

          (Z(:^

          K 1 Reply Last reply
          0
          • sierdzioS sierdzio

            @koahnig said in Auto location of routines in Qt creator:

            At the moment I saw only that loading the proejcts took ages, but could be a result of first loading process. Will keep an eye on this part.

            Yes, many people say that clang model is slower for them. I don't notice that on modern QtC versions (but possibly because I'm on SSD drive & Linux so IO is not a bottleneck).

            K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            @sierdzio

            It is the latest version of Qt creator (4.2.1), but unfortunately with the debugging issue for standard containers. I did not manage to install a previous version in addtion, yet.

            I do not have an SSD yet. Still on the wishlist as basically the whole new machine is. :(

            Vote the answer(s) that helped you to solve your issue(s)

            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