QMake: Fix generation of Visual Studio filter files

This amends commit a0a990863f.

We bailed out of writing the filter file if opening the file for writing
was successful. The condition must be flipped.

Change-Id: I24331c5374a25c5a1126c6f7f71d41d840e0e532
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
bb10
Joerg Bornemann 2024-04-18 10:16:13 +02:00
parent 39bbfce9b6
commit 02b55967d5
1 changed files with 1 additions and 1 deletions

View File

@ -754,7 +754,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
// The file filters are added in a separate file for MSBUILD.
QFile filterFile;
filterFile.setFileName(Option::output.fileName().append(".filters"));
if (filterFile.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate)) {
if (!filterFile.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate)) {
warn_msg(WarnLogic, "Cannot open output filter file");
return;
}