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. Is auto completion support for smart pointers and vector objects planned?

Is auto completion support for smart pointers and vector objects planned?

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 2 Posters 2.3k 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.
  • P Offline
    P Offline
    pwnstar23
    wrote on last edited by
    #1

    I am trying to use Qt Creator as my main IDE for everything but this is something that keeps stepping on my toes. Is there any planned support for auto completion when using vector ( maybe all stl containers ) and smart pointers?

    Also the syntax highlighting doesn't work on these as well.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pwnstar23
      wrote on last edited by
      #2

      Is there a way to get this working? Or do these features just not exist?

      1 Reply Last reply
      0
      • JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #3

        Hi,

        What is your OS?

        What version of Qt Creator are you running?

        What Qt kit is your project using?

        It works for me. I have Qt Creator 2.8.1 on Windows 7 32-bit. My kit is Qt 5.1.1 for MSVC 2010 32-bit with ANGLE.

        When I type "std::" I am offered a list of standard stuff (abort, abs, acos...).

        After I declare "std::vector<int> vec;" when I type "vec.", I am offered a list of types and functions for std::vector (allocator_type, assign, at...)

        Syntax highlighting works fine for me too.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply
        0
        • P Offline
          P Offline
          pwnstar23
          wrote on last edited by
          #4

          Fedora KDE 64bit
          Latest Qt SDK 5.1.1 QtCreator 2.8.1
          GNU g++

          try

          class MyClass
          {
          public:
          MyClass();

             void SomeFunc();
          

          //... other stuff
          };

          std::vector< MyClass > vec;

          vec[0].SomeFunc(); // auto completion will not show up here and syntax highlighting won't either ( maybe just if its unique_ptr inside the vector, can't remember atm )

          also

          unique_ptr< MyClass > pMyClass( new MyClass() );

          pMyClass->SomeFunc(); // auto completion and syntax highlighting doesn't work here either.

          1 Reply Last reply
          0
          • JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            You're right, it doesn't work for me either.

            I think the issue is related to having multiple layers of typedefs and typenames within the standard template (at least that's how MSVC's vector template was implemented; not sure about g++). Qt Creator seems to stop following them after a few layers. In contrast, the QVector header is much cleaner and doesn't have so many layers: https://qt.gitorious.org/qt/qt/source/src/corelib/tools/qvector.h

            Feel free to file a bug report at http://bugreports.qt-project.org/ -- I'm sure many others are interested in this functionality too.

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            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