Moving KWayland to frameworks

Kevin Ottens ervin at kde.org
Wed Dec 9 17:14:47 UTC 2015


Hello,

On Wednesday 09 December 2015 10:07:50 Martin Graesslin wrote:
> On Thursday, November 5, 2015 11:10:49 AM CET Kevin Ottens wrote:
> > Hello,
> > 
> > On Thursday 05 November 2015 10:50:06 Martin Graesslin wrote:
> > > There are two things which make the move to frameworks difficult and I
> > > don't see a solution to it at the moment:
> > > 
> > > 1. We require C++11 without exceptions: reason, it's designed for Linux
> > > and
> > > it didn't come to my mind to restrict us on the compiler due to lack of
> > > support in Visual Studio.
> > > 
> > > 2. We use Qt 5.4.
> > > 
> > > For item 1 I only see the possibility of adding an exception [1].
> > 
> > I personally don't like exceptions, it gets complex fast.
> > 
> > Now are you sure it is really problematic? To me it looks like you're
> > using almost exclusively features from the white list. It is probably just
> > a matter of s/nullptr/Q_NULLPTR/ and s/override/Q_DECL_OVERRIDE/ in your
> > case.
> 
> I just started looking into doing the replacement and noticed that I'm also
> using:
> * Non-static data member initializers (N2756), gcc 4.7
> * Range-based for (N2930), gcc 4.6

Note that if you do that with Qt containers it's likely a bad idea. It's 
likely to detach and copy whole containers if they are non-const. Qt 
containers should be used with foreach always to avoid problems (and yes 
that's a shame IMHO).

> * constexpr, gcc 4.6
> * possibly also delegating ctors, gcc 4.7 (difficult to find)
> 
> Overall it looks to me like I cannot make this code base to work again with
> gcc 4.5 without spending a lot of time and possibly introducing regressions.

I would disagree here, it's not exactly difficult for all the cases to move 
back to being supported by gcc 4.5. Most of the features you mentioned are 
almost unused in your code base. I found only one constexpr use, two inherited 
ctors, no delegated ctors. The only annoying ones could be the data member 
initializers since you got a few in private headers and the for range loop 
(which I think you should change anyway).

> So how should we go on?

My opinion still stands: fix it. :-)

Alternatively, we could bump the compiler requirements globally for KF5 again. 
But I think it's too early for that, I'd wait for Qt 5.7 to be out (since 
they'll move their baseline as well at that point anyway).

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud supporter of KDE, http://www.kdab.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20151209/16484d82/attachment.sig>


More information about the Kde-frameworks-devel mailing list