Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt Creator: How do I switch pragma-style header guard to "old-style" include guards when generating a new header file?
benj_qt_account last edited by
I recently noticed that the automatically generated header guards use
#pragma onceinstead of
#ifndef MYFILE_H... How do I get the old functionality back?
I found the wizard files (
Tools/QtCreator/share/qtcreator/templates/wizards) and found that I could edit them to get the correct behavior, but that seems hacky as there is already a variable
wizards/classes/cpp/file.hfor an example) that seems to dictate which guard is used. The only issue is that I don't know how to set this variable. Is there a place to set this in the Qt Creator GUI?
Oleg Shalnev last edited by