* Since we're promoting everything, we reset the behaviour of
RDTreeWidget so that it's not doing anything different by default.
* RDTreeWidget's interface is a bit different, exposing some useful
things like a single selected item and so on.
* We also can't set columns in the Qt Creator UI anymore, so we set them
from code.
* We add our own custom item model to handle the cases we need. We can
also make a few assumptions and optimisations around things we can
safely assume like e.g. nodel columns won't really change after init.
* This lets us have full control over batching updates, which was the
main motivation, but it makes it easier to extend in future (e.g.
adding single per-item tags instead of the heavyweight Qt::UserRole
data elements).
* VAX can get confused by the QT_NAMESPACE macro, and if it thinks Qt
objects are inside a QT_NAMESPACE namespace then various things will
break but most commonly the ui objects inside that namespace won't be
picked up properly.
* See https://forums.wholetomato.com/forum/topic.asp?TOPIC_ID=12573
* We previously were only checking if all lookups had completed before
self-deleting, but we also need to make sure nothing externally is
still holding onto the dialog.
* This is only relevant for static qrenderdoc builds where the python
used isn't the system python, so it needs to locate its libs.
Otherwise the system libpython3.so and libs will be used.
* If it's called every write then it risks spamming the system with
signals and locking the UI thread with constant writes. Checking and
flushing output every 100ms is sufficient.
* In python globals aren't really global, they're just module-level
variables. So to find our _renderdoc_internal we have to potentailly
walk the stack if we're inside another module until we get to the
globals dict we set up.
* If a window (like the PythonShell) owned a context and only stopped it
on destruction, it would be destructed after the global shutdown
destroyed the interpreter.
* This allows us to return complex types like byte arrays or pairs of
status & render handle.
* Also in future more introspection of the capture file will be possible
and this provides an easy extension to that without adding new entry
points.
* In python it's not as quick to get ~0U since ints aren't unsigned or
fixed size. Adding named constants makes it easier for people to use
the right values, and C++ users can still pass ~0U.
* Generally this means removing ref out parameters and instead returning
values. In a couple of cases we will want to avoid copies in future
either by returning const references (e.g. to the pipeline state which
is immutable).
* At the same time, some pointless bool return values that were always
true and didn't indicate errors have been removed. They can be added
again if an error condition comes back.
* Some free functions still have out parameters as C linkage doesn't
allow returning user types by value.
* The C# UI still invokes into C wrappers for all the C++ classes, which
handle taking the return value and doing a copy into an out parameter
still for compatibility.