On Tuesday 22 November 2011, Alexander Neundorf wrote: > On Tuesday 22 November 2011, Stephen Kelly wrote: ... > > This is not uncommon in both KDE and in Qt itself, or any other project > > where it makes sense to put a QObject-inherited class in the _p.h as an > > internally used class. See for example, qplaintextedit.cpp: > > > > #include "moc_qplaintextedit.cpp" > > #include "moc_qplaintextedit_p.cpp" > > > > This should be supported by the automoc feature. > > Yes, it should work. > I'm adding a test.
Test added, works. What is not working right now is including someotherfile.moc. I could add special handling for including thisfile_p.moc (as opposed to moc_thisfile_p.cpp, which works). > > I have also seen places (I think in QtDeclarative) where a foo.cpp file > > included the file moc_bar.cpp, though that is very uncommon. The logic > > that I would use would be something like: > > > > find #include "moc_(.*).cpp" -> generate moc for "\\1.h" > > This should work right now. > I thought there is a test for this. Checking. Test added, works. Can you please update from this branch and see what testcases are missing in QtAutomoc/Tests/ ? Thanks Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers