KDBindings icon indicating copy to clipboard operation
KDBindings copied to clipboard

Add include paths with capitalised paths

Open seanharmer opened this issue 1 year ago • 4 comments

It would be nice to be able to do:

#include <KDBindings/signal.h>

on systems with case-sensitive filesystems so that it matches the other KD libraries that we have.

seanharmer avatar Dec 13 '23 10:12 seanharmer

would "camelcase" forwarding headers be ok? i.e #include <KDBindings/ClassName>

winterz avatar Dec 14 '23 15:12 winterz

If the goal is to conform to what the other KD libraries are doing, we should stick to whatever header naming scheme is used there most often. From a cursory glance at KDDockWidgets, KDReports and KDChart, the general style we'd want to mimic is:

#include <KDBindings/Signal.h>

Probably best implemented using forwarding headers as @winterz noted.

I'd stick with the .h file ending though. It's not all that common to leave this out, unless we want to mimic the standard library style...

LeonMatthesKDAB avatar Dec 15 '23 09:12 LeonMatthesKDAB

In KDUtils, KDGpu we have

#include <KDGpu/command_recorder.h>

for example. So camel cased lib name (to match the cmake target) and snake case header name with .h suffix mainly to make it easier to read.

seanharmer avatar Dec 15 '23 12:12 seanharmer

@seanharmer So the point is to only have the KDBindings folder name be capitalized? Not the individual files themselves?

LeonMatthesKDAB avatar Jan 12 '24 12:01 LeonMatthesKDAB