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

Code completion not working properly on mac + cmake

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • Qt Creator 3.1.0-beta
    • Qt Creator 3.0.1
    • C/C++/Obj-C++ Support
    • None
    • mac osx 10.9
      clang 5.0.0
      cmake 2.8.12.2 (via homebrew)
    • c4ef72dd399bda662b5127b3d3733a0c8c79f054

    Description

      Code completion does not work properly if cmake project is used. The qmake project works correctly, but cmake version miss a few items. And the problem seems to happend on mac + cmake only, the windows version works correctly (mingw).

      Here is the short examples:

      CMakeLists.txt
      cmake_minimum_required(VERSION 2.8.11)
      
      if(APPLE)
          set(CMAKE_MACOSX_BUNDLE ON)
      endif()
      
      project(test)
      
      set(CMAKE_AUTOMOC ON)
      set(CMAKE_INCLUDE_CURRENT_DIR ON)
      
      find_package(Qt5Core REQUIRED)
      
      add_executable(test test.cpp)
      
      target_link_libraries(test Qt5::Core)
      
      test.cpp
      #include <QString>
      #include <QFile>
      #include <QDateTime>
      #include <QtCore/QThreadPool>
      
      struct Test
      {
          QThreadPool pool;
      };
      
      int main()
      {
          QString v;
          // v.toUtf8() is not in the completion popup
      
          QFile f;
          // f.write is not in the completion popup
      
          // QDateTime::currentMSecsSinceEpoch() is not in the completion popup
      
          Test t;
          // t.pool. has no popup
      
          return 0;
      }
      

      Attachments

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

        Activity

          People

            erikv Erik Verbruggen
            steve.k.chiu Steve K. Chiu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes