summaryrefslogtreecommitdiffstats
path: root/tools/linguist
diff options
context:
space:
mode:
authorLucas Wang <wbsecg1@gmail.com>2012-12-06 07:43:13 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-06 11:12:02 (GMT)
commit92d2d2f24357339bd675a1174c20186174fc74f9 (patch)
treee55023ae673e2c2bc47b42d841a07920649e062e /tools/linguist
parenta1e8e908d575c79b3ac3c96f6aba7bee6beb62f6 (diff)
downloadQt-92d2d2f24357339bd675a1174c20186174fc74f9.zip
Qt-92d2d2f24357339bd675a1174c20186174fc74f9.tar.gz
Qt-92d2d2f24357339bd675a1174c20186174fc74f9.tar.bz2
support indirect SUBDIRS
that is, .file and .subdir "structs". (cherry picked from commit 3460395ebbf1e9eb05419854c0d5de28b89b9b0a) Change-Id: Ifdeedbbc0bccc9bc7a21707152750d7a2e839a5c Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'tools/linguist')
-rw-r--r--tools/linguist/lupdate/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index bf212ba..7f49620 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -352,7 +352,12 @@ static void processProject(
QStringList subProFiles;
QDir proDir(pfi.absoluteDir());
foreach (const QString &subdir, visitor.values(QLatin1String("SUBDIRS"))) {
- QString subPro = QDir::cleanPath(proDir.absoluteFilePath(subdir));
+ QString realdir = visitor.value(subdir + QLatin1String(".subdir"));
+ if (realdir.isEmpty())
+ realdir = visitor.value(subdir + QLatin1String(".file"));
+ if (realdir.isEmpty())
+ realdir = subdir;
+ QString subPro = QDir::cleanPath(proDir.absoluteFilePath(realdir));
QFileInfo subInfo(subPro);
if (subInfo.isDir())
subProFiles << (subPro + QLatin1Char('/')