diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-11 08:53:32 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-12 06:47:40 +0000 |
commit | 8a62536b1071ac86c86c82089a53b7a4cd172f90 (patch) | |
tree | df595b8c7b750ae7d50b09adb66607da7a4b4709 /sources/pyside2/tests | |
parent | dbb78237ef6622a2daae32fa3f5fa0cd9b1ffda5 (diff) |
shiboken: Introduce DefaultValue
Introduce a small class storing the return value of
Generator::minimalConstructor() consisting of a type enumeration and a
value, offering formatting for the use cases variable initializations,
return values and constructor arguments lists.
Having distinct formatting for the different use cases has some
advantages:
- Can use nullptr without casts (except in constructor arguments
lists, where the type is needed for disambiguation).
- In the previous implementation using a string, "" indicated an
error; so, it was not possible to use it for default-constructors.
It is now possible to handle default-constructors for
initialization ("Foo f" instead of "Foo f = Foo()".
- Can use {} for return values.
Task-number: PYSIDE-62
Change-Id: I73229cb957d4b92b43de4cdbc3c66703f48faa61
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/tests')
0 files changed, 0 insertions, 0 deletions