| 644 | } |
| 645 | |
| 646 | void AttributesModel::setDefaultForRole(int role, const QVariant &value) |
| 647 | { |
| 648 | if (value.isValid()) { |
| 649 | d->defaultsMap.insert(role, value); |
| 650 | } else { |
| 651 | // erase the possibly existing value to not let the map grow: |
| 652 | QMap<int, QVariant>::iterator it = d->defaultsMap.find(role); |
| 653 | if (it != d->defaultsMap.end()) { |
| 654 | d->defaultsMap.erase(it); |
| 655 | } |
| 656 | } |
| 657 | |
| 658 | Q_ASSERT(defaultsForRole(role).value<KDChart::DataValueAttributes>() == value.value<KDChart::DataValueAttributes>()); |
| 659 | } |
| 660 | |
| 661 | void AttributesModel::setDatasetDimension(int dimension) |
| 662 | { |
no test coverage detected