-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 17.0.1
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
For Gerrit Dashboard: QTCREATORBUG-33502 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
675855,1 | AutoTest: Fix Qt Quick Test template with pragma once | 17.0 | qt-creator/qt-creator | Status: NEW | +2 | 0 |