Fix RemoveOperation
The operation was using an empty set as a base, so it was not really functional. Change-Id: I98fd80c1ede31994857aa1f0c8947ca7b9f76649 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
This commit is contained in:
parent
eb3d73ffb7
commit
a0a94576fa
@ -239,10 +239,13 @@ class RemoveOperation(Operation):
|
|||||||
|
|
||||||
def process(self, input):
|
def process(self, input):
|
||||||
input_set = set(input)
|
input_set = set(input)
|
||||||
|
result_set = set(self._value)
|
||||||
result = []
|
result = []
|
||||||
for v in self._value:
|
for v in self._value:
|
||||||
if v in input_set:
|
if v in input_set:
|
||||||
continue
|
continue
|
||||||
|
if v in result_set:
|
||||||
|
result += [v,]
|
||||||
else:
|
else:
|
||||||
result += ['-{}'.format(v), ]
|
result += ['-{}'.format(v), ]
|
||||||
return result
|
return result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user