On Mon, Mar 3, 2014 at 4:17 PM, Jason H <[email protected]> wrote: > So Qt comes along and helps kick C++ into the modern era. I was wondering > if we could use Qt Creator to address one of my remaining complaints of C++. > > I really like languages like Python, C#, and Java where there is only an > implementation file. While we can't get rid of headers, it would be cool if > we could define a class file that gets split by QtCreator or qmake that > would prepare the .h and .cpp files from a unified file. > > Creator helps with the maintaining the header and the C with the light bulb, > but this isn't as elegant as having one file that controls both. I'm > wondering if its possible and f clang would be any help in reaching this new > level of elevating C++?
It's certainly POSSIBLE to do... It'd have to be done at both the qmake level and the QtC level, with a custom compiler rule that takes .cppm (for "C++ merged") from a MERGEDSOURCES variable, generates .h/.cpp files, and adds them to the HEADERS and SOURCES rules. You'd have to implement a custom compiler (possibly using libclang) to parse the AST and generate a those output files, and you'd have to implement a QtC plugin that recognized a .cppm file as containing stuff that you'd want autocompletion for. Sounds like a pain in the butt to me, and I'm the one already implementing a C++ compiler from scratch. /s/ Adam _______________________________________________ Qt-creator mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/qt-creator
