[Marble-devel] [Patch] Include own header first

Inge Wallin inge at lysator.liu.se
Wed Apr 16 22:28:52 CEST 2008


On Wednesday 16 April 2008 18:21:10 Jens-Michael Hoffmann wrote:
> Am Mittwoch, 16. April 2008 17:56:49 schrieb Torsten Rahn:
> > Maybe you've seen it but ingwa recently introduced this kind of scheme
> > that explicitely mentions the origin of includes in the comment - just to
> > get some cleanup into the include mess :)
>
> Yes, I've seen it in some of the files. Besides "own header first" is there
> a technical reason for the order? Or is there a convention in KDE?

Well, I've been using some form of include order.  I.e. own (should always be 
first), posix, qt, kde (kde includes qt but not the other way around), 
marble.  That feels logical to me.

> > // Own
> > #include "MapThemeManager.h"
> >
> > // KDE
> > ...
> >
> > // Qt
> > #include <QtCore/QFile>
> > #include <QDebug>
> >
> > // Local dir
> > #include "GeoSceneDocument.h"
> > #include "GeoSceneParser.h"
> > #include "MarbleDirs.h"
>
> Instead of "local dir" I would prefer "Marble" because the header need not
> be in the local dir.

Well, if we have a special module that contains a few files that just provide 
some form of API to the rest of Marble, that should perhaps be 
denoted "local" instead of Marble.  Otherwise "marble" is perfectly ok, I 
think.

	-Inge

> Best regards
>
> Jens-Michael
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel




More information about the Marble-devel mailing list