Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
3.0.1
-
None
-
Visual Studio 2022 17.7.4, Windows 11 Pro 10.0.22621 Build 22621, Qt Visual Studio Tool 3.0.1
-
-
e8ee4264b (dev)
Description
When a QObject class is declared in a cpp file with the Q_OBJECT macro, moc does not appear to be run on the file. The standard (though apparently poorly documented) way to make that happen has been to 'include "[filename].moc" ' at the bottom of the cpp file. That is not working with the 3.0.1 VS plugin.
Example project attached - this builds fine with Qt Creator, or the 2.10 plugin.
Build started...
1>------ Build started: Project: testmoc, Configuration: Debug x64 ------
1>Generate moc_predefs.h
1>Moc'ing ./debug/moc_predefs.h...
1>Moc'ing ./release/moc_predefs.h...
1> C:\Users\Noah\source\repos\testmoc\debug\moc_predefs.h(0:1): note: No relevant classes found. No output generated.
1> moc: C:\Users\Noah\source\repos\testmoc\release\moc_predefs.h: No such file
1>C:\Users\Noah\AppData\Local\QtMsBuild\qt_globals.targets(272,5): error MSB4181: The "QtRunWork" task returned false but did not log an error.
1>Done building project "testmoc.vcxproj" – FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 3:38 PM and took 01.486 seconds ==========
Attachments
For Gerrit Dashboard: QTVSADDINBUG-1127 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
506560,3 | Fix cmd parser duplicating values as free args | dev | qt-labs/vstools | Status: MERGED | +2 | 0 |