-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 17.0.1
-
34b644c82 (17.0)
Steps to reproduce
- In Qt Creator, enable Preferences > C++ > File Naming > Include guard template > Use "#pragma once" instead
- Create a new project, File > New Project... > Test Project > Qt Quick Test Project
- Check "Generate setup code"
Outcomes
The generated setup.h contains both #pragma once and #endif // SETUP_H (which fails to compile):
#pragma once #include <QObject> #include <QQmlEngine> class Setup : public QObject { Q_OBJECT public: Setup() = default; public slots: void applicationAvailable(); void qmlEngineAvailable(QQmlEngine *engine); void cleanupTestCase(); }; #endif // SETUP_H