summaryrefslogtreecommitdiff
path: root/src/linguist/lupdate/main.cpp
diff options
context:
space:
mode:
authorLucie Gérard <lucie.gerard@qt.io>2021-07-09 15:20:53 +0200
committerLucie Gérard <lucie.gerard@qt.io>2021-07-12 14:25:26 +0200
commitee443eab9761193630f2ecc8162c8e92ce141aa1 (patch)
treea0b804066e550be79ad981993ff6f74fea365fd8 /src/linguist/lupdate/main.cpp
parenta54da6fbd7c6543c786e5bbc72f397599928c428 (diff)
downloadqttools-ee443eab9761193630f2ecc8162c8e92ce141aa1.tar.gz
lupdate/clang: Add support for alias function
Change-Id: Ibd9a2216f4653091efd098855ec533802ef4569c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/linguist/lupdate/main.cpp')
-rw-r--r--src/linguist/lupdate/main.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/linguist/lupdate/main.cpp b/src/linguist/lupdate/main.cpp
index c4cbc74d2..668d930f1 100644
--- a/src/linguist/lupdate/main.cpp
+++ b/src/linguist/lupdate/main.cpp
@@ -137,6 +137,19 @@ QStringList TrFunctionAliasManager::availableFunctionsWithAliases() const
return result;
}
+QStringList TrFunctionAliasManager::listAliases() const
+{
+ QStringList result;
+ result.reserve(NumTrFunctions);
+ for (int i = 0; i < NumTrFunctions; ++i) {
+ for (int ii = 1; ii < m_trFunctionAliases[i].size() ; ii++) {
+ // ii = 0 is the default name. Not listed here
+ result.push_back(m_trFunctionAliases[i][ii]);
+ }
+ }
+ return result;
+}
+
TrFunctionAliasManager trFunctionAliasManager;
QString ParserTool::transcode(const QString &str)