core: Fix potential detach of non-const Qt containers
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>