Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

Get rid of includes

$
0
0
If there is one thing I really get annoyed over in C/C++ it’s the includes. Why on earth would we have to handle all that crap manually? My solution to this problem when doing embedded programming with AVR-GCC was to put all includes I ever needed in a file “includes.h” and then add “includes.h” to all source files. As it’s legal to declare something infinite times it should be okey, I guess? However, this doesn’t work in Qt as it seems. If the includes for a GUI arent “directly” included in mainwidow.cpp a lot of weird stuff happens. For instance it was impossible to connect slots from the buttons in the GUI. So, is there a way to get rid of the includes? Basically, I just want to include it all, all libraries and all my other header files automatically. If would never give my own function a name from the library anyway, as that is just bound to create confusion. Is this done alot, or why is the tedious include process ever present? I think it’s completely ridicolous having to go 1971 and add a new header manually to all source files.

Viewing all articles
Browse latest Browse all 13965

Trending Articles