| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite the function to use keyword arguments instead of ordered
arguments. Also add error detection when required arguments are not
passed, or have a typo in them.
Adjust all the module cmake files to use keyword arguments.
Change-Id: I7bb0c6561d7dca1e7f673e29eb457da50ae5df04
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
There was still leftover code on the typesystems
but not all could be translated to snippets, so
it was replace by templates.
Task-number: PYSIDE-834
Change-Id: I7dbe2f15171ce6a60137be970312dc80622219c9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the old glue code was directly injected into
the typesystem, so it was possible to add them
as snippets.
There are still a couple of header files that will remain
there, because the include tag does not have the file/snippet
tags.
A few lines of code were modified in favor of "modern" C++,
and good practices.
Task-number: PYSIDE-834
Change-Id: I3072298b16d7280550c6a7f6abae045250663ba6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Now we are able to include snippets for the previously
mentioned typesystem's tags, so this patch removes the
current C/C++ code from the typesystems.
Task-number: PYSIDE-834
Change-Id: I2929020fa1dc0859db780dffb12fa292627697b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a main template file that hosts most of the
code-templates we use in the typesystems, but there
were still several templates written in each module-typesystem
file.
The templates that are used on different typesystem
are now placed in:
sources/pyside2/PySide2/templates/core_common.xml
Additionally, the templates used only by a certain module,
are placed next to it, e.g.:
sources/pyside2/PySide2/templates/widgets_common.xml
Some simple templates were moved to the snippets files too.
Task-number: PYSIDE-799
Change-Id: I4f355cf2ae983aba9e85414e910550189cd18dcb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The module-specific glue files as well as the standalone glue files
are now installed into the PySide2 package.
The glue files are now also listed as dependencies for the shiboken
generator run, which means that modifying those files will now
correctly force a shiboken re-run for the relevant modules.
Change-Id: I545c7ada379fafb7f225d0b0f5ce495bf6d4795d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When code must be modified or added to certain
functions, we currently have two options:
* Write a template and include it into the typesystem,
* inject code directly at a certain place of the function entry.
The problem with injecting raw code is that since it is an XML
file, one need to escape protected symbols, like "<" and "&".
Thanks to a couple of complementary commits, now we can place
this code snippets on a separate file without triggering
a whole module compiling process, since the typesystem itself
will not be alterered.
All the injected code from the typesystem was removed
and placed into a single file per module inside a top-level directory
called glue.
Some small fixes were included mainly regarding styling
of the code.
Task-number: PYSIDE-834
Change-Id: I823e92d241a528d75d5940090008db9bf297f49e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a proper `void*` treatment, so the extra
function does not seems to be necessary.
The injected code used for the interalPointer method was
also removed since is better to leave on shiboken hands
the conversion between void* and python types.
A couple of test were adapted since wrongly used ModelIndex
with Python objects.
Change-Id: I082637c7d1dd1bb0f50a3c453513e5d722f4b783
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\
| |
| |
| | |
Change-Id: I5a8f41a2236601b7c5466586dd1cfc92c1afc391
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When running test in debug mode on Windows, failures occurred:
File "sources/pyside2/tests/QtCore/qfileread_test.py", line 41, in readData
return super(FileChild2, self).readData(maxlen)
UnicodeDecodeError 'utf-8' codec can't decode byte 0xcd in position 21: invalid continuation byte
File "C:/dev/pyside/pyside-setup511d/sources/pyside2/tests/QtCore/qfile_test.py", line 57, in testBasic
self.assertFalse(obj.getChar()[0])
UnicodeDecodeError 'utf-8' codec can't decode byte 0xcc in position 0: unexpected end of data
This is caused by missing initializers and terminating \0 characters in the
QByteArrays introduced by ca806b438e8a27dc4562ac806d189765e93e09e5, unearthed
by MSVC helpfully filling unitinialized data with random values.
Fix by using a QByteArray of size n + 1 filled with 0.
Initialize the character variable in the fix_char* template.
Task-number: PYSIDE-40
Change-Id: Ia604841a89f1b1b9564c16d2f23cd9f7c20f5628
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I3bb491686968e81382c135ab737da259d9796f52
|
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-838
Change-Id: I88a8c90b53757f05668782bc407e8529f6fbb3c6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add QAbstractNativeEventFilter. Re-add the native event filter
functions on QWindow and QWidget, modified to return a tuple
bool/long, using a modification from PySide.
Task-number: PYSIDE-790
Change-Id: I86fef1a0c168e69fb3391cd882ea05190985384d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix the exclusion of QCborStreamReader::readStringChunk(char*,qsizetype)
for 32/64bit depending on qsizetype.
Change-Id: I7cd16fc83508c4ad04c2bb5e8b433c4933fef13c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes
qt.shiboken: (qtcreator) Error: .....typesystem_core_common.xml:691:104:
Unable to resolve typedef "QCborStreamReader::StringResult<QString>"
and compilation of the scriptable application.
Task-number: PYSIDE-814
Change-Id: Id6203f60e77d966933aaf28e46a0279933122eaa
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: Ie346fe7d7ac85ce0b82806904044680713375bf0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The error message when use these methods was not explaining
that the first argument needed to be the parent's type.
This adds a small phrase a code snippet that clarify the situation.
Task-number: PYSIDE-776
Task-number: PYSIDE-691
Change-Id: I0af57d65065b6d87f195d5f42fd1140a864c5edf
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- codecForHtml(), mightBeRichText(), convertFromPlainText() are now
in qtextdocument.h
- QSortFilterProxyModel: using QObject::parent; is not seen by Clang
- QCoreApplication::"winEventFilter() is a left-over from Qt 4
- Member template QMetaEnum fromType() is ignored by Clang
- QGraphicsScene::drawItems() is removed a few lines above
the failing modification
Fixes:
signature 'winEventFilter(MSG*,long*)' for function modification in 'QCoreApplication' not found.
signature 'fromType()' for function modification in 'QMetaEnum' not found.
signature 'parent()const' for function modification in 'QSortFilterProxyModel' not found.
signature 'codecForHtml(QByteArray)' (specified as 'codecForHtml(const QByteArray&)') for function modification in 'Qt' not found.
signature 'mightBeRichText(QString)' (specified as 'mightBeRichText(const QString&)') for function modification in 'Qt' not found.
signature 'convertFromPlainText(QString,Qt::WhiteSpaceMode)' (specified as 'convertFromPlainText(const QString&,Qt::WhiteSpaceMode)') for function modification in 'Qt' not found.
signature 'drawItems(QPainter*,int,QGraphicsItem**,const QStyleOptionGraphicsItem*,QWidget*)' for function modification in 'QGraphicsScene' not found.
Change-Id: I7fcae940999890b490d0793d160c722924dea6ec
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Put each candidate on a new line and limit the number of member
functions in the output.
Change-Id: Ia628e61009997b37e0f3c2129fba5ccfa29f763e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-487
Change-Id: Ib37efc4e480a978f920d3bc40756fe7abd59cb19
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use different messages for type entry not found and conflicting types.
Spell out values of anonymous enums and indicate scoped enums
and associated classes.
Change-Id: Id60eb70c28790019b29ebae174369e6963909587
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: Ie8025300580981c5349b31d4846a7f659481991d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add missing QT_BEGIN/END_NAMESPACE macros.
Patch as provided on bug report.
Task-number: PYSIDE-635
Change-Id: I7ddb447f1aafeb8da72e7e192905bafe3809797d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The operators cause compiler warnings about multiple versions and
missing return types. Replace them by a reset() method (modeled after
std::unique_ptr, QScopedPointer).
This implies some changes in the templates.
Change-Id: I21a8fb9b84ecdfecf9671fa113f1bb3c6483166f
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Add override
- Use = default for trivial constructors/destructors
- Add Q_DISABLE_COPY where applicable
- Use member initialization and remove constructors from simple structs
- Use explicit where applicable (which requires adapting code snippets
constructing a QVariant from PyObjectWrapper)
- Fix some parameter to take a const ref or pass by value
and use std::move in constructors
Change-Id: I5e0d2c4ef92d20397a7daba2f8a64b507e678510
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: Ide71a89ef173d6f3e1fa6960f7b15f1fd6cc1bf1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Classes that implement the dictionary protocol
needs to be treated as PyObject and not plain dictionaries,
then we can properly transform PyDicts to Variant Maps.
The reason behind this is that it seems that the PyDict_Check
is too permisive and allow objects that are not proper
dictionaries.
The default case by any other Sequence-like object will
be a PyObject.
Task-number: PYSIDE-82
Change-Id: I86e8a29e5b8740f69c9c6f315e9d337e599bd333
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: I5dd997d995feae2ddf207eb213fb08233dece77c
|
| |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-781
Change-Id: Ifd2ecbfe869e8739bfe91d17349a80c36b2823a5
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Most of the issues that we have in the past
were because the broad scope of PySequence.
Precisely, inside the QVariant conversion related
to PySequence we just deal with 'lists', then having
a Sequence is too broad and misleading.
The problem related to this task number was due to
the wrongly assumption that a Python class that implements
the sequence protocol is a list, and it's not.
With this change, we verify after the PyDict case if the element
is a PyList, and the last default case will be PyObject.
Thus, a custom class that implements the sequence protocol
is nothing else than a PySequence, not a list.
I'm uncertain if we really want to also have a case for
PyTuple or any other Sequence-like type.
Task-number: PYSIDE-726
Change-Id: I586ba725200acf910cf7b8c01002914984f06b5d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change underlying type of the type database from
a QHash<qualified_name, list of entries> to
a QMultiMap<qualified_name, entry>.
Previously, there was an allEntries() accessor and a function
named entries() building a QHash<qualified_name, entry>.
Simplify this so that there is only an entries() accessor
returning the QMultiMap.
Refactor the various Typedatabase::find() functions to operate on an
iterator range of the QMultiMap.
This unearthed some bugs:
1) In the generators, the call to findType(packageName()) would return
the namespace entry for "sample" instead of the intended
module type entry named "sample" due to the ordering.
Add a new function to search for module type entries and assert
that it finds it.
2) There was a duplicate, empty primitive type entry for
QModelIndexList.
Task-number: PYSIDE-757
Change-Id: I1814e4ca67d306e1488398507707cfd07b3f2c78
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\ \
| | |
| | |
| | | |
refs/staging/dev
|
| |\|
| | |
| | |
| | | |
Change-Id: Ie90b31ed1b88f1353261fc4040db2d788df279e6
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While trying to document the Limited API Project,
it suddenly struck me:
We can make the patch much much simpler and implement it
without the necessity to have an extra PepType!
Now I am happy to continue the documentation, because
it is now no more improvable.
This version will last as long as the layout of
PyTypeObject does not change substantially. When that
happens, then we need to rewrite stuff with the according
PyType_GetSlot() access functions.
These access functions will until then be complete enough
so that we can live without the tricks like inventing a reduced
PyTypeObject as was done in the current implementation.
Task-number: PYSIDE-560
Change-Id: I49849cc377baa6794a5b53292691e21d6e2853ab
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|/ /
| |
| |
| |
| | |
Task-number: PYSIDE-743
Change-Id: Ic9827a7a460db639c4316bbf4f06561007704476
|
|/
|
|
|
|
|
|
|
|
|
| |
Pass up errors from translateType() to traverseFunction().
Remove the check for void type parameters since that
is not needed any more after 50dd4ae202d7afb3556335c056db003f5ef50532.
Task-number: PYSIDE-672
Change-Id: I82c095f027196361200b8854139b4bbc1fcc38c8
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Index assignment now only accept str/bytes, bytearray, QByteArray with
size 1;
Slice assignment only accept str/bytes, bytearray, QByteArray with
limitation, that is if the step is not 1, then the number slots and
the size of the target value must be equal.
Range delete: a[2:5] = None
Shrink: value length smaller than the slot length of the slice
Expanse: value length bigger than the slot length of the slice
Range assignment with step: a[2:5:1] = ...
Range assignment with step which bigger than 1: a[2:9:2] = ...
Range assignment with native step: a[5:2:-1]
Change-Id: Ib9b929d09a691ed18c91e0c1c6b5dde827bf8d42
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Task-number: PYSIDE-336
Change-Id: Ie7d955b3b4d35e24a9eac5e7958ce2077370a34b
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we transform QVariant arguments to internal
types, starting from the Python ones, to others
related to shiboken.
After checking if the current object is a PyDict
we proceed to check if it's a PySequence.
PySequence is the complementary 'sequence-like' type of PyDict,
and allows finite and infinite sequences,
like lists or generators.
The problem is that when one implements a class
which includes the __getitem__ method, Python already
thinks that it correspond to a PySequence, then
we try to get the elements to transform into
a QList<QVariant> but it fails at the first attempt.
The solution was to not assume that all PySequences
have finite length (or a length), and also to have
a fallback case similarly to the PyDict treatment,
wrapping the PyObject as a QVariant.
Task-number: PYSIDE-641
Change-Id: I3b755f47ed076147024de38e5e0a86932d981f88
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\
| |
| |
| | |
Change-Id: I2de0fe8456fca242c56ea28520126f9ebbf540d8
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The available constructors for QByteArray are now:
bytes, bytearray, and QByteArray, unicode is not
accepted anymore.
Also the concatenation is now possible between QByteArrays.
Even though is not possible to initialize a QByteArray
with an unicode, we include the possibility to compare it with
one (Compatibility with PyQt).
The __repr__ and __str__ are now properly working.
There seemed to be a confusion regarding data types between
Shiboken, Python2 and Python3 related to bytes,
so now the structure is based on the flag SBK_BYTES_NAME,
which is define as "bytes" for Python3 and "str" for Python2.
Many tests were modified to properly handle string,
using the `py3kcompat` module.
Task-number: PYSIDE-232
Change-Id: I8b671f367c60a0870c72dcbe5662106b3225037d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I31a0ff26bc02e6cc2ec2a816c16d170fc334f800
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is the condensed checkin of 18 commits which created
the implementation of PEP 384.
Task-number: PYSIDE-560
Change-Id: I834c659af4c2b55b268f8e8dc4cfa53f02502409
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I20cf741f5b07426ad5113eb8c52f144102c331ce
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When no arguments are passed, build an empty list
and to start a QCoreApplication, QApplication and
QGuiApplication.
This is a small effort to include the idea
of a default parameter from Python.
Change-Id: Ieedc1e7ee17de996778aa2d0bddfb88c5ef208cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add QIdentityProxyModel, QLockFile, QMessageAuthenticationCode,
OperatingSystemVersion and QSignalBlocker.
Task-number: PYSIDE-487
Change-Id: I680c3d175394e9d560152a38195d015fc6abb7fa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The first argument was modified to be a socket type,
but it needs to be an int (file descriptor).
Adding a new signature solves the compatibility problem
between Python2 and 3.
A test case was added.
Task-number: PYSIDE-629
Change-Id: Id9dea37459350dfc90d0f0ab9e2e1993d03fe6e4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: Ic7aa7796dffda87ef492a99af7859c909ec607a2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Python 3 uses PyLong for integer manipulation,
and since it is a valid type in Python 2 we can
use it instead to have better compatibility,
and avoid integer overflows.
We keep the PyInt entry to avoid breaking
other sections of the code when this type is required.
Added a couple of PyInt_* alias to use PyLong_* ones
instead.
Task-number: PYSIDE-648
Change-Id: Id6af66050c5ab81fc51c1c07b1c9422a954b81c0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: I15e8a6120c249bfc5a0e2b3fa262989fafccbf57
|