News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Change default class creation header extension from .h to .hpp

Started by Feelzor, November 03, 2017, 12:55:25 PM

Previous topic - Next topic

Feelzor

Hello!

I must be extremely dumb, but even though I searched a lot, I found many useful things in the settings, I could not find a way to change this settings.

You know, when you create new file > class, it automatically sets the header extension to .h for C++ projects. I must admit I do not really like that, as I always have to manually change the .h to .hpp before creating the file, and I often forget to do so.
So I was wondering, is there a way to set in the settings the default extension for header files? If not, I'll keep doing it manually, and if there is a plugin available for that, do not hesitate to give me its name, I do not care whether it's a plugin or a setting :D

Thanks a bunch for your answers, and I hope this question has not been answered yet / I'm not too dumb ^^

BlueHazzard

currently there is no setting for this.
This are hard coded extensions in the source.
If the devs are ok with it i could make a patch for this.

The question is where to put this setting. One solution would be to provide it only in the config file...

oBFusCATed

Put it in the class creation dialog. And make it possible to change the source extension, too.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Feelzor

Ah okay, so it's not me just being dumb :')
For the settings, maybe in the class creation dialog, putting a ticking box "remember class extension" and if it's ticked, it remembers the setting ^^

BlueHazzard

does it even need a control? How about saving the currently extension by default?

BlueHazzard

Here is a patch that stores the extension of the header and the implementation file by default. I don't think that a setting is needed.

If this should be a setting i think we should it make global for all new file dialog. This would be a lot more work...

greetings

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]