wrong error squiggles mark when multiply namespaces with same name exist
Environment
- OS and Version: Ubuntu 20.04.3 LTS
- VS Code Version: 1.84.1
- C/C++ Extension Version: 1.18.2(both release and pre-release version tested)
- If using SSH remote, specify OS of remote machine: local machine
Bug Summary and Steps to Reproduce
Bug Summary: doing QtTest tutorial3 (see@https://doc.qt.io/qt-6/qtest-tutorial.html ), code hint does not work, and error squiggles show
Steps to reproduce:
- copy tutorial3 code
- rewrite CMakeLists.txt to fit qt5, see my additional comments
- compile
- See error
Expected behavior: error squiggles appears at 'QTest::keyClicks(&lineEdit, "hello world");' says ' namespace "QTest" has no member "keyClicks" '
Configuration and Logs
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"./build/tutorial2_autogen/include/",
"/usr/include/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++14",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}
Other Extensions
No response
Additional context
CMakeLists.txt code:
cmake_minimum_required(VERSION 3.16)
project(tutorial1 LANGUAGES CXX)
set(CMAKE_PREFIX_PATH "/home/Qt/5.15.2/gcc_64")
set(Qt5_DIR "${CMAKE_PREFIX_PATH}/lib/cmake/Qt5")
find_package(Qt5 REQUIRED Core Gui Test Widgets)
set(CMAKE_AUTOMOC on)
set(CMAKE_AUTORCC on)
set(CMAKE_AUTOUIC on)
add_executable( tutorial2 testgui.cpp )
target_link_libraries(tutorial2 Qt5::Core Qt5::Gui Qt5::Test Qt5::Widgets )
Another thing is that you need to compile to generate "testgui.moc", otherwise error squiggles will appear at this line
@HuajijunCc Could you please provide a screenshot of what you are seeing? I am having trouble reproducing your issue.
This issue has been closed because it needs more information and has not had recent activity.