[Kst] branches/work/kst/portto4/kst/src/libkstapp
Peter Kümmel
syntheticpp at gmx.net
Wed Jan 19 13:44:44 CET 2011
SVN commit 1215729 by kuemmel:
more simplifying to prepare reusage
M +2 -8 scalarmodel.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/scalarmodel.cpp #1215728:1215729
@@ -98,16 +98,10 @@
void ScalarModel::addScalars(const QHash<QString, Kst::ScalarPtr> scalarMap, ScalarTreeItem* parent) {
- QMap<QString, ScalarPtr> map;
- foreach(ScalarPtr scalar, scalarMap) {
- map.insert(scalar->Name(), scalar);
+ foreach(const ScalarPtr& scalar, scalarMap) {
+ addScalar(scalar, parent);
}
- QMapIterator<QString, ScalarPtr> iObject(map);
- while (iObject.hasNext()) {
- iObject.next();
- addScalar(iObject.value(), parent);
}
-}
ScalarTreeItem* ScalarModel::addScalarTreeItem(const QList<QVariant>& data, ScalarTreeItem* parent) {
More information about the Kst
mailing list