Re: source formatting for .h files: C or C++?
Aleix Pol <[email protected]>
| Newsgroups | gmane.comp.kde.users.kdevelop |
|---|---|
| Message-ID | <CACcA1Rq9kPpOO9t0=6r0L67yztZEGaqyQ=BZbxg8_vm+OkYniQ@mail.gmail.com> |
On Mon, Sep 4, 2017 at 2:48 PM, René J.V. Bertin <[email protected]> wrote: > On Monday September 04 2017 13:35:20 Aleix Pol wrote: > >> > Is it correct that the source formatting choice for .h files is taken from the C formatting choice, even if the header is clearly a C++ one? >> >> It's clearly not correct. > > No, but am I right this is what happens (or can happen, one could imagine an order effect here)? > > Not sure if there's an easy fix if file type is determined from the extension, nor even how you'd do a reliable C++ detection from syntax that doesn't check for every C++-specific idiom. And then there's ObjC and ObjC++... > > R. I think that we're just checking the mimetype so that's why: $ kmimetypefinder5 kcategorizedview.h text/x-chdr Maybe you can look at the code how the language is inferred. Aleix