| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: I8f20967c636a64cb4c289076ac9deaf185bf7e54
Reviewed-by: Simo Fält <simo.falt@qt.io>
|
|
|
|
|
|
|
| |
Change-Id: Ic430a687a6d7af7ba45df51a34c6fe7c56b3799d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 275aba0c773e649f15c89e34f15310cb8fd35c09)
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
| |
Change-Id: I366f74b737aa4f78885a44161a360bbe3f352ad6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PySide types have been following the Qt implementation of
comparisons, completely.
This is not correct for Python, because the Python default has
the operators `==` and `!=` at least. They are needed for tests
like `obj in collection`.
We fix this by redirecting the default case to
`PyBaseObject_Type.tp_richcompare`.
This is the correct way to fix it, because for types which do not
define `tp_richcompare', this is the default, anyway.
From the original patch, the test case is still in use.
Old message:
Implement __ne__ and __eq__ for QTreeWidgetItem
Testing if a QTreeWidgetItem belongs to a list raises a NotImplementedError.
I have exposed the operator== and the operator!= from C++ to shiboken which has solved our eq operator issue.
Implemented the test from PYSIDE-74 for the QTreeWidgetItem eq operator and the ne operator.
This also allows us to have the behavior "QTreeWidgetItem in ['a']" and "QTreeWidgetItem not in ['a']".
Adding qtreewidgetitem_test.py to CMakeFiles.txt
Fixes: PYSIDE-74
Change-Id: Id221c0163fc8c2d85730c4c26f22db5f61710706
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a pre-header defining QT_WIDGETS_LIB so that they become visible,
similar to what is done for QtSql.
Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io>
Fixes: PYSIDE-1374
Task-number: PYSIDE-487
Change-Id: I0fe1d8c6ca07a79ea9aa1acff00153239ca9a4cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the big change
"Fix running the PySide2 tests for Python 3.8/Windows"
the cmake paths were ordered in a way that a compilation
would not interfere with an installation.
With the new test layout, it suddenly became possible to
do a new compilation, but shiboken would not be loaded from
the compilation but use some version which is still in side-packages.
This patch fixes that so that the newly inserted directories
are guaranteed to come before site-packages.
Change-Id: Ib999664a798661533c4fe7bfab19458ce2a1d710
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removing all the different overloads that don't make much
sense in Python land, leaving only one for integers (qlonglong),
and one for floats (double), since in Python those are the general
primitive types to handle, and having a proper transformation
for uint, qulonglong, float, etc, is not really mandatory.
Fixes: PYSIDE-1372
Change-Id: Iba2e3d560dd971e3ecd0146bd5e2ec47f09c16e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the quick hack replacing "type.__signature__" by
'eval("type.__signature__")', we now use a clean initialization
function `_init_pyside_extension` that is implanted into the
__builtins__ module.
This is the first of a series of improvements and simplifications
that will be applied slowly with low priority.
Task-number: PYSIDE-829
Task-number: PYSIDE-510
Change-Id: I9951239c73d02f47272f1a531fb4886c8181b9a7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is based upon the old PYSIDE-198 proposal.
It worked with a few changes on Python 3 with limited API disabled.
When enabling the Limited API, there were a lot of crashes. This was
due to the way we need to get around access to certain implementations.
This showed that the original patch was wrong in the expression of
bindingmanager.cpp
bool isCompiled = !isMethod && Py_TYPE(method)->tp_call != nullptr;
After fixing this expression with
bool isCompiled = !isMethod && Py_TYPE(method) != &PyCFunction_Type
&& Py_TYPE(method)->tp_call != nullptr;
everything worked fine with the Limited API, too.
Fixes: PYSIDE-198
Task-number: PYSIDE-829
Change-Id: I4f887c639628041682052e90ba4c72aa98284e9e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By the slow feature patch, a line got moved into a scope where it
is possible that the `__name__` attribute does not exist.
We supply a default value which solved the problem.
The problem with this bug was how to reproduce the bug.
The doc generator has probably never been run on macOS because
without the trick
cp -r doc/CMakeFiles/qdoc.dir doc/CMakeFiles/qdoc/
the script does not work.
Change-Id: Ic1a65cfaaba5a5c1b0a8e9f390d70e70dfe38ebd
Fixes: PYSIDE-1368
Task-number: PYSIDE-1019
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Fix deprecated API and wait for the process to finish, fixing:
DeprecationWarning: QProcess.start(const QString & command, QFlags<QIODevice::OpenModeFlag> mode) is deprecated
p.start("dir")
QProcess: Destroyed while process ("dir") is still running.
Change-Id: Ib1705c9723fa1e72ea650d6f541506b62487aff7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
| |
Change-Id: I5de9fee68979a39897610aeadf8a013f28a205e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
| |
Extract briefdescription from doxygen files and make sure to
generate sphinx docs with it
Change-Id: Ibd2b104a2c85de6c3db1e8a48add061c804bd489
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
| |
Avoid duplicate functions on sphinx index for functions with multiple
signature
Change-Id: I1394657ff6e1978f65bacbab617972d04cac8aaa
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
| |
Use correct class name on constructors documentation
Change-Id: Ibee94f990dff7dbd5fad7e45f9c63ffa2f50207c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
| |
Use the new sphinx flag `any` when the type is a class and remove any
flag for native types. (`any`is available since sphinx vr. 1.3)
Change-Id: I9ac896b716bbd010c0ec5240a135c9e93d2cc96c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
| |
Create class doc even if the class do not have a constructor
Change-Id: I8bf93ab9a3184b2c810b57f46a0561f391db0eb7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
class->name() and class->fullName() now returns the correct values we do
not need to use getClassTargetFullName helper function.
Change-Id: I68371d23d454412041ddd3e910f1e7d6d6435912
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
In standard Python, there is (yet) no attribute "__signature__".
Nuitka, the compiler, knows that and raises an AttributeError without
even trying. The workaround was simple: Use "eval".
Change-Id: Ice9deccd7ba2fe4c376f0a151924a68f88ca020d
Fixes: PYSIDE-829
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When determinating the type name for Signal types,
we have special treatment for a couple of Python types
like str, int, float, bool, etc, if the current type
is none of those, we return a generic 'PyObject',
which in most cases works, but not for specific interaction
with WebChannel.
Emiting one of the previous types works out of the box,
but when using:
... = Signal(list)
we get a message stating:
> js: Uncaught TypeError: Cannot read property '0' of null
meaning that list was not really passed correctly.
The solution for this is to use:
... = Signal('QVariantList')
but as a string, not type.
Passing a string means that we will return the same type as string
from the getTypeName function, so this patch adds a condition
to treat Signal(list) as a Signal('QVariantList').
We were using this workaround for some bugs related to QtWebKit,
so it was accepted as solution.
Fixes: PYSIDE-981
Change-Id: I06720ca62426d51decc2ab08d380f7f967460788
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This setter makes sure that __doc__ for derived SbkObject types
behaves like a data descriptor.
Change-Id: I4ca1d4a224755304d9a9223b9fd6244af94d981f
Fixes: PYSIDE-1177
Task-number: PYSIDE-908
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
With 'position: sticky' we can make the sidebar stick to the top
but never go out of bounds to overlap the content or the footer.
Fixes: PYSIDE-1148
Change-Id: Id3875d44caf88e070a8abdf7b81ab8e53ad5e4d5
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The signature module took the info from the PyCFunction flags
for a long time to check if something is a function, method or
staticmethod.
It turned out that there are functions with multiple signatures
where the method/staticmethod info varies in the signatures.
This invalidated the PyCFunction flag usage.
Instead, we now compute that info directly from abstractmetalang.cpp
which has access to the correct info.
Fixes: PYSIDE-1328
Change-Id: I6ba7237efcc486de014184b1787d05d87bee5a5e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
| |
Rename variables and functions to snake case and streamline
code.
Change-Id: Ia4d1b36f5cebfe8ef58f161bafa3e1628109c865
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This was merged with "WIP: Enable support for Python 3.9".
There were minor problems, only.
Thanks Cristian for adding cosmetic changes which should already
have been applied in Python 3.8 or earlier.
Change-Id: Id5e8696d9cfb7192243ad44c93e9f2cf347d6a7c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Use QRandomGenerator instead of deprecated qsrand()
and remove usage of deprecated QPolygonF constructor
taking the size.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: Ic4b773772555716636f5dfec797052a945d431cd
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In operator functions, some code would be generated
for reverse shift operators and the remaining code
was enclosed in if (!pyresult) without proper indentation.
Generate the if (!pyresult) only when required and indent
it properly by using a QScopedPointer<Indentation>.
Change-Id: Iecffaa3d0a7b243e661b553726066d1177ab0298
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The constructor of QQmlComponent uses qml threads,
and their usage was producing a deadlock when using along
Python classes for a urlInterceptor, mainly related to the
'allow-thread' story that we need to take care of.
Since the QQmlComponent required threads, we enable
all the constructors to allow them to avoid a deadlock.
Fixes: PYSIDE-1349
Change-Id: I86cb97b011f483cc4142bed6fae1ea525fa0db47
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
| |
Fixes: PYSIDE-1355
Change-Id: I27a31bd2efd685f9cd3ac4dc780ab4fa7f7f5720
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Feature switching was written rather naively and happened after
almost every module change which can occour very often.
This patch is much more careful with switching and uses an ignore
code to prevent switching when PySide was not imported at all.
A potential regression when a switch is set before some PySide
module is being imported and PepType_SOTP is zero was also solved.
Task-number: PYSIDE-1019
Change-Id: I24dec7b3e4d0b577f77262392ded0b8a2006b3cc
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
There are setup errors that fail to initialize the signature module
correctly. This is for instance possible if packaging puts the shiboken2
module somewhere into the path, but the binary cannot be reached,
because shiboken2 also exists as a dictionary.
Task-number: PYSIDE-1352
Change-Id: I679d6855c87093b946cfbaeb063c10d45b00c8ad
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the big optimization of selectable features, the cached
select Id-s can also be used to simplify the case selection.
Also, the MSVC glitch with signed bitfields is circumvented
by unsigned bitfields.
Further a merge error was reverted which killed
signature: Clean up and improve readability 3d4d91334
Christian Tismer <tismer@stackless.com> 10. Jul 2020 at 11:06
Change-Id: I783dc6d73b88016e70c58daeb207f1537fb38f72
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
** fix: MSVC needs extra sign bit in basewrapper_p.h! Buglet? **
The new feature selection has some tiny overhead.
It is about two dict accesses plus a slot access for every
tp_(get|set)attro call.
The introduction of an explicit `__init_feature__` call allows to
optimize this overhead very nicely, because this init is done for
each __feature__ import:
First, we can remove that tiny overhead completely by not initializing
the feature_select module at all if no __feature__ import is used.
Second, we can optimize this access further by caching the current module
dict. If the dict is unchanged, then the last select_id can be used.
This reduces the overhead of frequent calls to a single slot access.
Third, we finally cache the select id in unused SbkObjectType bits.
That removes the last structure where repeated attribute lookup is used.
The overhead is therefore quite small when something is changed.
But typically these changes are infrequent. The majority of accesses
do change nothing, and this case is now quite much optimized.
Change-Id: I7d1a4611a1c19216fd9be8f04457bb18ebd52ab1
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This change tries to make the selectable feature patch
better understandable.
If you know about anything that could help to clarify this
better, please help improving this by adding what is missing.
Change-Id: Iaf1664f8a703b2dc234df83814f6f4258fe14936
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the implementation of the first of a series of dynamically
selectable features.
The decision depends of the following setting at the beginning of
a module after PySide2 import:
from __feature__ import snake_case
For more info, see the Jira issue, section
The Principle Of Selectable Features In PySide
The crucial problems that are now solved were:
- it is not sufficient to patch a type dict, instead the whole
`tp_mro` must be walked to rename everything.
- tp_getattro must be changed for every existing type. This
is done either in shiboken by a changed PyObject_GenericGetAttr
or PyObject_SenericGetAttr, or in the generated tp_(get|set)attro
functions.
An example is included in sources/pyside2/doc/tutorial/expenses.
Task-number: PYSIDE-1019
Change-Id: I5f103190be2c884b0b4ad806187f3fef8e6598c9
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Qt Quick Controls 1 is deprecated and has been removed in Qt 6.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: If70fde907c3984b0593186a9b570a921f270d45c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Fixes: PYSIDE-1353
Change-Id: I65630921f02f2a47c8319349ce649e037a0748b5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As of Qt 6, there is a trend of hiding bool returns of comparison operators
of container classes behind some template expression which the clang parser
cannot identify. To work arouind such cases, make it possible to add
them as functions without code injection which will generate the
default code.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: Ia7bf5d583e0f80505fe1b759347955fec5dca600
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test was marked QEXPECT_FAIL() since the code snippet does not
compile with clang:
main.cpp:7:9: error: overloaded 'operator-' must have at least one parameter of class or enumeration type
main.cpp:8:9: error: overloaded 'operator/' must have at least one parameter of class or enumeration type
With Clang 10, the compiler even crashes on Windows.
Remove the offending part.
Change-Id: I3d954f19884e42b61dcfc2e7a9ec4f2a31fd432b
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Modernize, use override, nullptr
- Fix include conventions
- Remove *Private structs. They don't make sense in a static
plugin.
- Add some explanatory comments
- Add missing initializations of members
- Most importantly: add error handling to
PyCustomWidget::createWidget(), which so far would swallow all
errors encountered when executing the Widget's __init__ function.
Change-Id: I100a4239013f959c8fb0b0adc0d3a99f73bd4bff
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code model was seeing
photon.h:93: template class LIBSAMPLE_API TemplateBase<IdentityType>;
as complete class definitions, shadowing the previous template definition.
Add some processing removing them.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: If0f28feeb6e3ff8c064e8853784240695f79e0b4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Use the relative path for git as git submodule foreach (as invoked
by "clean") does not work with spaces in the path on Windows.
Change-Id: Ia53e8ef9a48c88fb3159bf961da4798216422f3c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Static strings are used in PyName and PyMagicName very much.
With the introduction of name mangling and the __feature__
selector, many thousands of static strings are created.
The destruction of static strings was activated and the
implementation was corrected. The principle was reverted to
a simple vector, because interned strings behave like normal
strings. The sharing of references happens transparently.
Change-Id: I915ab6585fe4f81e0d05b9da82842bb33e0bc938
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
| |
Move rstrip() below read check.
Change-Id: I56333b813aaa8608296e8f8e3181bacf10d2f63f
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The newly introduced history pruning has a timing problem
on RHel 7.6. We disable pruning now when COIN is
active. This makes anyway only sense for multiple
builds on a developer machine but not in COIN.
Change-Id: Ic4b4f2e42303e343d222b98655300509f83c7288
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The feature selection framework had a very early static
initialization from the early stages of the development.
Normally, Python is initialized before PySide gets loaded.
In case of scriptable application, this might not be so.
Actually this static initialization was no longer necessary
and was removed, as the bug was hopefully as well.
Change-Id: I2c703c9cac14b6093d0c43c4bae94ff2b29c0640
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
| |
Task-number: PYSIDE-841
Change-Id: I9ba6e6dfe9c5755d7246c44f78e2c3eeae0d5cf7
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The always growing list of invalid directory entries
in the history will get pruned to only keep the latest
days entries.
Change-Id: Ie104ca9874f985f0040950f650390798f45fc6d5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
Split the function and add more error handling, add the source
location to the message
Task-number: PYSIDE-1019
Change-Id: I74276b2f163ff52db6792e3f3b8907ad392f1055
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Interactive testing always needs the BUILD_DIR variable.
This makes sense for automated tests.
Having to insert that manually all the time is a bit annoying
and not necessary, since we already have that info in the
history.
Change-Id: I5d35ce8504af36280eba236b2be4e6b4f320d1cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|