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.
o3de/Code/Tools/AssetProcessor
Dennis Brakhane 7f75dc6dee
Fix "index out of range" error in AssetProcessor (#4324)
* 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
..
AssetBuilder Archive Component - Rewrite and additional work on Archive and Asset Bundler (#4332) 4 years ago
AssetBuilderSDK Cleanup SerializeContext.h pt.1 (#4264) 4 years ago
Platform [Mac] Generate O3DE SDK app bundle that can be notarized and distributed (#4150) 4 years ago
native Fix "index out of range" error in AssetProcessor (#4324) 4 years ago
testdata Add linux equivalents for all the places that enumerate platforms (#3325) 4 years ago
CMakeLists.txt Set enable gem variants feature (#3631) 4 years ago
assetprocessor_batch_files.cmake Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
assetprocessor_gui_files.cmake Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
assetprocessor_static_batch_files.cmake Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
assetprocessor_static_files.cmake Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
assetprocessor_test_files.cmake {LYN-4996} Asset Processor is not reprocessing STL files after settings are edited/updated (#2095) 5 years ago
deployment.pri Initial commit 5 years ago