diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2024-03-22 17:22:47 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2024-03-27 04:24:11 +0100 |
commit | a0a990863fa54b52db5e97716b130f69de47fa52 (patch) | |
tree | 2145d924e8927a9fcd0502ad212c849ddbb6abc9 /qmake/generators/metamakefile.cpp | |
parent | 8414a0aa2c22e2656bccc97600a59c7163d040c2 (diff) |
QMake: make it error out if it cannot open output files
Change-Id: I02c979e31f4208cbf9d590e043cf7f03eb4a39d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake/generators/metamakefile.cpp')
-rw-r--r-- | qmake/generators/metamakefile.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index c9235509f2..79443a1d4b 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -140,7 +140,10 @@ BuildsMetaMakefileGenerator::write() if(Option::output.fileName() == "-") { Option::output.setFileName(""); Option::output_dir = qmake_getpwd(); - Option::output.open(stdout, QIODevice::WriteOnly | QIODevice::Text); + if (!Option::output.open(stdout, QIODevice::WriteOnly | QIODevice::Text)) { + fprintf(stderr, "Failure to open stdout\n"); + return false; + } using_stdout = true; } else { if(Option::output.fileName().isEmpty() && |