4

I'm using KDevelop 5.2, and have source files of three kinds: hpp/cpp/tpp. Because there are many inline functions crossing invokes each other, I have to put inline codes into few of separate files with "tpp" suffix and can be included freely by other source files.

I found that the source formatter of KDevelop can not correctly/perfectly format the source code in a "tpp" file. I had been looking through everywhere in Settings of Kdevelop, but I found no relevant option. Is there a way, in it I can let KDevelop treat "tpp" files samely as it treat "cpp" files?

Thanks to @arrowd , my tpp files has been able to be formated as expecting, at least with simple codes. There are still some codes can NOT be auto-formated correctly, mainly are those functions with "noexcept" qualifier. Any hint?

Leon
  • 1,489
  • 1
  • 12
  • 31
  • 1
    Try mapping `.tpp` extension to `text/x-c++src` MIME type. If you are using Plasma, you can do it in System Settings window. – arrowd Jul 11 '19 at 08:11
  • @arrowd thank you very much. I solved this problem by using your method, and it have been working for a few of months, but now it failed again. Even though I added a *.tpp extension into text/x-c++src MIME type in System Settings. sorry, I'm not very familiar with Kubuntu and Plasma. – Leon Aug 25 '19 at 15:46
  • Furthermore the "*.hpp" can not be formatted as before also! – Leon Aug 25 '19 at 15:59

0 Answers0