Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    Tools
    2
    5
    1989
    Loading More Posts
    • 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
      pwnstar23 last edited by

      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 Reply Quote 0
      • P
        pwnstar23 last edited by

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

        1 Reply Last reply Reply Quote 0
        • JKSH
          JKSH Moderators last edited by

          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 Reply Quote 0
          • P
            pwnstar23 last edited by

            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 Reply Quote 0
            • JKSH
              JKSH Moderators last edited by

              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 Reply Quote 0
              • First post
                Last post