From 1feda57a8a7a7dc2a459d9b3e77fcee76928891c Mon Sep 17 00:00:00 2001
From: pei-jiankang <peijiankang@kylinos.cn>
Date: Fri, 11 Mar 2022 15:32:43 +0800
Subject: [PATCH] modify lupdate-qt5 run error

---
 src/linguist/lupdate-pro/main.cpp | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/linguist/lupdate-pro/main.cpp b/src/linguist/lupdate-pro/main.cpp
index 1ce039c..1a62939 100644
--- a/src/linguist/lupdate-pro/main.cpp
+++ b/src/linguist/lupdate-pro/main.cpp
@@ -139,6 +139,20 @@ int main(int argc, char **argv)
         } else if (isProOrPriFile(arg)) {
             lprodumpOptions << arg;
             hasProFiles = true;
+	}else if (arg.startsWith(QLatin1String("@"))) {
+            QFile lstFile(arg.mid(1));
+            if (!lstFile.open(QIODevice::ReadOnly)) {
+                printErr(LU::tr("lupdate-pro error: List file '%1' is not readable.\n")
+                         .arg(lstFile.fileName()));
+                return 1;
+            }
+            while (!lstFile.atEnd()) {
+                QString lineContent = QString::fromLocal8Bit(lstFile.readLine().trimmed());
+                if (isProOrPriFile(lineContent)) {
+                    lprodumpOptions << lineContent;
+                    hasProFiles = true;
+                }
+            }
         } else {
             lupdateOptions << arg;
         }
-- 
2.33.0

