| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Add a std::move() to the converter.
Also add a test, which currently still fails. The pointer
needs to be moved back after the call.
Task-number: PYSIDE-454
Change-Id: I173d1becdbac53739923ddbce8a8cdc4f203ccea
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the code model first sees a "foo(const SmartPtr &)" instead
of "foo(SmartPtr)", compilation would break since const, & propagate
into the generated type name. Simplify types as is done for containers
as well.
Task-number: PYSIDE-454
Pick-to: 6.3 6.2
Change-Id: I1d9f75aceb983f8e9c4a28314db94b8d83b1c1ca
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Amends 7eb12e4cd3be60b4aaf18530d0c927bef386e913.
Exclude it for Windows currently due to a clash
with winnt.h defining a DELETE macro.
Change-Id: I47f2dea77991e74e00cd8fdc3de6ef5f850d4386
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
| |
Added by 25180730194bec25f915f32ab846ea583fb1493f.
Pick-to: 6.3 6.2
Change-Id: Ib6440293f5193972cb5f10c71816b6e7189534a9
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
| |
Task-number: PYSIDE-1978
Change-Id: I84118a41df3569329093d7f216f8dc148fe1ba2f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.3
Task-number: PYSIDE-1978
Change-Id: I912d4317bc639c5c597ab8259eef4ae389af04e6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Known limitations:
- No rich comparison is generated
- Value conversions caused by passing pointers to derived
classes do not work.
[ChangeLog][shiboken6] Support for std::unique_ptr pointer has been
added.
Task-number: PYSIDE-454
Change-Id: I5ddf3156bb383598f91bb97d169d1e134918a161
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Task-number: PYSIDE-454
Change-Id: I9571b0df985a0823641d10c6455eafbc2fc0ac94
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Virtual method overrides use Py_BuildValue() to create the argument
tuple for the call with its built-in conversions.
Fold the code for creating the argument and its format string
into a new helper CppGenerator::virtualMethodNativeArg().
Remove ShibokenGenerator::getFormatUnitString().
Change the logic to check for conversion rules from modifications and
convertable primitives first and fall back to shiboken conversions for
the rest, removing the complicated condition duplicated in
ShibokenGenerator::getFormatUnitString() and
CppGenerator::writeVirtualMethodNativeArgs().
This fixes a bug where no conversion was created when passing
smart pointer by values in a virtual functions.
Task-number: PYSIDE-454
Change-Id: I20ef047c89a0d0047f5234a90aae548ca8e6b932
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
This simplifies the code.
Task-number: PYSIDE-454
Change-Id: I725d407508315eca20ff93383d0f689d512a20d5
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Fix warning:
sources/pyside6/doc/tutorials/portingguide/chapter1/chapter1.rst.rst:51: WARNING: line number spec is out of range(1-113): '44-122'
Amends 99d76b5e4e2397fcb4ddf45de91748ab1861f755.
Change-Id: Ic2d30b4b6431bef7406763a27f124fccf30b6f7e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
This should speed up compilation time.
Task-number: QTBUG-97601
Change-Id: Ibd25739dfe5032113ff9c1df5ff5da4cf9effc2d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
| |
Adapt to qtmultimedia/c403e775f60a5d02e761904342ac243be1f22597.
Change-Id: Id078b2a7ca46ff775fbbc543428a3208d5410981
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Change-Id: I46f6291c1c363b1e509ef458e635f97f4423f81b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
| |
Change-Id: Ieb42bd4b7f4c60abc011129ffe07da242cfeeba0
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
When generating the code for virtual methods, removed argument
were not properly taken into account. Add a mapping method for
this to AbstractMetaFunction.
Change-Id: I6caf6bd676256affa7c9b85b36bec74a1c642be2
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
PyUnicode_InternFromString() should be used unconditionally.
Amends a09a1db8391243e6bb290ee66bb6e3afbb114c61.
Task-number: PYSIDE-1960
Pick-to: 6.3 6.2
Change-Id: I80837b2b58c9eadbd2aca4279df10e2f03e30450
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Python 3.11, some strings come with a refcount above decimal
1000000000, apparently indicating that they are interned. Replace the
mechanism by PyUnicode_InternFromString().
Task-number: PYSIDE-1960
Pick-to: 6.3 6.2 5.15
Change-Id: I6436afee351f89da5814b5d6bc76970b1b508168
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the function modification from QAbstractListModel
to QAbstractItemModel.
Amends 20eb4f94c637d20461f1fef16942841803ada909.
Pick-to: 6.3
Fixes: PYSIDE-1974
Task-number: PYSIDE-1930
Change-Id: I9adedf8340a7f0999c42147e8fd290444642abcc
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
- similar to data(...), headerData(...) also needs to support handling of enums
Pick-to: 6.3
Task-number: PYSIDE-1974
Change-Id: I7fd96e267af4cd30269e5fb42102c1bf6f32b155
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
amends 936bdcf97f8ca657531496592dfce7d9144fa977
Warning (potential error) fixed -
../PySide6/QtCore/PySide6/QtCore/qtcore_module_wrapper.cpp:947:35:
warning: format string is not a string literal (potentially insecure)
[-Wformat-security]
qCCritical(*category, cppArg1);
Pick-to: 6.3
Task-number: PYSIDE-1899
Change-Id: If488e7b0d44cb905549fc35855439dec2194a79b
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
Amends f88b4b646776b4d6fc8c9ab5253a0a4f89e26976.
Pick-to: 6.2 6.3
Task-number: QTBUG-97601
Change-Id: I3cd27556dc975d72a3dfebb8fb16d21edf00767b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.3 6.2 5.15
Change-Id: I885c332d6c948820140946c73ae1926e88834143
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
The license headers are now a couple of lines
compared to the previous 40 lines, so the snippets
that select 'from which line' the code must be included
needed some adaptation.
Change-Id: Id8bb87d708cc7c9edadb1b8265cecf81bf0bf5ae
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Adapt to moved docconf files
(qtspeech/07ce95a6094ced5c2a718255d663a6c67d0f26b7,
qttools/6af882fa2f45f73ec2ba4066d5ae3ad072d0c5ee).
Task-number: QTBUG-95236
Change-Id: I9bf0605822037a88088db81673ad42e5c848acef
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Insert a new line before "List of Classes", fixing:
QtCore/index.rst 251 WARNING: Block quote ends without a blank line; unexpected unindent.
Amends 530cfb8c9fb3a050635577afa5ae23145a3ecc30.
Pick-to: 6.3
Change-Id: I15f55d224afa8c189d49cdd406d7c9f64ad9d82b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Complements 77e0363f0257caff13e8fe5fbb9cd1e7f948b066.
Add the After Request example.
Change-Id: I2d2bcd5993933e9ca133e2f451580633130ae5dc
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Synthesize all comparison operators if one is found in the code model.
Task-number: QTBUG-103757
Change-Id: I78fbcd93bc4cd172266f9dd0dbb2ebcf3a8bb7f2
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
Manifests in class QHttpServerResponder of the new QHttpServer
module.
Pick-to: 6.3 6.2
Change-Id: I6242f00aadefe60eb6ae9cde4a4f2c2bfa643a20
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When implementing Python enums, the behavior of old Qt enums
was copied: Every enum was also inserted into the enclosing scope.
This patch removes that for two reasons:
- it is inconsequent to keep an old quirk when we have all
enums renewed so much
- It is more consistent compared to our competitor
- it is a prerequisite to implement efficient lazy initialization
PROBLEM: Many constants (about 110) are no longer recognized, for
instance `Qt.AlignLeft` should be `Qt.AlignmentFlag.AlignLeft`.
The question is if that can be fixed easily in C++, or if
the file mapping.py should get ~100 new fixes?
SOLUTION: We allow the old enums, but tell nobody that they continue
to work. They also are not advertized in the PYI files.
[ChangeLog][PySide6] The duplication of enum values into the
enclosing scope, allowing to write Qt.AlignLeft instead of
Qt.Alignment.AlignLeft, is still implemented but no longer
advertized in PYI files or line completion.
Task-number: PYSIDE-1735
Change-Id: I79a90d08f2a5a3a069fa551e60d609ecad718239
Pick-to: 6.3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
| |
Change-Id: I9b58e806019ee7294da466a5fce1f1b7ed01c8a3
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
- adapted to follow Qt guidelines
- regression from 20eb4f94c637d20461f1fef16942841803ada909
Task-number: PYSIDE-1930
Change-Id: Idfd81e2f2f2f54937863b77951b86506f89a9a4a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Some leftover attributes can be turned into statics, too.
The StaticMetaObject needs to be moved into Shiboken
in preparation of the following enum checkin.
Task-number: PYSIDE-1735
Change-Id: I2172bd785ae229ea5637588c53be660477fc2f0e
Pick-to: 6.3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was found when debugging attribute access for improving
PyEnum (the upcoming Enum Strict patch with forgiving fallback).
It provides a quick shortcut for checking attribute names
without string generation.
Task-number: PYSide-1735
Change-Id: I765016a5a0f13e59cef85f57deebebd456b16a77
Pick-to: 6.3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Enum module was optimized several times and is now in good
shape. Old Python versions show massive slowdowns.
Also, Python 3.6 does not support the functional API.
As a general solution, we embed the current enum version to support older
Python versions with the same module. Newer Python versions do a normal import.
As a side effect, we have no longer to treat the old version
Python 3.6 in any special way.
This change is further necessary to be able to remove the old enum version,
since Python 3.6 still exists in CI.
NOTE: Python 3.6 and 3.7 had a hard-to-find refcount error
when creating new enums.
[ChangeLog][shiboken6] Python Enums use the newest implementation for
Python (3.10) for compatibility and speed.
Task-number: PYSIDE-1735
Change-Id: I1f105a6b0fb48e9364cb0654ccd9118d39f68542
Pick-to: 6.3
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
- the parameter 'format' of QPixMap.save(...) should have a type mapping of char* -> str instead of char* -> bytes
Task-number: PYSIDE-1968
Pick-to: 6.3
Change-Id: I48f3e8da73208388b731b63c41893d917fb65d54
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
- the return type should be List[PySide6.QtCore.QModelIndex] instead of List[int]
- remove duplicate entry for QModelIndexList
Pick-to: 6.3
Task-number: PYSIDE-1934
Change-Id: I9dfaeb15fb5e2c84008b14d96498306520ea83ba
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Testing should always work for every allowed subset of modules.
We therefore include a check if Qml was compiled.
Amends d78151f89b2c374af366bee536c8ceeae3b2ab5e
Change-Id: I7b4a7eab7a4adcec8609b05b772b03e07c2117ab
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sources/shiboken6/tests/libsample/functions.cpp:244:33: error: use of overloaded operator '<<' is ambiguous
(with operand types 'basic_ostream<char, std::__1::char_traits<char> >' and 'std::nullptr_t' (aka 'nullptr_t'))
cout << __FUNCTION__ << ' ' << t << '\n';
Amends 8ecb8a909ecde13f179b8fce170582e47373f50c.
Pick-to: 6.3
Task-number: PYSIDE-854
Change-Id: Ifd2bb6ac4bf27ebcb240359020a6f8e18dbfef79
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In case no arguments at all were passed (assuming they were passed as
keyword arguments which only works for optional arguments), add a note
about that.
Task-number: PYSIDE-1964
Pick-to: 6.3 6.2
Change-Id: Iacaef7604f6127ce6532b31dabba8dd93e45bc78
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The function under consideration returns a QVariant, which is used
internally within the C++ code. Sometimes, the value stored in this
QVariant can also be a Python enum/Shiboken enum. When such a case
occurs, the returned QVariant to the C++ side is a QVariant of Python
/Shiboken enum, which cannot be processed from C++ code.
- This is a regression from 108d82d2ca5323652a50706b37f829b9f0457367
which needs some special handling.
- The solution is the convert the python enum (Shiboken enum) to the
corresponding integer type, which is stored into the QVariant and
returned to the C++ side.
Pick-to: 6.3
Fixes: PYSIDE-1930
Change-Id: Id4e9a1caa5a318e2410e584502c6dc6e35e3a657
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QEnum was implemented with Python enums, as opposed to the
old C++ enums. Now that support for Python enums is built
into PySide, it is necessary to keep the implementing
Python modules always the same.
This patch prepares QEnum and PyEnum compatibility for the
upcoming embedding of old enum implementations.
As a side effect: Python 3.6 and 3.7 had a hard-to-find
refcount error when creating new enums.
Task-number: PYSIDE-1735
Change-Id: Ic44459c8e319d6d0308c7366beafa6fe7df41b79
Pick-to: 6.3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- pyside6-qml is a tool that mimics the capabilities of qml utility and enables
quick prototyping for qml files. Most cli options of the qml tool are carried
forward to this tool.
example-usage:
pyside6-qml -a gui examples/declarative/editingmodel/main.qml
To see all the cli options available with this tool, do:
pyside6-qml --help
Task-number: PYSIDE-1878
Pick-to: 6.3
Change-Id: I98bd77ccf6a0a286bb54da264312e81bf2964dc7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
The macro was changed to a function, no longer allowing for assignment.
Pick-to: 6.3 6.2 5.15
Task-number: PYSIDE-1960
Change-Id: I4bc0e9a5c1f3dc70d59628e63b7b9d47ea449992
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
Use LLVM_INSTALL_DIR instead of deprecated CLANG_INSTALL_DIR.
Pick-to: 6.3 6.2 5.15
Fixes: PYSIDE-1956
Change-Id: I69080670f28267eadd7def6b81599703c9e95fa3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Use a recursive mutex since nested locks can occur in
~BindingManager.
Amends e141ea41cf6f2840281ab6e52b0861a6d1dcc137.
Pick-to: 6.3 6.2 5.15
Change-Id: I2dee3da70fe855859b3917e6ac775b8c5cdf5da7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function is passed type objects for class methods, which caused
it to crash.
The first clause did not catch this, and so it was cast to SbkObject
below.
Add a type check to prevent this.
Pick-to: 6.3 6.2 5.15
Task-number: PYSIDE-1960
Change-Id: Icfdd6fefb7156ac5961444bd5395109849a1d66e
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
Replace by Py_TRASHCAN_BEGIN/END as introduced in 3.10.
Pick-to: 6.3 6.2 5.15
Task-number: PYSIDE-1960
Change-Id: I17aaa2e9fa9c44f8c1004fc8dba8b22932ea44d0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
QML calls into the generated QObject::metaObject() from threads
without GIL, causing crashes for example in retrieveWrapper(). Use a
mutex to guard access.
Pick-to: 6.3 6.2 5.15
Change-Id: I374ada7fc207d86a062f950751503764a5e5dddf
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Windows compiler is quite overzealous and complains if headers have different
ordering in the used version, although the content seems to be identical.
Instead of doing a tedious search, we simply rename the function.
Task-number: PYSIDE-1797
Change-Id: I88a8eca882357ac31b9eb932c89013c51c5c75e4
Pick-to: 6.2 6.3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|