Bug 466253 - QT UIC autogenerated header support
Summary: QT UIC autogenerated header support
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: Code completion (other bugs)
Version First Reported In: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-22 17:57 UTC by I don't need a name
Modified: 2023-02-22 21:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
screenshot of some errors appearing in default template (54.43 KB, image/png)
2023-02-22 17:57 UTC, I don't need a name
Details

Note You need to log in before you can comment on or make changes to this bug.
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.