Fix build with Qt 5.1

Apparently, QVariant as key type in QMap doesn't work well.