The repeated construction of a QRegExp in the version checking
loop shows up in the profiler.
Change the API to accept a QString, reducing conversions and
remove obsolete API.
Port the version checking code to use QRegularExpression and
QVersionNumber and store the regexps in a vector.
Change-Id: Id3e509e065d73699f49109df1f184edbefb8a09a
Reviewed-by: Christian Tismer <email address hidden>
8d99ee1...
by
Pankaj Pandey <email address hidden>
Improve the 'Value' type wrapper registration
This commit works around some bugs where multiple/incorrect
wrappers were registered for some types:
- In cases where the first field of a class was itself a Value
type instance (instead of pointer), both the parent
and child wrappers had same cptr address, causing confusion
in retrieveWrapper. Previously, this was worked around by always
creating a new wrapper for all Value type fields on every access,
causing leaks. We now check for colocated child wrappers and
return that instead of creating new wrapper, so each Value type
subfield need only have one wrapper.
- Some cases of incorrect wrapper registration due to an existing
wrapper which shiboken could not figure being deleted are fixed,
specifically cases where the newly registered wrapper is from
object created in python or owns its wrapper.
- Do not release incorrect wrapper in case of address reuse
by checking that the registered wrapper is indeed the wrapper
being released.
Task-number: PYSIDE-217
Task-number: PYSIDE-224
Change-Id: I019c078566c4b9b90e63c5d991e2e372d39c632a
Reviewed-by: Alexandru Croitor <email address hidden>
Reviewed-by: Christian Tismer <email address hidden>
4d76c6e...
by
Alexandru Croitor <email address hidden>
Implement partial QSharedPointer support
This change introduces a new XML tag called smart-pointer-type which
currently only supports implementations of C++ shared pointers.
This allows using objects pointed to by a shared pointer inside python
code.
There is one known limitation at the moment. Python shared pointer
objects are only created as a result of using C++ API with shared
pointers in the method signature (either the return type or argument
type). Thus is it is not currently possible to instantiate shared
pointer objects directly, e.g. p = ModuleName.SharedPointer() will
not work.
Refactor the character handler of the typedatabase XML parser
The function is called from the XML parser as well as with
strings from an imported file.
Change the function to be a template taking a QString/QStringRef
and add necessary overloads to the setters.
This prevents newlines and unused content in the XML files
from unnecessarily being converted to a QString.
Change-Id: Ifbac37c9099d799a8a334f46f78050dcbd52fad1
Reviewed-by: Alexandru Croitor <email address hidden>