[PATCH] D11837: Add Qt brace style configuration option.

Roman Kashitsyn via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 10 02:17:39 PDT 2015


lifted added a comment.

> Hm, the referenced style guide doesn't say anything about namespaces.


You're right. Futhermore, it's hard to find any namespaces in qt repos at all - Qt uses a macro for conditional compilation with namespaces.

> I also couldn't find anything in the qt source repo (just took a quick look though).


Hm, I've just browsed through the qtcore and seen no evidence that qt uses attached braces everywhere but after classes and function. Qt use of style is inconsistent (sometimes even within a single file), and few examples I've looked at actually use something close to Mozilla style - they break on structs, enums, classes, and functions (http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/tools/qchar.h?id=13c16bbd06e0034210ba2164f1be208c49a6e3a7).

My bad, I read the Qt Brace style description and decided that it could fit my current project style (we break after functions, and some people also break after classes). But it turned out that Qt style is not as well defined as I thought, so I'm out of luck.

I believe it's better to abandon this patch.

I hope I will find some time to introduce extra configuration options to override pre-defined brace styles, as it was discussed long time ago.


http://reviews.llvm.org/D11837





More information about the cfe-commits mailing list