QmlDesigner: Plug a memory leak

Change-Id: I608b254b06db923c0ad718a15c4d697ba580c006
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>