diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-05-14 11:52:58 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-05-15 08:54:21 +0200 |
commit | d5cb44cd3a2169d7c479d1f53d69544b9109f003 (patch) | |
tree | 0a4bf0c68671d2391aa2efea85c8f2699ff6ef2e /util | |
parent | c5f7cb7e1427470256eeec65b82c29e47e461f22 (diff) |
pro2cmake: Fix Scope.get_string for list values
QMake variables are always string lists, but some variables are used to
represent single string values. People tend to fill those variables with
multiple values and expect them to be joined by spaces.
Exhibit A: qtdeclarative/tools/qml/qml.pro
QMAKE_TARGET_DESCRIPTION = QML Runtime
QMake supports this for many values. Do the same for Scope.get_string().
Change-Id: I6af22bc1bfed07a4d8eac94d7315051a5bcb7a4d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-x | util/cmake/pro2cmake.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index cd43e2957e..1638fede08 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -1311,7 +1311,8 @@ class Scope(object): v = self.get(key, inherit=inherit) if len(v) == 0: return default - assert len(v) == 1 + if len(v) > 1: + return ' '.join(v) return v[0] def _map_files( |