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
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
..
AWSNativeSDKInit others 4 years ago
Android/ProjectBuilder Fix remain copyright header issues for .in files (#4177) 4 years ago
AssetBundler Archive Component - Rewrite and additional work on Archive and Asset Bundler (#4332) 4 years ago
AssetProcessor Fix "index out of range" error in AssetProcessor (#4324) 4 years ago
AzTestRunner Fixes for Android 4 years ago
BundleLauncher [Mac] Generate O3DE SDK app bundle that can be notarized and distributed (#4150) 4 years ago
CrashHandler small fix, everything compiling with VS2022 4 years ago
DeltaCataloger Code/Tools/DeltaCataloger 4 years ago
GridHub more fixes 4 years ago
ProjectManager Open CMake GUI from Project Manager (#4360) 4 years ago
PythonBindingsExample Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
RemoteConsole Archive Component - Rewrite and additional work on Archive and Asset Bundler (#4332) 4 years ago
SceneAPI Cleanup SerializeContext.h pt.1 (#4264) 4 years ago
SerializeContextTools Fix Entity id consistency issue & refactor prefab workflows/tests (#4373) 4 years ago
Standalone Removed ununeeded includes from EBus EBus.h and Policies.h (#4256) 4 years ago
TestImpactFramework LYN-6882 release builds are executing code in asserts (#4305) 4 years ago
CMakeLists.txt [Mac] Generate O3DE SDK app bundle that can be notarized and distributed (#4150) 4 years ago