| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Change-Id: I5aa8f69849db51c61d058b7f0197b883b7d2d4e2
|
| |\
| | |
| | |
| | | |
Change-Id: I42955abfeb1fe8b7c6443a9b334154984286b9cc
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For enum/flags registration, the converters were registered under
invalid names like:
Shiboken::Conversions::registerConverterName(converter, "QFlags<QFlags<QUrl::ComponentFormattingOption>");
Shiboken::Conversions::registerConverterName(converter, "QFlags<ComponentFormattingOption>");
In addition, QFlags<> is not used for type names in Python. Use the
flags name as specified in the typesystem instead:
Shiboken::Conversions::registerConverterName(converter, "QUrl::ComponentFormattingOptions");
Shiboken::Conversions::registerConverterName(converter, "ComponentFormattingOptions");
Change-Id: I79525643850bf4296516dfb9576f75b51adf6414
Fixes: PYSIDE-1029
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Check on the type entry whether code needs to be generated in the
current package.
Fixes: PYSIDE-1024
Change-Id: I82132b077ac6192b96d979cb5596d0e6fecbc76b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Renamed from "Fix scriptable application to support the qApp macro"
because qApp was improved instead of scriptable application.
The qApp macro needed some extra effort to support the
qApp "macro" which is only defined in the Python wrappers.
I took some generated code, created a QApplication instance
in Python and used then reduced generated code to get at the
object and adjust the refcount.
This solution was then rejected, because I can do better,
and in fact, scriptable application now has a correct qApp
macro too, without any change to scriptable application.
The central idea was to look into the module init function
at import time and to see if a Q*Application already exists.
I was not aware of that import. Many thanks for the rejection! :-)
Update..
--------
After many attempts to make the qApp variable correctly behave
like always, I recognized that pre-existing Q*Application instances
have no wrappers or constructors at all! With that, it is not
possible to create a sophisticated qApp macro as a singleton
variable in the desired way.
Fortunately, this is also not necessary, because a C++ Q*Application
cannot be deleted from Python, and there is no point in supporting
more that a simple variable. So in case of a pre-existing instance,
the qApp variable now gets redirected to that instance.
A small test was added to application_test.py that is triggered by
an import.
A weird effect when "qApp" was typed interactively before calling
"QApplication()" was fixed, too.
Change-Id: Ic69dd6a21c964838a90f63e316d299b62a54d612
Fixes: PYSIDE-571
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is not the proper fix for the issue. The index of the declaring
module needs to be used for this to work.
This reverts commit d2d0e397309a1b18eaff9ddee0940007f0e1c4bf.
Task-number: PYSIDE-1024
Change-Id: Idc0e859ebda1626b5e841aa96be54317a5f3d0d0
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With fd126b28e1d9b02ea16c813bc392461bdb05bd1d, broken wrapper code
would still be generated for "const_QSharedPointer_QSize___&"
depending on whether the const-ref or plain value type was encountered
first when parsing.
Fix the problem by stripping the qualifiers from the metatype added to
GeneratorPrivate::m_instantiatedSmartPointers partially reverting
fd126b28e1d9b02ea16c813bc392461bdb05bd1d.
Change-Id: Ie6691e045b7d65baa3a0bc72dd8637f09eeaf111
Fixes: PYSIDE-1016
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Introduce a way to specify a name for a parameter using '@'
delimiters.
Fixes: PYSIDE-1017
Change-Id: I3ae505c104a64413ca2bad628d9f9d3e04bb5b88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There were unknown modules built with shiboken which mapping.py
did not recognize. This is too restrictive, since we can import this
module and try to produce something useful.
This was rewritten to respect every binary module in sys.modules .
Change-Id: I6626c69f002c307bae3eb78a557d1a7309983324
Fixes: PYSIDE-1009
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The help() support based upon the Signature module worked
fine but for types.
The reason was that the __signature__ module was a new attribute,
while __doc__ already existed through an inheritance-like
mechanism. When we add __doc__ later, the attributes are already
in the cache. PyType_Modified(type) does not help in PySide.
The solution was to add tp_getset to the metaclass
SbkObjectType_Type which otherwise would have been reached
from PyType_Type ('type' in Python).
Note.. It makes sense to add the injected documentation to the
__doc__ strings as well. This enables help output even with
the py_doc web service!
Task-number: PYSIDE-908
Change-Id: I09dd4bc6746ee41566a467604c4a68de5d66f94b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: If1386242c31e00412f289c9137c6a0427355ed9c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I58f872d1e8abf2b624f37434c14e9ef6ea912749
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is the CSS that the official web is using,
and replace the old PySide1 style when building locally.
Change-Id: Ibc78f52913a108b804cc2472f312c34c962635a9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\| |
| | |
| | |
| | | |
Change-Id: I920a77a3a8c79bba0fd7e5e4f990facf4081ca08
|
| |\|
| | |
| | |
| | | |
Change-Id: I9072902ff4efa3469b044b26ed189ac05bf9ce33
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of setting CMAKE_BUILD_TYPE as a regular variable,
set it as a cache value, but only as a default. If the user
specifies -DCMAKE_BUILD_TYPE=Foo on the command line, that will
take priority.
PySide2 will inherit the build type from the shiboken build, also
unless explicitly specified on the command line.
Fix missing quotes around the build type in shiboken_helpers.cmake.
Task-number: PYSIDE-980
Change-Id: I2f7e5f71b66467ca5b30056c42d26d9a54ff265b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add the module name like it is done for namespaces
and containers.
Task-number: PYSIDE-1024
Change-Id: Iba8589bfe360763bc186e5129d0ba480b2fb58ae
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The idiom to create an application if none exists
qApp or QApplication()
did not work on Python 2. This was recognized when another
unrelated test broke that tried to use the idiom.
This patch adds the missing method to Py_TYPE(Py_None)
which Python 3 already has.
A test case was added.
Side-effect.. The warning about missing braces is gone,
after the "PYTHON_IS_PYTHON3" macro is defined. This
was forgotten in the review when when the macro was
moved out of signature.cpp .
Task-number: PYSIDE-571
Change-Id: I9b9304f407cd4cafb3ba0945ffb045802503a343
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
pointers
Add a convenience to strip all qualifiers and use that.
This at least fixes the naming (for example, getInitFunctionName
returning "const_QSharedPointer_QSize___&"), the init function for the
type itself is missing, though.
Task-number: PYSIDE-1016
Change-Id: Id61b3c879199fc061e2846007951e3e9c82b85c4
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some use cases need direct data access for performance,
e.g. initializing QPolygonF data with numpy.frombuffer. Implementing the
Buffer Protocol as described in PEP3118 will allow direct data
access.
Change-Id: I13c46055b1cba115d099f1becb64c4cd04acdf0e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Check for the OS name case-insensitively
- Use the compiler from cmake via a define
- Add sysroot header directory to internal include paths
- Extend centOS version to 6.10
Change-Id: Ia3977f3331d51f9bc530accb8defa5fcb648bdfe
Fixes: PYSIDE-1012
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It turned out that the mock tool of the unittest module wants to
write into a __signature__ attribute. We now allow this by implementing
a writable attribute that memorizes any written value.
When __del__ is used, the original value re-appears.
We further added a check if a computed __signature__ attribute
exists. Then we don't allow write access. This way, defined signatures
are read-only, but a non-existent attribute stays writable.
Change-Id: Ib70de723e3160787df04e075e5c540a4cb24d410
Fixes: PYSIDE-1004
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|\| |
| | |
| | |
| | | |
Change-Id: I38964a8efc7905afd879cd2a96e75149d5942c8a
|
| |\|
| | |
| | |
| | | |
Change-Id: I334119b879bd53f422d3916cc8774376997384e1
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Qt has some modules, where functions and classes are added to
namespaces of other modules. For example, QtGui adds the free
functions mightBeRichText() and convertFromPlainText() to the "Qt"
namespace and Qt3DQuick adds a namespace "Quick" to the namespace
"Qt3DCore" started in Qt3DCore. Shiboken was unable to handle this
since the name of the index constant was derived from the namespace
name and would thus clash. Also, all code model items from the base
module would be re-generated into the extended namespace.
To fix this:
- No longer join namespace code model items in clang builder.
- Search for pre-existing namespaces in traverseNamespace() before
creating a new one, continuing populating it.
- Add a "files" attribute taking a regular expression to match header
names to the namespace type entry, making it possible to restrict
code model items by files when extending namespaces (as otherwise,
all base items are again added).
- Add "extends" attribute specifying the package name of the namespace
to extend, which will be used as base type in CPython.
- Disambiguate the SBK indexes of namespaces and the init_ functions
by adding the module name.
Change-Id: Ib552e878911942fa4d52d2bb0c6695e5b2c4c341
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix warnings introduced by
qtbase/92f984273262531f909ede17a324f546fe502b5c.
Change-Id: Ic46e5c93f8dd1910742fbd0578602cca4461643b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\| |
| | |
| | |
| | | |
Change-Id: I47bd00e96eebbefcf8304b7094bf00ff7e762cec
|
| |\|
| | |
| | |
| | | |
Change-Id: I36594dc6d6f5f56656d1cab2b1e9c44b57e56386
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The original change gave assertion errors and had to be replaced.
We now change the heap type flag temporarily in the call to
Shiboken.ObjectType.__new__
and restore it afterwards.
Change-Id: Ib15ecf2882739dc47db742c2a79e6269cdbb94b6
Fixes: PYSIDE-816
Fixes: PYSIDE-1003
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\| |
| | |
| | |
| | | |
Change-Id: I261e242b553c0533b88063be3309f49a1aa0f612
|
| |\|
| | |
| | |
| | | |
Change-Id: Ia87a2e46bb051f1cccf3b7ba988aeb5eb32c0f0e
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
getMultipleIheritanceFunction() -> getMultipleInheritanceFunction()
copyMultimpleheritance() -> copyMultipleInheritance()
Change-Id: If15b1ec12b6037ac8cff9941e09a281bc219fa20
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Remove the check function hasMultipleInheritanceInAncestry(),
which is nearly identical to getMultipleInheritingClass().
- Modernize the generated code to use C++ casts, uintptr_t and streamline
Change-Id: I68f52c2cbf1a589fd31c9c73919365176c56932e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The function PyUnicode_GetSize is deprecated.
Change-Id: I0bc0acd35424f29e1f5154deb0429dab5a4aabd4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I0f7c6a303cb0d404c42ae96f067eece1442c4a33
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The function ShibokenGenerator::getFunctionGroups(class) is called
many times for each function during code generation and causes a
slowdown for the OpenGL version function classes, which have 1000
member functions.
Split away getGlobalFunctionGroups() for the case scope=0 and
introduce a global-static cache for class information that is more
involved to determine for use by the various generators.
Speeds up the generation of the QtGui module including the OpenGL
version functions from 420s to 90s.
Task-number: PYSIDE-955
Change-Id: I6b6aa35ef2197aa9cddbf339db9eb0220932f361
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In class ReportHandler, replace the step counting by a simple pair of
startProgress()/endProgress() functions that check for warnings and
print the appropriate terminator. Module name and timestamp are now
also printed.
Add a few more messages and give proper names to the generators.
Change-Id: I92b4ef2854b824fbba3d371417edc1f88561a2cb
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We had some unwanted cache effects and needed to manually
remove certain files before building. Otherwise it could happen
that a build pretended to be ok, although there was a bug that
prevented generation of the ".pyi" files.
Further investigation showed:
Using option "--reuse-build" with "no" and then with "yes" creates errors
in the signature module. This makes "reuse-build" useless in this case.
We now add an "a" to "pyside3d_build" as "pside3da_build" if
"--limited-api=yes" was given. (different proposals welcome.)
That solved most of the stickiness problems.
A left-over lock directory is removed now, since it would prevent
re-computation of the .pyi files. This is implemented by a recursive
call to the script, where the subprocess does the work and the
main process checks if there was a crash and removes the lock.
The "--skip" parameter of generate_pyi.py was refined:
When set, it is checked if the time stamp of all imported modules is
less than the ".pyi" file time stamp. Only then the generation is skipped.
By editing any involved python file, the ".pyi" files will be regenerated.
Task-number: PYSIDE-560
Change-Id: I1b1d8ffbc58db3d4b38bf65e3795efcad7e7870c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\| |
| | |
| | |
| | | |
Change-Id: Iff4350a38f2015934c802d4f463e1c2b6a397802
|
| |\|
| | |
| | |
| | | |
Change-Id: I73efd93dfb3662aa7d420e7b45f58dfbf6725593
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As QtXmlPatterns is deprecated in Qt 5.14, the documentation build
needs to be changed to work with libxml2/libxslt exclusively.
Split the XML functionality into separate files for libxslt and Qt and
provide an interface for XPATH queries and XSLT transformations in
xmlutils.h.
Adapt testmodifydocumentation to work on temporary files as libxslt
cannot handle Qt resources.
Change-Id: I923f5b2e7c1d2511f15788e4b80c7721daeb2bc3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Move the formatting of the "done" message to the report handler and
add the prefix, which is the module name.
Change-Id: I63aa1f48f02709d6e89d9a9a684d56a218e65fd3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|\| |
| | |
| | |
| | | |
Change-Id: Ieb5a4ac5d5d33fe1e93e1d286f1b88d45f31db06
|
| |\|
| | |
| | |
| | | |
Change-Id: I28805a29caa05e996b490ba46e27ddbc243cc074
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Icb2d3702972a2dc49ee296b2111811ff75b162fc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use target_* commands instead of subdirectory based commands
for adding link options, compile definitions, include directories,
etc.
Remove some non-used compile definitions.
Move around some of the find_package() and option() calls.
Simplify some of the package dependent logic.
Replace the qt include and linking variables with CMake targets.
Change-Id: I815595344e63a32dce3dc78652359beede3ff593
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QtXmlPatterns is now deprecated, and until we port to some other
library, the CI will not have XmlPatterns anymore. Change the build
system of shiboken to skip building the documentation parts if the
dependency is missing.
Change-Id: I75d38502cd1efa84f7ec148622ffbf26084d0c35
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some XML tools trip over the missing character set.
Change-Id: Icbe1b2485325b70c4772b6a370a98fd529437a8a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
PepType_AS_BUFFER should also be defined for the
non-Limited API version to avoid ugly #ifdef constructs.
This patch augments the definition and simplifies qtcore.cpp .
Change-Id: Iddfb39e8afaf992f4edf72d871eec1eaf85d5963
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implement a QXmlStreamEntityResolver which resolves undeclared entities
to file names in the type system include path.
This is a work-around for the missing handling of standard externally
parsed entities of QXmlStreamReader.
Task-number: PYSIDE-955
Change-Id: I68ebae8ad465ae460c3a0eeadaef22dca2101e6c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|