Fix crash when restoring settings in registerShortcut

Introduced by c5cc4b1f131cbfc84622a93716ed421dd57f4da5

Change-Id: Id546a4cf87cfb3709f11ee32439662fcda00bdd4
Reviewed-by: Eike Ziller <eike.ziller@digia.com>