summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/linguist/lupdate/main.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index 0db2b25..301f217 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -367,8 +367,6 @@ int main(int argc, char **argv)
return 1;
}
- numFiles++;
-
codecForTr.clear();
codecForSource.clear();
@@ -395,6 +393,7 @@ int main(int argc, char **argv)
} else if (arg.endsWith(QLatin1String(".pro"), Qt::CaseInsensitive)
|| arg.endsWith(QLatin1String(".pri"), Qt::CaseInsensitive)) {
proFiles << arg;
+ numFiles++;
} else {
QFileInfo fi(arg);
if (!fi.exists()) {
@@ -439,9 +438,15 @@ int main(int argc, char **argv)
} else {
sourceFiles << QDir::cleanPath(fi.absoluteFilePath());;
}
+ numFiles++;
}
} // for args
+ if (numFiles == 0) {
+ printUsage();
+ return 1;
+ }
+
foreach (const QString &proFile, proFiles)
projectRoots.insert(QDir::cleanPath(QFileInfo(proFile).absolutePath()) + QLatin1Char('/'));
@@ -533,10 +538,5 @@ int main(int argc, char **argv)
firstPass = false;
}
- if (numFiles == 0) {
- printUsage();
- return 1;
- }
-
return fail ? 1 : 0;
}