summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-09-06 20:57:35 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-20 14:35:02 +0200
commit3460395ebbf1e9eb05419854c0d5de28b89b9b0a (patch)
tree6d21ecdf6f515fabcaff1d61182672027840f804
parentce8aa44e61e009e2d9937f25fb311bf39fa44b1d (diff)
downloadqttools-3460395ebbf1e9eb05419854c0d5de28b89b9b0a.tar.gz
support indirect SUBDIRS
that is, .file and .subdir "structs". Change-Id: I6c7ea5971642802a97461d821cb1544fcc986013 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
-rw-r--r--src/linguist/lupdate/main.cpp7
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.pro3
2 files changed, 8 insertions, 2 deletions
diff --git a/src/linguist/lupdate/main.cpp b/src/linguist/lupdate/main.cpp
index 0ef299be3..1eac99be8 100644
--- a/src/linguist/lupdate/main.cpp
+++ b/src/linguist/lupdate/main.cpp
@@ -361,7 +361,12 @@ static void processProject(
QStringList subProFiles;
QDir proDir(proPath);
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('/')
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.pro b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.pro
index f75a46276..13f921703 100644
--- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.pro
+++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.pro
@@ -1,2 +1,3 @@
TEMPLATE = subdirs
-SUBDIRS = win mac unix common
+comm.subdir = common
+SUBDIRS = win mac unix comm