| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
shiboken needs to fully qualify default arguments of functions so that
they can be used outside the respective's class scope. This happens in
AbstractMetaBuilderPrivate::fixDefaultValue() and
ShibokenGenerator::guessScopeForDefaultValue(). This was confusing
particularly for enums and flags, where
AbstractMetaBuilderPrivate::fixDefaultValue() was doing a simple
expansion and further cases were handled in
ShibokenGenerator::guessScopeForDefaultFlagsValue().
To improve this and get it tested, move the enum/flags code completely
over to AbstractMetaBuilder, restructure it, rewrite the helpers
in terms of QStringView and make it a bit smarter:
- Check for hex numbers as well.
- No longer add a cast when constructing QFlags from a number(saves
the need to observe the protected hack).
- Expand expressions "A | B" as was before and additionally
within a type cast "Options(A | B)".
- Add a test.
Task-number: PYSIDE-1691
Pick-to: 6.2
Change-Id: I198995508e8ed01710a44708c425c31308908445
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a bool m_const member to the container helper template that
indicates a const container. Error out of the modification functions
if that is set. Create an additional creation function for the const
case. A const opaque containers is then of same Python type as the
non-const version, requiring no further type checks.
Pick-to: 6.2
Task-number: PYSIDE-1605
Change-Id: I45faeb0d68e6144a9dfbe25497694b8acdd98c09
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extract helpers from the opaque containers generation for fields
and use them for function returns if the type is modified accordingly.
[ChangeLog][shiboken6] Getters returning containers by reference can
now be modified to return an opaque container by modifying the return
type accordingly.
Pick-to: 6.2
Task-number: PYSIDE-1605
Change-Id: Ieaf5eb92d248d3a23e511222e5f61823e85540c0
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.2
Change-Id: I0027bd16aa0b5dea6bd51fb3b0df1b5cfb605388
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following modules were not generated automatically
in the documentation:
- QtBluetooth
- QtDBus
- QtNetworkAuth
- QtRemoteObjects
- QtSerialPort
The two column order of the modules.rst page was removed
in favor of moving the page to a box-style in the future.
Fixes: PYSIDE-1694
Pick-to: 6.2
Change-Id: Ied62d15c0f4574d0e4f5a8202e5f08692f63e001
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
| |
A generated call in the module initialization was found that
was not yet converted.
Task-number: PYSIDE-535
Change-Id: Icbdaa896e8181201c49cbce3d11acf791922c463
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
| |
Fixes: PYSIDE-1691
Pick-to: 6.2
Change-Id: I023b4ffe280b431d883673f5120236ba3f9c0991
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
Handle null-return of PyDict_GetItem().
Task-number: PYSIDE-1691
Pick-to: 6.2
Change-Id: Ia317cd15cf3d15c05e22a8b8db262d227c4dcb84
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The helper resolveScopePrefix() would expand Enum(-1) to
Enum::Enum(-1), assuming it is an enumeration value. Add a check to
prevent that for casts.
Task-number: PYSIDE-1691
Pick-to: 6.2
Change-Id: I403653b7655d7cccacb5737faf074cab55f30397
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
* hand-crafted class signatures don't have a return type (__init__)
* make optional typing imports complete
* skip imports which are defined in the same module
Task-number: PYSIDE-1675
Change-Id: I30950e16347158804430e04f93254f0177d2a506
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Add QEvent.Type.None, fixing:
UNRECOGNIZED: 'QEvent.Type.None'
OFFENDING LINE: 'PySide6.QtWidgets.QGraphicsSceneHelpEvent(self,type:PySide6.QtCore.QEvent.Type=QEvent.Type.None)
Pick-to: 6.2
Change-Id: Icb40ee6d01a3d744250cf60b728687c38f315f55
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
shiboken used to ignore enumerations without values assuming they were
just forward declaration of an enum classes. It turns out that there
are such cases (QCborTag). To fix this, add empty enums always and
replace them by the ones with values.
Task-number: PYSIDE-1691
Pick-to: 6.2
Change-Id: I5de69f86ed45bd9f239e6d6017e7dc4a554f5378
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
The MyPy compatibility needed at least a py.typed file to continue.
This was missing in the shiboken branch.
Task-number: PYSIDE-1675
Change-Id: I5f5df2a084eb15e7b06dcbe97eb173c2f1fb26d0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add option and extract a helper to return the list of implicit
conversions depending on it.
[ChangeLog][shiboken6] An option to disable implicit conversions
has been added.
Pick-to: 6.2
Task-number: PYSIDE-1669
Change-Id: Iaefbbf272a6c033bac10635f48057dd69fc83549
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
The identifier for anonymous enums has been changed, causing
shiboken to no longer recognize them.
Pick-to: 6.2 5.15
Task-number: PYSIDE-1686
Change-Id: I4d463132b8bd3fffa0b57f03be6c58ecbae94a49
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Change qtbase/d8602ce58b6ef268be84b9aa0166b0c3fa6a96e8 added
QFont(QStringList) which now triggers for strings as well since
they are a sequence. Fix by specifying overload numbers.
Pick-to: 6.2
Fixes: PYSIDE-1685
Change-Id: Ic78c2b273fe81949f852ea6e0f578613bc0a623a
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In an error condition, all arguments must be invalidated
in order to get a clean state.
This is currently not done when an error condition exists.
Rewrite the code to generate in a way that all
destructions are done, regardless of function outcome.
That needed some reordering of the code, in order to
move the necessary cleanup right after the Python function
call and before PyErr_Print/return.
[ChangeLog][shiboken6] Overridden virtual methods are now
always correctly finalized, regardless of errors.
Change-Id: If87cc4631f9b5731c1b1b8c7bf204e72d8744cc7
Fixes: PYSIDE-656
Pick-to: 6.2
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
| |
Fixes: PYSIDE-1631
Pick-to: 6.2
Change-Id: I082c3576c24f772190cc103da787311b43acf88c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
Make it throw when a type is not found. Replace the occurrences
where this can happen by direct access to mapping.
Task-number: PYSIDE-1660
Change-Id: Ieb8c2c8816192c0197c914a74979a5738e140545
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
Add allow-thread.
Pick-to: 6.2 5.15
Fixes: PYSIDE-1681
Change-Id: I624979c5845a3366bcd9d7827ff2c77438ec54f3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function `writeVirtualMethodNative` has some omission
problems in the finalization when an error occurred.
Before fixing that error, do some cleanup of the code
and improve the formatting to prevent overly long lines
both in the generated and the source code.
Task-number: PYSIDE-656
Change-Id: I3ff2ee8518aaf8e8c73039970f2c014a87073f5f
Pick-to: 6.2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce enumerations for compiler and platform. Add variables,
initialize them by #ifdefs and use accessor functions instead of
versions. This lays the groundwork for cross-compiling.
Task-number: PYSIDE-802
Pick-to: 6.2
Change-Id: I988bb9e963f6205a6433d3e48c05b7a8823f8398
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the base class BaseVisitor of the clang parser, check whether the
file has changed by comparing the CXFile. If it has changed, convert
the file name to a QString and call visitLocation().
The code is then faster since the file name checks are only performed
when the CXFile changes. The check code operating on QString becomes
simpler and can be extended more easily.
Task-number: PYSIDE-802
Task-number: PYSIDE-1660
Pick-to: 6.2
Change-Id: I1dd22ef91a4a7b96d05507b43511313507281fd6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.2
Task-number: PYSIDE-841
Change-Id: I7e78f97fed206f0722e50d967ec84800d3bef810
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QObject::property() returns a QVariant for whose type a shiboken
converter is retrieved by name (QVariant::typeName()). This fails for
QFlags types since QVariant::typeName() returns the fully expanded
name QFlag<Enum>. Register the flags converter under that name, too,
to fix this.
Pick-to: 6.2
Fixes: PYSIDE-1673
Change-Id: I23e83da34b82196d76b78fa44f67647da65737c8
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
| |
Pick-to: 6.2
Fixes: PYSIDE-610
Change-Id: I120816a1ce7612b8390037713fef255711019c19
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The macro was there to satisfy the shiboken heuristics which would
generate "PyObject_Check" to check for a PyObject, which is always
true. Remove the macro and handle "true" in the type entry.
[ChangeLog][shiboken6] The macro PyObject_Check()
has been removed.
Task-number: PYSIDE-1660
Change-Id: I86fc1ed3d8773245deb679142a8ff830cbc19883
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use pyInVariable in more places.
- Replace placeholder string formatting by concatenation/QTextStream.
- Simplify the code appending the "pyIn" variable to check function
and handle the constants true/false.
- Remove unused code path replacing "%in", which is handled
elsewhere (conversion rules).
Task-number: PYSIDE-1660
Change-Id: Ib7d3a9ca940860bf99f6731284c01e1a61df2618
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
QVideoFrame::bits() was removed in Qt 6; expose QVideoFrame::bits(int
plane).
Pick-to: 6.2
Fixes: PYSIDE-1674
Change-Id: I23f58f71286e445ad1b1e170924ee5e40f0b2491
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Fix warning:
UNRECOGNIZED: 'std.string'
OFFENDING LINE: 'PySide6.QtCore.QByteArray.fromStdString(s:std.string)->PySide6.QtCore.QByteArray'
Change-Id: Ie57b9f57028195fa438006f7952298e56a263693
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Terminating the application via closing the last window
only works when the window was actually shown.
Add a call to show() and reformat code.
Pick-to: 6.2
Task-number: QTBUG-97033
Change-Id: I1e0a82d1baf1676de5a38c1a8fd2408e104b464a
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Task-number: PYSIDE-1660
Change-Id: Icd95311c99e6f0333fa58e307e71e2d886e87e3b
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
| |
Complements 9e19ebd9c90999368dbf2db1a5e7b44cc2ddf7fa.
Change-Id: I19ce8f744ea38f7913e099f02e496fda855d3640
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Add std::(w)string and their views.
Task-number: PYSIDE-1660
Change-Id: I4201f0561ead327ab310a22fb1dcfe59e4adb86a
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the basic C++ primitive types from the typesystem files. Leave
the Qt typedef'ed types in place as otherwise the function
modifications would no longer match.
Task-number: PYSIDE-1660
Change-Id: Ic64634633640a4b358221fc9f64180df94af02de
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
Add the builtin C++ types that were not defined in the typesystem
files. At header parsing time, add types that are typedefs to primitive
types.
Task-number: PYSIDE-1660
Change-Id: I29912ce39d4387b22fa43442bbd0f9fffbf44b5c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Forgot to remove some more stuff.
Task-number: PYSIDE-535
Change-Id: Ib3117c1242a7e0007806ff468cbd52f0e640ec79
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
| |
Split out the rarely used version taking a Py_ssize_t *len
for clarity.
Change-Id: Ia0f39a6993558e8aae1523a9b54c67c94beec4ab
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
shiboken needs to run with pyside extensions to parse the Qt
annoations correctly.
Change 62c21af778b7bff6c86e7f89ef03a87efa6c51cb moved the compiler
defines from the pyside global header into shiboken. This caused the
function type detection to fail in the doc generator since it
did not pyside extensions and thus signals/slots were listed as
normal functions.
To fix this, move the --enable-pyside-extensions option to the base
class Generator and add it to documentation's CMakeLists.txt.
Pick-to: 6.2 5.15
Change-Id: I70142367ee01839d8e44cbf31e894991cf941197
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Move the sets to AbstractMetaType.
Task-number: PYSIDE-1660
Change-Id: I4871ee44f2f3fc56c541de5fd19eea2ddb6e0e04
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Similar to 984559a68d57d76b49c8ed0cbaf3492521aebebd,
store the "removed" modification in AbstractMetaArgument.
Task-number: PYSIDE-1660
Change-Id: Id541b4dccdcf3eba708a0da5dc873fe3b20b8151
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove AbstractMetaFunction::typeReplaced(), which returned the
modified type of an argument or the return type as a string.
Instead, for function arguments, for which modified types must always
be valid AbstractMetaTypes, add a getter modifiedType() returning an
AbstractMetaType to AbstractMetaArgument.
This fixes a number of potential bugs when accessing typeReplaced(int)
with the wrong position due to removed arguments.
The modified argument types are parsed from the XML strings in early on
in AbstractMetaClass::fixFunctions() with proper error reporting.
For return types, for which modified types need to be valid only when
generating a type check for virtual method return in the C++ wrapper,
add a function modifiedTypeName() to AbstractMetaFunction.
Adapt the client code accordingly.
Split apart CppGenerator::writeTypeCheck() into one overload
taking an AbstractMetaType and one taking a string.
Task-number: PYSIDE-1660
Change-Id: Id95379892b40ae2632ca33ed27263bada0ec015d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
This makes subsequent refactorings easier.
Task-number: PYSIDE-1660
Change-Id: I2ca708c2e3313c48483c8769eb186123bff5da9b
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_PepLong_AsInt still existed. This may be again a
rebasing glitch.
Found when doing the first attempt to build PySide
on PyPy with Windows :)
Pick-to: 6.2
Task-number: PYSIDE-535
Change-Id: Ic0b6167bc08c9da8e0d34d6ef2d5b71c8ee548c1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.2
Change-Id: Iaa4454568d10c8f1e82c1f02d5bc128273e8dff6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.2
Task-number: PYSIDE-1660
Change-Id: Ia602fcad2bfca2e92bc7e8363ac096558c064114
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a helper that returns the char * UTF-8 data from a
PyUnicode object without triggering conversions.
Change _PepUnicode_AsString() to return const char *
to match Python 3 on this occasion.
[ChangeLog][shiboken6] A fast path for converting
Python string to UTF-8 has been added to the limited API.
Change-Id: I619933633e226525fc248b27fd42cd1ce5178be0
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
| |
Change-Id: I1b81d56dc254fe3a77e1f39864dd45ac76a5f3c8
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add the PepUnicode_KIND() and PepUnicode_DATA() and other check
macros.
[ChangeLog][shiboken6] More string helper functions have
been added to the limited API.
Change-Id: I606f5a6f6fd49521d0b85f844f29bb052ff8500b
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Extend the system header to check to include the types headers.
Task-number: PYSIDE-1660
Change-Id: I8ef753c15aafe8e613df012af55ad4d900ad43da
Reviewed-by: Christian Tismer <tismer@stackless.com>
|