qt5base-lts/qmake/doc
Francois Ferrand fabedd399e Introduce OBJECTIVE_HEADERS
When a ObjC++ QObject subclass is listed in the regular HEADERS, qmake
creates a .cpp file. The moc file will then fail to compile, as it
requries ObjC++ headers. Using Q_FORWARD_DECLARE_OBJC_CLASS() can be
used to let the class be parsed by The compiler, but link will still
fail, as the generated methods (e.g. signals) must be built with ObjC++
compiler, in case they have ObjC parameters:

 Q_FORWARD_DECLARE_OBJC_CLASS(NSString);

 class MyClass: public QObject {
     Q_OBJECT
 signals:
     void objcSignal(NSString * myObj);
 };

The canonical workaround for that is including the .cpp file into the
corresponding .mm file. This also offers a compilation speed advantage,
but is somewhat counter-intuitive.

Therefore, we introduce a separate variable which instructs moc to create
.mm files directly.

Task-number: QTBUG-1581
Change-Id: Ia98af58006efd168ea37f3a63c396979e7e81baa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-25 12:15:36 +00:00
..
images Doc: Fixed qmake manual's images and snippets directories. 2013-08-13 01:38:54 +02:00
snippets Fixed docs explaining the Frameworks usage 2017-01-06 12:42:24 +00:00
src Introduce OBJECTIVE_HEADERS 2017-08-25 12:15:36 +00:00
qmake.qdocconf Doc: add navigation info to qmake Manual 2014-12-01 20:04:00 +01:00