Make it possible to generate rcc files from stdin

There's already some code to be able to generate the rcc files from stdin,
only problem being that the input sanity check was not allowing the code
path to proceed being left unreachable.
This patch fixes it by allowing "-" as an acceptable argument and the
process proceeds as expected.

Change-Id: Icd47c7a65373ff1ea3f98d9528736f8a1b21b707
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This commit is contained in:
Aleix Pol 2015-01-21 13:28:46 +01:00 committed by Aleix Pol Gonzalez
parent 97af289954
commit bdbcf6704f

View File

@ -199,7 +199,9 @@ int runRcc(int argc, char *argv[])
const QStringList filenamesIn = parser.positionalArguments();
foreach (const QString &file, filenamesIn) {
if (!QFile::exists(file)) {
if (file == QLatin1String("-"))
continue;
else if (!QFile::exists(file)) {
qWarning("%s: File does not exist '%s'", argv[0], qPrintable(file));
return 1;
}