What are the plans with CamelCase includes?

Kevin Ottens ervin at kde.org
Sat Dec 28 11:32:43 UTC 2013


On Saturday 28 December 2013 11:55:56 David Faure wrote:
> On Friday 27 December 2013 19:01:09 Friedrich W. H. Kossebau wrote:
> > So existing code ported from kdelibs would have to explicitely prefix the
> > includes, e.g. be changed like
> > #include <KLocalizedString> -> #include <KI18n/KLocalizedString>
> 
> Definitely don't want this.
> 
> See the QtGui/QLabel -> QtWidgets/QLabel issue between Qt4 and Qt5, we don't
> want to create the same problems with KDE Frameworks.
> 
> So yeah, I'm definitely in favour of "*Targets.cmake files,
> should include the path including the module prefix"

Which is supposed to be the case as discussed in the thread with Aurélien a 
while ago.

The complete consensus was IIRC:
 - For frameworks with K* prefixed classes, the include line should be 
#include <KFoo>;
 - For frameworks not using the K* prefix for their classes (and generally 
using namespaces) the include line should be #include <Framework/Foo>.

With the forward headers included, if the frameworks doesn't behave like that 
it should be considered a bug.

Cheers.
-- 
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: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20131228/edd2fa8e/attachment.sig>


More information about the Kde-frameworks-devel mailing list