-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 3.2.1
-
None
This issue was raised here: http://qt-project.org/forums/viewthread/36046
cmake_minimum_required(VERSION 2.8.12) project(mactest) find_package(Qt5Core REQUIRED) add_executable(mactest main.cpp) target_link_libraries(mactest Qt5::Core)
#include <QtCore/QObject> #include <QString> int main(int, char**) { QObject o; QString s; }
Because the QObject include is prefixed with 'QtCore/', the include is underlined as an error and there is no completion for the 'o' object. The QString include works fine and there is completion for the 's' object.
My understanding is that unlike on Linux and Windows, on Mac there is no QtCore/QObject file. Instead there is a QObject file in the QtCore framework. The compiler on Mac knows to treat the 'QtCore/QObject' as 'QObject from the QtCore framework', but perhaps creator does not implement that logic or the CMake codeblocks file is not giving sufficient information.
For Gerrit Dashboard: QTCREATORBUG-13137 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
96594,1 | CmakeProject: For the codemodel ignore all and rebuild_cache target | master | qt-creator/qt-creator | Status: ABANDONED | 0 | 0 |
98481,2 | CMakeProject: For the codemodel ignore all and rebuild_cache target | 3.3 | qt-creator/qt-creator | Status: ABANDONED | 0 | 0 |
100164,4 | CMake: Parse OS X Frameworks directories | master | qt-creator/qt-creator | Status: ABANDONED | -1 | 0 |
100278,2 | ProjectPartBuild: Fix framework paths | 3.3 | qt-creator/qt-creator | Status: MERGED | -1 | 0 |