We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qt .ui 生成的头文件未出现在 compile_commands.json 中,vscode分析某个cpp文件只会在 compile_commands 和 includePath 中二选一,导致即使手动添加了 .gen 下的头文件路径依然无法识别。
compile_commands.json 中添加生成的头文件
The text was updated successfully, but these errors were encountered:
暂时还不支持,因为用了 rules 里面 on_xx 脚本生成的 ui 处理,没法生成到文件,这块要支持起来比较麻烦,但也不是完全不行,需要花时间弄,短期内支持不了
不过后续版本,我会考虑改进它。暂时先排到v2.5.2版本,具体等到时候再看情况。
Sorry, something went wrong.
我看了下,qt ui生成的 -I 头文件路径,原本就在 compile_commands.json 里面,没啥问题,只不过从 .ui 到 .h ,需要走一遍编译才能生成,单纯的生成 compile_commands ,没有编译过程,是不会生成 .h 的。。
只要先自己过一遍 编译,然后生成的 compile_commands.json 就可以正常找到了。。
["/usr/local/bin/ccache", "/usr/bin/xcrun", "-sdk", "macosx", "clang", "-c", "-Qunused-arguments", "-arch", "x86_64", "-mmacosx-version-m in=10.15", "-isysroot", "/Applications/Xcode.app/Contents/Developer/Platform s/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk", "-fvisibility=hidden", "-f visibility-inlines-hidden", "-O3", "-std=c++11", "-I/Users/ruki/projects/per sonal/xmake/tests/projects/qt/widgetapp/build/.gens/demo/macosx/x86_64/relea se/rules/qt/ui",
-I/Users/ruki/projects/per sonal/xmake/tests/projects/qt/widgetapp/build/.gens/demo/macosx/x86_64/relea se/rules/qt/ui",
[ 14%]: compiling.qt.ui src/mainwindow.ui /Users/ruki/Qt/5.15.0/clang_64/bin/uic src/mainwindow.ui -o build/.gens/demo /macosx/x86_64/release/rules/qt/ui/ui_mainwindow.h
No branches or pull requests
描述问题
qt .ui 生成的头文件未出现在 compile_commands.json 中,vscode分析某个cpp文件只会在 compile_commands 和 includePath 中二选一,导致即使手动添加了 .gen 下的头文件路径依然无法识别。
期待的结果
compile_commands.json 中添加生成的头文件
相关环境
The text was updated successfully, but these errors were encountered: