Qt Creator: How do I switch pragma-style header guard to "old-style" include guards when generating a new header file?
Unsolved
Qt Creator and other tools
-
wrote on 23 Apr 2019, 17:56 last edited by
I recently noticed that the automatically generated header guards use
#pragma once
instead 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 variableCpp:PragmaOnce
(seewizards/classes/cpp/file.h
for 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? -
wrote on 12 May 2019, 07:12 last edited by