Hi Martin,
I see the problem you're facing and appreciate the work you put into the
patch. However I am concerned about maintaining (read: not breaking) it
in the future.
The real problem IMHO is that Qt does not (really) use namespaces in the
first place. The ability to change that dynamically with a configure
option seems insane to me and asks for trouble (like here, shifting
additional work on Qt dependent libraries).
Regards,
Dennis
Am 12.08.2014 15:49, schrieb Martin Koller:
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.
_______________________________________________
Marble-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/marble-devel
_______________________________________________
Marble-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/marble-devel