Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.0
-
None
-
Win7 32-bit
VS2010
Qt 4.7.0 VS2008 reconfigured for 2010
AddIn 1.1.6
-
dcd2f8295179170d6459edcb06ff9bd339748de6
Description
If class with Q_OBJECT is in header file than Generated File is named moc_xxx.cpp and there are no issues.
If class with Q_OBJECT is in cpp file than Generated File is xxx.moc and warning MSB8017 is output:
A circular dependency has been detected while executing custom build commands for item "GeneratedFiles\Debug\main.moc". This may cause incremental build to work incorrectly.
Code example – just put this into main.cpp, save and build with Visual Studio:
#include <QtCore/QCoreApplication> class AddInHatesThis : public QObject { Q_OBJECT public: AddInHatesThis() {} virtual ~AddInHatesThis() {} }; int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); return a.exec(); }
Attachments
Issue Links
- is required for
-
QTBUG-57196 [Windows][REG 5.7.x->5.8.0] When building a Qt application via Visual Studio with the vcxproj file generated from qmake the build may fail
- Closed