From bdbcf6704f4b0e7d9aaa522cc69e730148080cb8 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Wed, 21 Jan 2015 13:28:46 +0100 Subject: Make it possible to generate rcc files from stdin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tor Arne Vestbø --- src/tools/rcc/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/tools/rcc/main.cpp') diff --git a/src/tools/rcc/main.cpp b/src/tools/rcc/main.cpp index 3c556d76a8..3c88be92bb 100644 --- a/src/tools/rcc/main.cpp +++ b/src/tools/rcc/main.cpp @@ -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; } -- cgit v1.2.3