fhackenberger / ktikz

KtikZ provides a nice user interface for making pictures using TikZ.
Other
348 stars 34 forks source link

Use clang-format with Qt style #63

Closed alexfikl closed 4 months ago

alexfikl commented 5 months ago

The Qt style was copied from https://code.qt.io/cgit/qt/qt5.git/tree/_clang-format There's also a KDE style at https://invent.kde.org/frameworks/extra-cmake-modules/-/blob/master/kde-modules/clang-format.cmake

Applied using

fd -e h -x clang-format -i
fd -e cpp -x clang-format -i
alexfikl commented 5 months ago

I'm not a big Qt/C++ programmer these days, so I don't have a preference besides just having some consistent formatting. We can use another .clang-format config if that fits better with the project.

alexfikl commented 4 months ago

@jfmcarreira (soft ping) Have you had a chance to look at this?

jfmcarreira commented 4 months ago

I was not fully aware the lack of formatting rules in this repository. We can go with this one. And thanks for the ping, as I had forgot it

alexfikl commented 4 months ago

I was not fully aware the lack of formatting rules in this repository. We can go with this one. And thanks for the ping, as I had forgot it

No worries and thank you for merging this! :tada:

For what it's worth, the codebase seemed pretty consistent, but I'm not sure what style it was using. This looks like a lot of changes because it used tabs instead of spaces for indentation.. so pretty much every line was changed :\