Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25525

QtCreator ctrl+click not work for auto keyword and map iterator, no auto complete

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P0: Blocker
    • None
    • Qt Creator 4.14.0-beta2
    • All Other Issues
    • None

    Description

       QtCreator cannot auto complete. Any one here to figure it out , thanks ?

       

      Test environments:

      Ubuntu18.04 ,also tried 20.04 same issue

      QtCreator4.11.1(Qt5.14.1) ,also tried older version, same issue

      clangcodemode off due to its pool performance, also I have tired enable clangcodemode ,same issue remain... 

      Qtcreator install version: qt-creator-opensource-linux-x86_64-4.14.0-beta2_427.run

      Qt download install version: qt-opensource-linux-x64-5.14.2.run

       

      Code: 

       

      //代码占位符
      #include <unistd.h>
      
      #include <QApplication>
      #include <map>
      #include <memory>
      
      #include <iostream
      #include "mainwindow.h"
      
      struct Point {
        int x;
        int y;
      };
      
      class Test {
       public:
        void func() {}
        int a_;
        std::map<int, Point> m;
      };
      
      int main(int argc, char *argv[]) {
        std::shared_ptr<Test> t1 = std::make_shared<Test>();
        t1->func();  // Works fine.
        auto t2 = std::make_shared<Test>();
        t2->func();  // -> not work
        t2->a_ = 1;  // -> not work
      
        std::map<int, Point> point_map;
        for (int i = 0; i < 10; ++i) {
          point_map[i] = {i, i};
        }
        for (auto it : point_map) {
          std::cout << it.first;     // it. not hint first
          std::cout << it.second.x;  // it.second not hint and .x not hint.
          std::cout << it.second.y;  // it.second not hint and .y not hint.
          std::cout << std::endl;
        }
      
        return 1;
      }
      
      

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            con Eike Ziller
            jowu598 jun yang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes