void MapController::stateChanged(States st) { Q_D(MapController); QHash<int, bool> hash; if (st.testFlag(stMove)) { QList<int> res = d->mapStBt.values(stMove); foreach (int key, res) hash[key] = true; }