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. [Solved] QtCreator code completion not working when invoking constructors with enclosing braces
Forum Updated to NodeBB v4.3 + New Features

[Solved] QtCreator code completion not working when invoking constructors with enclosing braces

Scheduled Pinned Locked Moved Qt Creator and other tools
6 Posts 2 Posters 1.2k Views 1 Watching
  • 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.
  • N Offline
    N Offline
    nick85
    wrote on last edited by
    #1

    Hi all,

    I have a problem with QtCreator and my coding style.
    I'm using QtCreator 3.2.2.

    Both code completion and syntax highlighting do not work properly when invoking a constructor with enclosing braces.
    For example:

    @class C
    {
    public:
    C() {}
    ~C() {}

    void foo() {}
    

    };

    C * myobj1 = new C();
    myobj1->foo(); // code completion does not show

    C * myobj2 = new C;
    myobj2->foo(); // code completion is properly shown
    @

    After initializing myobj1, when I access it through the arrow operator no code completion is available.
    Additionally, myobj1 is not properly highlighted according to syntax highlighting.

    Is there a solution to this issue or do I have to resort to omitting the enclosing braces?
    Thanks in advance

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

      It's slightly safer not to use those parentheses, see "this":http://stackoverflow.com/questions/620137/do-the-parentheses-after-the-type-name-make-a-difference-with-new.

      But Qt Creator should still work in both cases. I have verified and I get this behaviour with Qt Creato 3.2.2. Please try with newest release (3.3) and if it is still there, please file a bug report.

      (Z(:^

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nick85
        wrote on last edited by
        #3

        I found following "BUG":https://bugreports.qt.io/browse/QTCREATORBUG-13122.
        It seem to be closed with QtCreator 3.3.0.
        I will try with 3.3.0 (at the moment qt site is down :O)!

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

          Yes, the security protocol is being updated on the server and the site is not stable at the moment.

          Ok great, so it is probably fixed.

          (Z(:^

          1 Reply Last reply
          0
          • N Offline
            N Offline
            nick85
            wrote on last edited by
            #5

            issue is solved in QtCreator 3.3.0!
            thanks!

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

              Great, happy further coding :-)

              (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