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>
This commit is contained in:
Joerg Bornemann 2020-05-14 11:52:58 +02:00
parent c5f7cb7e14
commit d5cb44cd3a

View File

@ -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(