Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
3.2.0
-
None
-
Windows 10 Enterprise Version 10.0.19045 Build 19045
Visual Studio 2019 & 2022
Qt C++ 5.12.5
Perforce Helix P4V source control
Visual AssistX add-in
Description
With the 3.2.0 (rev 43) Qt VS addin recently deployed as an automatic Visual Studio extension update, our dev team has verified the following issue:
Whenever a header file with a Q_OBJECT class is modified (something as simple as a newline), the VS add-in automatically modifies the associated project and filters files (vcxproj and vcxproj.filters). The modification replaces the correct <QtMoc> tags for that header file with incorrect <ClInclude> tags, which then breaks moc file generation for that file.
It seems that Visual Studio's "Save All" feature is the 100% repro trigger for this behavior, sometimes simply saving the modified header isn't enough to observe it.
Here's an example of the behavior: I have Foo.h, with
class Foo : public QObject { Q_OBJECT //[...] };
in the parent project file I'll see:
<QtMoc Include="Folder\Foo.h" />
now if I modify Foo.h with a newline and use "Save All", I can see in my source control software, the project file has also been checked out (along with the filters file), and that entry now reads:
<ClInclude Include="Folder\Foo.h" />
This is undesirable behavior that should be fixed ASAP. Right now the dev team has been instructed to stay on 3.0.2 and disable updates for that add-in.
Our environment uses P4VS Helix Core server as our source control add-in, routing to our Perforce environment.