X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=code%2Ffamily-shop-mgr%2FShoppingTreeModel.cpp;fp=code%2Ffamily-shop-mgr%2FShoppingTreeModel.cpp;h=0a65d9d71268804aa4e51a5a77280388c2719bea;hb=ab38c571edb4309976ef06a51d2cfb3425b771b4;hp=4a485e8666640e746f7f7c9ad2d566d3ac484d81;hpb=2d6ca191f3b62b4f038c47aad8d383b1ec624324;p=family-shop-mgr diff --git a/code/family-shop-mgr/ShoppingTreeModel.cpp b/code/family-shop-mgr/ShoppingTreeModel.cpp index 4a485e8..0a65d9d 100644 --- a/code/family-shop-mgr/ShoppingTreeModel.cpp +++ b/code/family-shop-mgr/ShoppingTreeModel.cpp @@ -314,7 +314,8 @@ void ShoppingTreeModel::parseCategoryElement(const QDomElement &element, parentItem = rootItem; ShoppingTreeItem *item; - QString title = element.firstChildElement("title").text(); + QDomElement child = element.firstChildElement("title"); + QString title = child.text(); if(!title.isEmpty()) { parentItem->insertChildren(parentItem->childCount(), 1, @@ -334,7 +335,7 @@ void ShoppingTreeModel::parseCategoryElement(const QDomElement &element, } // add each sub category and item to the tree - QDomElement child = element.firstChildElement(); + child = child.nextSiblingElement(); while(!child.isNull()) { if(child.tagName() == "category")