[Interest] Qt Creator vs inline headers

Bernhard Lindner private at bernhard-lindner.de
Sat Dec 15 14:41:43 CET 2018


> > I can fix that in the MIME settings but it seems to make no sense.
> > 
> > Why is Qt Creator configured that way?
> 
> Because the MIME type says it's source, not header.

Yes. But that doesn't make sense. An .inl file is a header. It contains inline code and
especially template definitions. It is compiled by including it (indirectly through the
main header) in all translation units using those definitions. It can not be compiled by
its own as a source file.

> I had never seen an .inl file and had never heard of that extension being 
> used. So I googled for it and found a couple of examples in 
> https://stackoverflow.com/questions/1208028/significance-of-a-inl-file-in-c.

Yes, that is what I am talking about. And it means the MIME definition is wrong. It should be registered as header file not as source file.

Since there is no convention, people use different extensions like tpp, tcc, txx, ipp,
icc, etc. Maybe you have seen one of those before.

-- 
Best Regards, 
Bernhard




More information about the Interest mailing list