Merge remote-tracking branch 'origin/3.4'

Change-Id: I35ba4cc7f7052699c3006545514c866be3cb5fdd
This commit is contained in:
Eike Ziller
2015-05-26 15:12:42 +02:00
38 changed files with 330 additions and 96 deletions

View File

@@ -1241,15 +1241,15 @@ void WatchHandler::insertItem(WatchItem *item)
void WatchModel::insertItem(WatchItem *item)
{
WatchItem *existing = findItem(item->iname);
if (existing)
WatchItem *parent = findItem(parentName(item->iname));
QTC_ASSERT(parent, return);
if (WatchItem *existing = parent->findItem(item->iname))
takeItem(existing);
//item->walkTree([item](TreeItem *sub) { sub->sortChildren(&watchItemSorter); });
item->sortChildren(&watchItemSorter);
WatchItem *parent = findItem(parentName(item->iname));
QTC_ASSERT(parent, return);
const int row = findInsertPosition(parent->children(), item);
parent->insertChild(row, item);