* 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>
* Final update copyright headers to reference license files at the repo root
Signed-off-by: spham <spham@amazon.com>
* Fix copyright validator unit tests to support the stale O3DE header scenario
Signed-off-by: spham <spham@amazon.com>
* Fix for DeleteCachedAssets_AssetsReprocessed fails on Debug Nightly Builds
* added -ap_disableAssetTreeView=true to disable the Qt tree view for the asset tab to get the parts that want to be tested finish
* only shows up on Debug
Tests:
=== test session starts ===
AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests_2.py::TestsAssetProcessorBatch_AllPlatforms::test_AllSupportedPlatforms_FastScanWorks_FasterThanFullScan[windows-AutomatedTesting] PASSED [ 50%]
AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_processor_batch_tests_2.py::TestsAssetProcessorBatch_Windows::test_WindowsPlatforms_RunAPBatchAndConnectGui_RunsWithoutEditor[windows-AutomatedTesting] PASSED [100%]
--- generated xml file: F:\amazon\o3de\build\vs2019\Testing\Pytest\AssetPipelineTests.Batch_2_Sandbox.xml ---
=== 2 passed, 4 deselected in 18.32s ===