rcc: Fix error message when temporary file cannot be opened

If rcc cannot open the file passed with --temp, display the path of the
temporary file, not the one of the output file.

Change-Id: I58f8ab2f68ac2f1a19feb6b02974dff9fc8b7ec1
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit c3b5ca129af42056184670e154c5dd17762e41f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Joerg Bornemann 2021-05-20 13:19:21 +02:00 committed by Qt Cherry-pick Bot
parent f3e861819d
commit 49c5cde24e

View File

@ -420,7 +420,7 @@ int runRcc(int argc, char *argv[])
temp.setFileName(tempFilename);
if (!temp.open(QIODevice::ReadOnly)) {
const QString msg = QString::fromUtf8("Unable to open temporary file %1 for reading: %2\n")
.arg(outFilename, out.errorString());
.arg(tempFilename, out.errorString());
errorDevice.write(msg.toUtf8());
return 1;
}