foldermodel: Use switch-case in data()

The code become more elegant.
2 jobs for !765 with work/fusionfuture/BUG447573-empty-icon-desktop in 2 minutes and 39 seconds (queued for 5 seconds)
latest merge request