[Marble-devel] Qt namespace patch

Martin Koller kollix at aon.at
Tue Aug 12 13:49:05 UTC 2014


Hi,

to be able to compile the (Qt-only) marble lib when using a self-compiled
Qt5 which was configured with a namespace (configure -qtnamespace MyNameSpace ...)
one has to use the Qt macro QT_FORWARD_DECLARE_CLASS when forward declaring a Qt class
(or directly including the class header), so e.g. instead of
class QString;
one needs to write
QT_FORWARD_DECLARE_CLASS(QString)

Note that using this macro makes sure it compiles with or without namespace.

The attached patch does this for all marble files
(some files needed to be tweaked manually as the QT_FORWARD_DECLARE_CLASS macro needs to be known
by a header, so sometimes it's simpler to just include the Qt header directly instead of doing an include
of the header containing the macro and then using QT_FORWARD_DECLARE_CLASS)

Hope you can integrate it.

-- 
Best regards/Schöne Grüße

Martin
A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?

()  ascii ribbon campaign - against html e-mail 
/\                        - against proprietary attachments

Geschenkideen, Accessoires, Seifen, Kulinarisches: www.bibibest.at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: namespace.diff
Type: text/x-patch
Size: 61798 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20140812/3e52f755/attachment-0001.diff>


More information about the Marble-devel mailing list