diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-01-25 18:36:38 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-01-27 15:12:31 (GMT) |
commit | 20c871370727630b83adce1e96ac0437802c433a (patch) | |
tree | e51b873666abd926435f3af9390f1fec0c4a1285 /tools/linguist | |
parent | d97a3e97f54d1e1d028fd7bc2b46171c6b0be966 (diff) | |
download | Qt-20c871370727630b83adce1e96ac0437802c433a.zip Qt-20c871370727630b83adce1e96ac0437802c433a.tar.gz Qt-20c871370727630b83adce1e96ac0437802c433a.tar.bz2 |
still complain if only ts files where specified on the cmdline
Diffstat (limited to 'tools/linguist')
-rw-r--r-- | tools/linguist/lupdate/main.cpp | 14 |
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; } |