summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/collectjson.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/moc/collectjson.cpp')
-rw-r--r--src/tools/moc/collectjson.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/moc/collectjson.cpp b/src/tools/moc/collectjson.cpp
index ed65a9ed08..6577a3216b 100644
--- a/src/tools/moc/collectjson.cpp
+++ b/src/tools/moc/collectjson.cpp
@@ -51,7 +51,7 @@ static bool readFromDevice(QIODevice *device, QJsonArray *allMetaObjects)
return true;
}
-int collectJson(const QStringList &jsonFiles, const QString &outputFile)
+int collectJson(const QStringList &jsonFiles, const QString &outputFile, bool skipStdIn)
{
QHashSeed::setDeterministicGlobalSeed();
@@ -70,7 +70,7 @@ int collectJson(const QStringList &jsonFiles, const QString &outputFile)
}
QJsonArray allMetaObjects;
- if (jsonFiles.isEmpty()) {
+ if (jsonFiles.isEmpty() && !skipStdIn) {
QFile f;
if (!f.open(stdin, QIODevice::ReadOnly)) {
fprintf(stderr, "Error opening stdin for reading\n");