On Donnerstag, 2. August 2018 15:45:00 CEST Simon Hausmann wrote:
> Hi,
> 
> 
> Before concluding that a namespaced Qt is a terrible idea, I recommend trying 
> out the feature.
> 
> 
> It is intended to work transparently and not require any changes to the 
> application, nothing like having to type MyNS::QString everywhere.
> 
> 
> It may be problematic with forward declarations of Qt types, but the fix for 
> that (surrounding with QT_BEGIN/END_NAMESPACE) is entirely compatible between 
> NS and non-NS builds and does not violate the write once goal.

The correct way to use Qt classes forward declared with (and also without) a 
namespaced Qt build is e.g.:
QT_FORWARD_DECLARE_CLASS(QTimer)

The problem we had with a namespaced Qt were: using external Qt based 
libraries, which never tried to use
a namespaced build, did not build due to forward declarations, so I had to 
patch some of them.
But then, not all external library projects liked these patches so we'd have to 
patch them on our own
increasing the workload when upgrading ...
Also, when using squish you can no longer use a prebuilt version and have to 
compile squish from sources
including also the namespace AFAIR.

Eventually we could go back to non-namespaced builds, which makes your life 
simpler.

-- 
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.lillehus.at


_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to