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. Qt creator -- turn off warnings for gint, etc

Qt creator -- turn off warnings for gint, etc

Scheduled Pinned Locked Moved Qt Creator and other tools
8 Posts 2 Posters 5.2k 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.
  • C Offline
    C Offline
    cbrake
    wrote on last edited by
    #1

    When I have code that references glib types, the code is underlined and if I mouseover, I get warnings like:

    "gint is not a type name"

    Is there any way to convince qt creator that this is OK?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Make the location of the relevant headers known to creator and include them properly in your code. Creator should not mind any types it sees the headers for.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cbrake
        wrote on last edited by
        #3

        the headers would be in /usr/include/glib-2.0/glib.h, etc. Where in Qt Creator do I configure this?

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          cbrake: You will have to edit your .pro-File.

          We try hard to not break things for comandline users. So creator relies heavily on the buildsystem used in the project (usally qmake with its .pro-files).

          1 Reply Last reply
          0
          • C Offline
            C Offline
            cbrake
            wrote on last edited by
            #5

            This is actually a autotools project, so there is no .pro file. I'm just using qt-creator as an editor/debugger, and it seems to know how to run Make, etc.

            I'm pretty sure this is an Qt Creator editor/indexer warning, not a compiler warning, but I could be wrong.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on last edited by
              #6

              In autotools projects you will need to edit one of the helper files Creator uses. Check *.includes. The Syntax is really simple: Just put one include dir per line.

              You should probably want to update the other <PROJECTNAME>* files (leave the one ending in .user alone!), too. The names should be pretty descriptive and the syntax generally is one item per line. Creator's code completion and syntax highlighting will be severly crippled if you do not provide the full information on your project.

              1 Reply Last reply
              0
              • C Offline
                C Offline
                cbrake
                wrote on last edited by
                #7

                ahh, very good -- the following gets rid of most of the messages. It can't figure out gint64, but then neither can ctags ...

                /usr/include/gtk-2.0
                /usr/include/glib-2.0
                /usr/include/glib-2.0/glib
                /usr/include/glib-2.0/gio
                /usr/include/glib-2.0/gobject

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tobias.hunger
                  wrote on last edited by
                  #8

                  Great that creator works for you!

                  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