Move map conversion to common file
Summary: Share code
Reviewers: bruns
Reviewed By: bruns
Subscribers: Baloo
Tags: Baloo
Differential Revision: https://phabricator.kde.org/D20738