[Amarok] Clean up includes a bit.

Mark Kretschmann kretschmann at kde.org
Fri Dec 25 15:20:24 CET 2009


On Fri, Dec 25, 2009 at 2:39 PM, Maximilian Kossick
<maximilian.kossick at googlemail.com> wrote:
> What's the "right" way to structure includes in Amarok? personally
> I've basically changed all of SqlCollection and a bit more to include
> files relative to "logical" units, i.e. amarok/src, amarok/utilities
> and amarok/collection/sqlcollection, as this makes it easier to add
> new compilation units (aka unit tests) and makes it easier to find the
> header/implementaton files in the file system.

That's a good question. We should probably come up with some
guidelines, and then use them uniformly.

The biggest trouble is caused by includes like this:

   #include "../../../../foo/bar.h"

If you move any file in such a system, it gets very hard to make it
all compile again. So, not sure what system to use best, but such
backwards-recursive includes are not a good idea.

-- 
Mark Kretschmann
Amarok Developer
Fellow of the Free Software Foundation Europe
www.kde.org - amarok.kde.org - www.fsfe.org


More information about the Amarok-devel mailing list