You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
* Fix "index out of range" error When the parent is the tree root element, beginInsertRows must be called with an invalid (but legal) index. A QModelIndex with a row index of zero when the parent has no children is an illegal index and will result in "undefined behavior", like the "index out of range" one. Therefore, if our parent is the tree root element, we use QModelIndex() instead. Fixes #2343 Signed-off-by: Dennis Brakhane <brakhane@gmail.com> * Use QModelIndex() instead of createIndex(-1, -1) Both do the same, but the former is Qt best practise. Signed-off-by: Dennis Brakhane <brakhane@gmail.com> * add some sanity checks in debug mode Using illegal ModelIndices can result in hard to debug problems later on, so add a few checks to help spotting them sooner. Signed-off-by: Dennis Brakhane <brakhane@gmail.com> |
4 years ago | |
|---|---|---|
| .. | ||
| style | 5 years ago | |
| AssetDetailsPanel.cpp | 5 years ago | |
| AssetDetailsPanel.h | 5 years ago | |
| AssetTreeFilterModel.cpp | 5 years ago | |
| AssetTreeFilterModel.h | 4 years ago | |
| AssetTreeItem.cpp | 5 years ago | |
| AssetTreeItem.h | 5 years ago | |
| AssetTreeModel.cpp | 4 years ago | |
| AssetTreeModel.h | 5 years ago | |
| ConnectionEditDialog.cpp | 5 years ago | |
| ConnectionEditDialog.h | 5 years ago | |
| GoToButton.cpp | 5 years ago | |
| GoToButton.h | 5 years ago | |
| GoToButton.ui | 5 years ago | |
| JobTreeViewItemDelegate.cpp | 5 years ago | |
| JobTreeViewItemDelegate.h | 5 years ago | |
| MainWindow.cpp | 5 years ago | |
| MainWindow.h | 5 years ago | |
| MainWindow.ui | 5 years ago | |
| ProductAssetDetailsPanel.cpp | 5 years ago | |
| ProductAssetDetailsPanel.h | 5 years ago | |
| ProductAssetDetailsPanel.ui | 5 years ago | |
| ProductAssetTreeItemData.cpp | 5 years ago | |
| ProductAssetTreeItemData.h | 5 years ago | |
| ProductAssetTreeModel.cpp | 4 years ago | |
| ProductAssetTreeModel.h | 5 years ago | |
| SourceAssetDetailsPanel.cpp | 5 years ago | |
| SourceAssetDetailsPanel.h | 4 years ago | |
| SourceAssetDetailsPanel.ui | 5 years ago | |
| SourceAssetTreeItemData.cpp | 5 years ago | |
| SourceAssetTreeItemData.h | 5 years ago | |
| SourceAssetTreeModel.cpp | 4 years ago | |
| SourceAssetTreeModel.h | 5 years ago | |