[Interest] moc not moccing

Stephen Kelly stephen.kelly at kdab.com
Tue May 20 11:32:58 CEST 2014


On Tuesday, May 20, 2014 11:21:19 Konrad Rosenbaum wrote:
> Hi,
> 
> how did you try to build this? Did you use qmake, plain make, cmake, ...?
> 
> However, I think you do need a constructor for classes that are processed
> by moc - at least it is good style to provide one. One like this would be
> sufficient:
> 
> C++-98: NewTest(){}
> C++-11: NewTest()=default;

http://marcmutz.wordpress.com/effective-qt/subclassing/

> 
> Also, it is bad style to declare moc'ed classes in the CPP file. Please
> use headers for this. 

It's common and fine to do this for tests.

Thanks,

-- 
Join us at Qt Developer Days 2014 in Berlin! - https://devdays.kdab.com

Stephen Kelly <stephen.kelly at kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions



More information about the Interest mailing list