Bug 466253

Summary: QT UIC autogenerated header support
Product: [Applications] kdevelop Reporter: I don't need a name <vladmak04>
Component: Code completionAssignee: kdevelop-bugs-null
Status: RESOLVED NOT A BUG    
Severity: wishlist CC: mail
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot of some errors appearing in default template

Description I don't need a name 2023-02-22 17:57:29 UTC
Created attachment 156612 [details]
screenshot of some errors appearing in default template

In default QT Widgets template a filename.ui file is created, which is supposed to be translated to a ui_filename.h header file by uic when project is being built. Qt Creator understands this process and doesn't complain about autogenerated header missing. KDevelop, unfortunately, doesn't. It thinks that this file is supposed to exist in project directory. 
This raises plenty of errors and doesn't allow for code completition. I think it would be fairly easy to add support for this feature and make it work like in Qt Creator. Thank you.
Comment 1 Sven Brauch 2023-02-22 19:13:39 UTC
Hi, this works if you properly open your project with build system support, e.g CMake or qmake. That will configure your build folder as include dir, which does contain this file. KDevelop will then find it there.
Comment 2 I don't need a name 2023-02-22 21:35:29 UTC
(In reply to Sven Brauch from comment #1)
> Hi, this works if you properly open your project with build system support,
> e.g CMake or qmake. That will configure your build folder as include dir,
> which does contain this file. KDevelop will then find it there.

Huh, it really works. For some reason it didn't work at the first try with my project and also didn't work immediately with a new one... might be a bug or I'm just stupid. Thanks.
Comment 3 Sven Brauch 2023-02-22 21:44:41 UTC
You need to trigger a build once (just once ever) so your build system generates the files in the beginning, it will only work after that.