Commit Graph

8 Commits (80dcc34e6fab19c89c6286b60668a81543009f14)

Author SHA1 Message Date
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
Esteban Papp 84623dfb66 FixedMaxPathString replacement
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* 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>
5 years ago
jackalbe 143b8f1131
{SPEC-7465} Fix DeleteCachedAssets_AssetsReprocessed fails on Debug Nightly Builds (#1535)
* 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 ===
5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
pappeste 9fe893830c sine fixes to AP model handling, still getting some sporadic asserts in debug 5 years ago
alexpete a10351f38d Initial commit 5 years ago