Bug 560680 - Indexer not indexing qt5 include directories with meson build
Summary: Indexer not indexing qt5 include directories with meson build
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: 9.10.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-02 03:21 EST by Manuel Vögele CLA
Modified: 2020-03-02 19:45 EST (History)
3 users (show)

See Also:


Attachments
Minimal meson proejct building qt (513 bytes, application/zip)
2020-03-02 03:21 EST, Manuel Vögele CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Vögele CLA 2020-03-02 03:21:54 EST
Created attachment 281975 [details]
Minimal meson proejct building qt

When specifying qt5 as a dependency in a meson project this implies new include directories from which includes like <QApplication> are loaded. The indexer doesn't take these directories into account, leading to unresolved includes.

Steps to reproduce
1. Open the attached meson project in eclipse.
2. Build the project
3. Even though the project successfully builds the includes <QApplication> and <QWidget> are marked as unresolved imports and autocompletion won't work ok Qt objects.
Comment 1 Jonah Graham CLA 2020-03-02 08:38:28 EST
Jeff, can you comment on this?
Comment 2 Jeff Johnston CLA 2020-03-02 19:45:10 EST
(In reply to Jonah Graham from comment #1)
> Jeff, can you comment on this?

I have taken a look.

On my machine, I needed to set cpp_std 'c++11'

Using the M3 EPP, it does show the QApplication and QWidget includes in the Outline viewer as headers of main.cpp correctly, however, clicking to open either of them does not invoke a C/C++ Editor and from that point you can't click on the headers that they include.

I did debug to show that the include paths were added successfully as part of scanner info collection.  I will start looking at the Outline open action to see why it didn't assume the file was a C++ header.