| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "Cleanup pointer whitespace" patch was augmented by some
C++11 changes.
Unfortunately, this was done in the same commit, and so some old
whitespace that was removed could re-appear invisibly, since it
was in the original version.
This fix tries to remove all trailing whitespace and also adds a few
" *" corrections that were lost. The "type *" entries in XML files were
changed back to "type*".
Change-Id: Ic5c945ad64a47455fb15eebdf184b126af5ecd1d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Among other files to fix, basewrapper.(cpp|h) was full of uncommon
pointer whitespace. After fixing that, I could not resist and fixed
also libshiboken, generators, and after acceptance also PySide.
Most of the time, this regex worked fine
(\w\w+)([*&]+)[ ]*(?![&*]*[/=])
replaced with
\1 \2
but everything was checked by hand.
I did not touch the shiboken tests which are quite hairy.
It turned out that inserting a space between a variable and asterisk
causes a crash of shiboken, if the same line contains "CONVERTTOCPP".
This was temporarily fixed by adding another space after it.
Example..
sources/pyside2/PySide2/glue/qtcore.cpp line 977
QByteArray * cppSelf = %CONVERTTOCPP[QByteArray *](obj);
//XXX /|\ omitting this space crashes shiboken!
cppgenerator.cpp was special, since it was modified to _generate_
correct pointer whitespace. This caused a few testcases to fail,
which had to be adjusted, again. This was difficult since some
internal names must end on "*" and generated code normally not.
Removing the last errors involved binary search on path sets...
Apply C++ 11 fixits to the changed code, where applicable.
Done-with: Friedemann.Kleint@qt.io
Task-number: PYSIDE-1037
Change-Id: I4ac070f52c5efb296c05d581c9d46e6f397a6c81
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change 43451e3bc17467593df64cb73ce8c0bf9e60045f from 2018-05-09
introduced a refcount bug that was not caught because we do not
build with debug Python.
This also revealed an omission in the patch
"PySide: Allow any existing attribute in the constructor"
when debug Python is used.
Change-Id: Idbcbbc87f0a83bb696d03e05af0cf616b21f7335
Fixes: PYSIDE-1027
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are signals and properties which are correctly supported
in PySide by the function "fillQtProperties". The structures are
introspected by calling "QMetaObject::indexOfSignal" and
"QMetaObject::indexOfProperty".
By allowing any property, extending the above restriction,
we break the Qt API slightly, but have the tremendous
advantage of being able to write all needed properties into
the constructor call.
This approach is a compromize that keeps the attribute calls
as they currently are. Supporting real properties where we
actually have getter and setter functions would be possible
as well, but that would break compatibility very much!
It has to be discussed if we want to support a configuration
switch that enables this incompatible change.
If we would go this far, then I would do this together with
changing mixedCase to lower_case.
A simple test case has been added.
Task-number: PYSIDE-1019
Change-Id: I8094df51d63aa767a5a9ec1c83bcf7db7b157a01
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Introduce C++ structs with QByteArray to be used for signal and slot
names and signatures, removing a lot of code dealing with char *
pointers, strdup() and reallocating.
Change-Id: I28acf727bc6cf468285b153c85b0a342fd79f7d8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
The function slotCall() used the now deprecated function
QString::sprintf(). Rewrite the code using QByteArray since converting
to QString and back is wasteful for the purpose.
Change-Id: Ifcd50e76bb7ea0c9d2f2e7453c6e265abe6265b7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a CMake super project that includes the shiboken2, PySide2 and
pyside2-tools subprojects, so that it's possible to build everything
from Qt Creator (or any other IDE that supports CMake)
with minimal set up effort, and thus inform the IDE CMake integration
of all relevant files, for easier code editing, navigation and
refactoring.
This also lays the foundation for allowing 3rd parties to use the
shiboken2 generator to generate custom modules. This is
achieved by eliminating various hardcoded paths for libraries and
include directories.
Start using CMake targets throughout the build code to correctly
propagate link flags and include dirs for libshiboken and
shiboken2 executable targets. Same for the libpyside target.
Generate two separate cmake config files (build-tree / install-tree)
that can be used with find_package(Shiboken2), to make sure that
the PySide2 project can be built as part of the super project build.
This is currently the only way I've found to allow the super build
to work.
Note that for the build-tree find_package() to work, the
CMAKE_MODULE_PATH has to be adjusted in the super project file.
The generated config files contain variables and logic that allow
usage of the installed shiboken package in downstream projects
(PySide2). This involves things like getting the includes and
libraries for the currently found python interpreter, the shiboken
build type (release or debug), was shiboken built with limited
api support, etc.
Generate 2 separate (build-tree and install-tree) config files
for PySide2, similar to how it's done for the shiboken case, for
pyside2-tools to build correctly.
Install shiboken2 target files using install(EXPORT)
to allow building PySide2 with an installed Shiboken2 package
(as opposed to one that is built as part of the super project).
Same with PySide2 targets for pyside2-tools subproject.
Make sure not to redefine uninstall targets if they are already
defined.
Add a --shorter-paths setup.py option, which would be used by
the Windows CI, to circumvent creating paths that are too long,
and thus avoiding build issues.
Output the build characteristics / classifiers into the generated
build_history/YYYY-MM-DD_AAAAAA/build_dir.txt file, so it can be
used by the test runner to properly filter out blacklisted
tests. This was necessary due to the shorter paths options.
Fix various issues regarding target includes and library
dependencies.
Remove certain duplicated cmake code (like limited api check and build
type checks) in PySide2, given that that information will now be
present in the exported shiboken2 config file.
Include a short README.cmake.md file that describes how to build
the super project.
References used
https://rix0r.nl/blog/2015/08/13/cmake-guide/
https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/
https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1
https://cliutils.gitlab.io/modern-cmake/chapters/basics/functions.html
https://cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html
https://github.com/ComicSansMS/libstratcom/blob/master/CMakeLists.txt
Abandoned approach using ExternalProject references:
https://cmake.org/cmake/help/latest/module/ExternalProject.html
https://stackoverflow.com/questions/44990964/how-to-perform-cmakefind-package-at-build-stage-only
Fixes: PYSIDE-919
Change-Id: Iaa15d20b279a04c5e16ce2795d03f912bc44a389
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The attributes were ignored when a new Property was
being add to the MetaObject.
The addProperty method was only creating a new QProperty
with the name and default values.
The way of setting the attributes comes from:
src/corelib/kernel/qmetaobjectbuilder.cpp
specifically QMetaObjectBuilder::addProperty.
Change-Id: Id81a274b3c2ae9d6b3413ebd54c776cefa392a38
Fixes: PYSIDE-924
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix warnings occurring in 5.13:
sources/shiboken2/ApiExtractor/abstractmetalang.cpp:1431:66: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = AbstractMetaFunction**; LessThan = bool (*)(AbstractMetaFunction*, AbstractMetaFunction*)]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
sources/shiboken2/generator/shiboken2/cppgenerator.cpp:358:43: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator) [with RandomAccessIterator = Include*]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
sources/shiboken2/generator/shiboken2/cppgenerator.cpp:1683:55: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator) [with RandomAccessIterator = QList<QString>::iterator]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
sources/shiboken2/generator/shiboken2/cppgenerator.cpp:5500:53: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator) [with RandomAccessIterator = Include*]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp:1585:65: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = AbstractMetaFunction**; LessThan = bool (*)(const AbstractMetaFunction*, const AbstractMetaFunction*)]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp:1681:24: warning: ‘void qSort(Container&) [with Container = QStringList]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp:2054:25: warning: ‘void qSort(Container&) [with Container = QStringList]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
Change-Id: If6940941ac31327597ce362a31b27773f4d5b94c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use std::vector to collect the base types. Append the type
first to avoid reshuffling when prepending.
- Add properties immediately instead of storing in the 2nd
loop as signals are already added.
- Clang tidy: Use range based for, auto, nullptr
Task-number: PYSIDE-784
Change-Id: I765beb2d09600e78abd314cbb394cd106ec22f03
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| | |
Change-Id: I3bb491686968e81382c135ab737da259d9796f52
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a type has nullptr as tp_dealloc, there apply different defaults.
Static types had object_dealloc as default, while new heaptypes
created with type_new have subtype_dealloc as default.
A problem was now that PyType_FromSpec also has
subtype_dealloc as default. But that is wrong, because a type that
was written with the static type approach is already written with
object_dealloc in mind and takes somehow care about further issues
with that type.
When we now convert this type and suddenly use subtype_dealloc
instead of object_dealloc, things get pretty wrong.
Finding that out was pretty hard and took quite long to understand.
The fix was then very easy and is the best proof:
Replacing our former (wrong) solution of supplying an
SbkDummyDealloc with a function object_dealloc works perfectly,
and the leakage completely vanished.
The documentation now is also corrected.
Task-number: PYSIDE-832
Change-Id: Ifc20c28172eb5663cd5e60dac52e0a43acfb626c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Qt 5 introduces a new class QMetaObjectBuilder for generating dynamic
meta objects for use cases like QML. It provides an API to add methods,
properties and info and a factory method toMetaObject() to obtain
a QMetaObject snapshot reflecting the changes.
Replace the DynamicQMetaObject aggregated by TypeUserData by a class
MetaObjectBuilder wrapping a QMetaObjectBuilder with dirty-handling.
The code to create the binary data of the QMetaObject can then be
removed.
For plain Qt objects, the wrapped base meta object will be returned
(which fixes the bug).
Task-number: PYSIDE-784
Change-Id: Id8a54570aff36c75fe0f3bf2d297a12d02cd773a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
objects
Add helpers with overloads to reduce reinterpret_cast<> and
increase type safety.
Task-number: PYSIDE-784
Change-Id: I334fd7d149a6730094b062dd0371b9a29379d725
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is in fact a struct. Amends 7127a16f53fdadc709d234abf83d7fadfdf3aba7.
Fixes:
warning: class 'QMetaObject' was previously declared as a struct [-Wmismatched-tags]
Change-Id: I3ed3d17706123f3649ac6e889080c5ab095f7e07
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I577ca66e0bd92cfedd060b46f4946963eb91f991
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove unused #include directives, group by libpyside, libshiboken,
Qt, C++ and sort alphabetically with the exception of sbkpython.h
which sanitizes the "slot" defines and needs to go to the top when
used). Add the module to the Qt classes.
Change-Id: I33d912135bad928d3073a1ddeb487de237d6a45e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ied37d22fbd8277811aaea15af0018cec545814c7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, DynamicQMetaObject instances were retrieved
by direct reinterpret_cast from the SBK user data.
This is not entirely correct since the DynamicQMetaObject
is merely the first member of the struct TypeUserData.
Fix this by moving the struct TypeUserData to a private header
and correcting the casts.
Task-number: PYSIDE-784
Change-Id: I69ea68bd474c4a38a5f5c5bc3db8bc3bb086e012
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes the development process easier.
Task-number: PYSIDE-784
Change-Id: I07ced4b25b65c90e5a17d85be9b8f15a26e5d07d
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use iterators instead, avoiding repeated lookups of hashes and maps.
Change-Id: I3b430bdf0ceef1980baeca45849880d35538e89b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Expand code to fix:
signalmanager.cpp:328:41: warning: 'int PySide::SignalManager::addGlobalSlotGetIndex(const char*, PyObject*)' is deprecated [-Wdeprecated-declarations]
Change-Id: I5ada505b8ed9a8bd7e604633bc672109450ede6f
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Emit a warning instead of asserting in
SignalManager::registerMetaMethodGetIndex() when source=0.
Task-number: PYSIDE-800
Change-Id: Ic3c67d39ddb3d1c1f808d6434f37fbdd74868b5b
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rearrange definition and delete move constructor and move assignment operator.
This unearthed that the (default-generated) move assignment operator
was used (unintendedly) in:
QDataStream &operator>>(QDataStream&,PyObjectWrapper&).
Factor out a reset() method (modeled after std::unique_ptr, QScopedPointer)
for this.
Change-Id: I48c4f9ca1353984da870bb7eb3308a9f3374d309
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Id7b8c7ee48a3e0017d4c66fba34dff573fc59008
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Remove unused list parameter from DynamicQMetaObject::createMetaData(),
adapt signatures, make const where applicable and streamline code.
Change-Id: I0733382b2a6a35579d3e69280d674ad8a8f1bbc6
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Remove else after return/continue/break; unindent code
or simplify return conditions
- Use isEmpty() to check for empty containers
- Fix C-style casts
- Pass std::size_t by value instead of const ref
Change-Id: Ic997d7c39720c1cd3698c4d750e9cfc1f1654788
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
| |
| |
| |
| |
| |
| | |
Rename method and fix comments.
Change-Id: I7765826540de0bf03ac41214d357e605d8e84bcf
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\|
| |
| |
| | |
Change-Id: Ide71a89ef173d6f3e1fa6960f7b15f1fd6cc1bf1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When types have attributes starting with two underscores but
ending with at most one, Python uses name mangling to create
a unique private variable.
PySide needs to obey this rule in the tp_getattro methods.
We implemented it as an optimized _Pep_PrivateMangle function that
solves the problem internally without exposing the _Py_Mangle
function.
Remark: I think the exclusion of the _Py_Mangle function is another
oversight in the Limited API.
Task-number: PYSIDE-772
Change-Id: I0bfc2418dae439e963a16e37443f2099c6980696
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
It has been a problem to compile the file "typespec.*" when using
Python 2. For some reason, the name "slot" was not usable.
I cannot find out what it was and how it vanished, but now I could
remove the work-around without problems. Maybe it is due to some
different includes which don't define some macros?
Change-Id: If316c9c78a18cffcc5e4cac07610bd7f522db446
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
The flags structure should give correct full names.
See the doc in the issue tracker.
Task-number: PYSIDE-747
Change-Id: I6b5c602566d3e4b8a2a93e2522e92da956578b18
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QT_LOGGING_RULES was internally overwriting the
PySide2 QLibraryPath configuration, so all the paths
were incorrect.
Please follow PYSIDE-717 for a discussion on an
alternative to have a proper solution.
Task-number: PYSIDE-694
Change-Id: I551d7876a416ac31fcff70d843a28c98dfa5ed08
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removing the word 'project' from all the headers,
and changing the PySide reference from the examples
to Qt for Python:
The following line was used inside the source/ and
build_scripts/ directory:
for i in $(grep -r "the Qt for Python project" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/the\ Qt\ for\ Python\ project/Qt\ for\ Python/g' $i;done
and the following line was used inside the examples/ directory:
for i in $(grep -r "of the PySide" * |grep -v "pyside2-tools" | awk '{print $1}' | sed 's/:.*//g');do sed -i 's/of\ the\ PySide/of\ the\ Qt\ for\ Python/g' $i;done
Change-Id: Ic480714686ad62ac4d81c670f87f1c2033d4ffa1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
| |
When referring to the project one should use "Qt for Python"
and for the module "PySide2"
Change-Id: I36497df245c9f6dd60d6e160e2fc805e48cefcae
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When PyInstaller is used to deploy a PySide2 application, it changes
the layout of the copied PySide2 files (no Qt subfolder, all shared
libraries are copied next to tehe generated executable). In that case
using the internal qt.conf won't work.
Detect if there a exists a qt.conf file next to the executable, and
use that file instead.
Note that this won't work when the executable path has unicode
characters in conjunction with Python 2 and Windows, but that is an
unsupported config anyway (due to the mixing MSVC issue).
Also add a logging category to ease figuring out which qt.conf file
is used if a need ever arises to do so.
Task-number: PYSIDE-642
Change-Id: I1260cbc13e5e62be72c4ed9c64c2aa5905d2e9c6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were 2 issues:
1) QtWebEngineProcess could not be found on Windows because we have a
non-standard directory layout for the Qt files we copy over (there
is no bin directory), so we need to adjust the internal qt.conf
which is set in pyside.cpp
2) QtWebEngineProcess itself does not use the qt.conf from pyside.cpp,
because it is a separate executable, and thus we need to supply a
qt.conf specifically for it which is placed in the libexec folder.
Task-number: PYSIDE-626
Task-number: PYSIDE-631
Task-number: PYSIDE-642
Change-Id: I75d1b083fb5afe5dc31ba90174f42c7f559c5cd5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When building PySide with a debug Python, a lot more problems
become visible.
They were triggered by some malicious ordering of the shutdown code,
which must come *after* the refcounts of the variables are adjusted.
The initial issue PYSIDE-585 was caused because the shutdown code
is not only used for every created Q*Application, but also for the
module shutdown, which deletes qApp_contents too often.
Instead of special-casing that or adding some refcount, it was much
more intuitive in that context to set qApp_content's refcount to the
same value as Py_None, which also is not supposed to be garbage
collected.
Btw., the reason for the error message is that Py_None has it, too.
When we set qApp_content's type to Py_None's type, it inherits
the protection code that prevents someone from garbage collecting
Py_None.
Task-number: PYSIDE-585
Change-Id: I4af9de1192730f06054a5aca099a32e2392e367d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When emitting a None signal the PyObjectWrapper constructors
in the signalmanager were not working properly, but using the
safe macros to increase and decrease the references of the
object solves the issue.
Task-number: PYSIDE-17
Change-Id: I1871e5b8227d6ddc893afce2ab9b311b60649024
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When connecting a signal with a slot there is a process
to associate the proper signal signature, but the slot
signature was not verified.
This missing verification step lead to wrongly associate
the slots and the signal signatures, for example:
def on_clicked(checked=True):
...
QGroupBox.clicked.connect(on_clicked)
will wrongly connect the slot "on_clicked" with the
signal "clicked()" (without any argument),
when the proper signal is "clicked(bool)".
This can be solved by manually specifying the arguments:
QGroupBox.clicked[bool].connect(self.clicked)
We can add an additional verification step
to associate the proper signal if the slot has
a certain number of arguments.
There is an existing test that checks the compatibility
of this change with all the ways to connect
signals and slots.
A few additional cases were added.
Task-number: PYSIDE-104
Change-Id: Ic5b06fa3bb91903f7d506e0e2c52a6f7d3dc4570
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|\
| |
| |
| | |
Change-Id: I5d1a4734e8f44785898ba62beaa0bdd2004fca22
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change makes sure to resolve symlinks and copy only one file for
every dynamic shared library used (vs 3 before -> 2 symlinks + 1
actual library). This avoids duplicate files, as well as saves space
when creating wheel (e.g. no 3 copies of standalone WebEngine
library).
This filtering happens copying from CMake install dir into
pyside_package_dir (the symlinks are still present in the CMake
dir, but that shouldn't harm anybody, and might be useful for
users of shiboken only for example).
Task-number: PYSIDE-495
Change-Id: I0fe454e16c6b254a8682aa7b1c702ec01a3064f0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using PyCFunction_GET_FLAGS is unsafe, because it does not check
whether the argument given is actually a PyCFunction object. This
macro needs to be replaced with the function equivalent
PyCFunction_GetFlags for stable ABI patch, but this will cause a crash
in PyCFunction_Call because we don't check the return value of
PyCFunction_GetFlags to see if it fails.
Rather than checking the return value, it is safe to preemptively
add a PyCFunction_Check before calling the GetFlags function. This
does not modify the logic behind signalCall function.
The crashing test was homonymoussignalandmethod_test.py, so no
new test is needed.
Task-number: PYSIDE-593
Change-Id: Id9ac9c0dec454e8e1ce9516dc68af924372a34a9
Reviewed-by: Christian Tismer <tismer@stackless.com>
|