Mentions légales du service

Skip to content

Feature/range loop for qmap and qhash

KLOCZKO Thibaud requested to merge feature/range_loop_for_qmap_and_qhash into develop

This feature will enable to use range loop over QMap, QHash and dtkCoreParameterCollection as follows:

QMap<QString, double> map;
map["One"] = 1;
map["Two"] = 2;
map["Three"] = 3;

auto ref_it = map.begin();

for (auto it : dtk::core::asKeyValueRange(map)) {
    QCOMPARE(ref_it.key(), it.first);
    QCOMPARE(ref_it.value(), it.second);
    ++ref_it;
}
Edited by KLOCZKO Thibaud

Merge request reports