Best practice for libraries supporting both Qt4 and Qt5

David Faure faure at kde.org
Thu Dec 12 18:43:14 GMT 2013


On Sunday 01 December 2013 14:18:35 Thiago Macieira wrote:
> On domingo, 1 de dezembro de 2013 13:42:15, Rex Dieter wrote:
> > Allan Sandfeld Jensen wrote:
> > > On Thursday 28 November 2013, Michael Palimaka wrote:
> > >> Any thoughts?
> > > 
> > > In an ideal world we would convince the distros to enable Qt namespace
> > > on
> > > Qt5, so that Qt4 and Qt5 symbols does not clash, and does not cause
> > > crashes when loaded as plugins etc.
> > 
> > Sounds pretty nice, wonder why that is not enabled by default then.
> 
> Because trying to load two different builds into the same process space is
> likely going to cause a lot more headache than you anticipate, even with the
> namespace sharing.
> 
> For one thing, both Qt will try to own the event loop.

And we'd have a massive porting ahead of us, from
class QLineEdit;
to
QT_BEGIN_NAMESPACE
class QLineEdit;
QT_END_NAMESPACE

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5





More information about the kde-core-devel mailing list