CMake: pro2cmake: Fix printing of the different operations

Change-Id: Ieb33141601c29ec2f3c30c6725179f1fb234e53a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Tobias Hunger 2019-01-17 17:10:17 +01:00
parent d73b06fc35
commit 1d7e724e39

View File

@ -136,7 +136,7 @@ class Operation:
def process(self, input):
assert(False)
def __str__(self):
def __repr__(self):
assert(False)
@ -144,8 +144,8 @@ class AddOperation(Operation):
def process(self, input):
return input + self._value
def __str__(self):
return '+({})'.format(self._value)
def __repr__(self):
return '+({})'.format(','.join(self._value))
class UniqueAddOperation(Operation):
@ -156,7 +156,7 @@ class UniqueAddOperation(Operation):
result += [v, ]
return result
def __str__(self):
def __repr__(self):
return '*({})'.format(self._value)
@ -164,7 +164,7 @@ class SetOperation(Operation):
def process(self, input):
return self._value
def __str__(self):
def __repr__(self):
return '=({})'.format(self._value)
@ -182,7 +182,7 @@ class RemoveOperation(Operation):
result += ['-{}'.format(v), ]
return result
def __str__(self):
def __repr__(self):
return '-({})'.format(self._value)