forked from qt-creator/qt-creator
TreeModel: takeItem should return the item
The usual Qt API for "takeXyz()" methods is to return the item that was "taken". Change-Id: Ie144051801487a301b3f13e2857735b65f58150b Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -1251,8 +1251,7 @@ void WatchHandler::removeItemByIName(const QByteArray &iname)
|
||||
theWatcherNames.remove(item->exp);
|
||||
saveWatchers();
|
||||
}
|
||||
m_model->takeItem(item);
|
||||
delete item;
|
||||
delete m_model->takeItem(item);
|
||||
updateWatchersWindow();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user