-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.9.1, 5.12.3, 5.13.1
-
None
-
Windows 10 x64
Qt UI Compiler (uic.exe) seems to ignore --no-implicit-includes (or -n) command line option. Despite the documented description of the option ("Don't generate any #include directives."), produced C++ header files still contain #includes to Qt classes used in .ui file.
Example reproduction steps:
- Open cmd.
- Go to "%QTDIR%\..\..\..\Examples\Qt-5.12.3\qmake\precompile"
- Run "%QTDIR%\uic.exe --no-implicit-includes mydialog.ui"
EXPECTED:
Generated header file (printed in console) does not contain any #include directives.
ACTUAL:
Generated header file (printed in console) contains #include directives:
/********************************************************************************
** Form generated from reading UI file 'mydialog.ui'
**
** Created by: Qt User Interface Compiler version 5.12.3
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_MYDIALOG_H
#define UI_MYDIALOG_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QVBoxLayout>
QT_BEGIN_NAMESPACE
class Ui_MyDialog
{