| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
"Qt::WindowFlags flags = {}" was mistakenly changed to
"Qt::WindowFlags flags = Qt::{}"
Pick-to: 6.0
Pick-to: 5.15
Change-Id: Ic160a220db56645f0f554863c0a0d5e92b1307dd
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Pass the innner message out so that it appears in the qFatal()
message.
Change-Id: Ib38d54de58647037204d76bc7c78fcb3bf82fca5
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
Apply the fix created by clang tidy'
-wreadability-convert-member-functions-to-static
warning with some manual correction.
Change-Id: I394bd96881fa25dbcb7a725b79d10395fcbb8676
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
checkers
- Remove unused variables
- Fix potential memory leak in type system parser
- Initialize return values
- Use const ref to avoid copies
- Integer conversions
Change-Id: Ib84236d58849143e9ae6af0079985503b773bca3
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
| |
Change-Id: If8d1b8a6ef4782bf75320454509a4c4a343a52f8
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
The cache can then be used by all generators and
buildAbstractMetaTypeFromTypeEntry() and some dependent functions
can be made static.
Change-Id: Ied8e683f20fe80915d3c81fffb4b39a80c7cd0d5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Fix an oversight of 6a1a08cfaf11ad38612e59cb1d56160160504ec8.
Pick-to: 6.0
Change-Id: Iba09b4c631132f7c50ab6b2321b9e93a61c26650
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
- Remove unused variables
- Remove assignments that do not have any effect
- Fix mixing const/non-const iterators
- Fix for loops, use const ref and/or qAsConst()
Change-Id: I4b52f11030493c440026b194f18ec0151a3ea710
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The signature module is modified again to be more correct when
using the mypy application.
This part splits some changes which occurred when working on
Shiboken.Enum inheritance.
There will be a number of follow-ups:
- signatures for all shiboken types
- test cases for signatures
- signature support for different __feature__ selections
Change-Id: Ifb0d92bf7641f2909ab950e3458b3c3c68c20dad
Pick-to: 6.0
Pick-to: 5.15
Task-number: PYSIDE-510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
| |
Change-Id: Ief8aa743f47216e728a241a7cd4de360271c5568
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Originally, it was planned to follow a competitor and derive enums
from int objects. But this was abandoned in favor of Python Enums.
We therefore simply leave most code as it is and only insert a
Shiboken::Enum class that accepts an optional integer.
This class is published by shiboken with signature.
Derived classes still have no signature themselves, but they all
inherit from this known class Enum. This is intentional to avoid
creating useless signatures for every derived Enum.
A test was included.
Change-Id: Ifaaea40a4ddf2337e565fb57e6a69b7cc9a6040f
Fixes: PYSIDE-1347
Pick-to: 6.0
Pick-to: 5.15
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Add command line options --clang-option, --clang-options
to be able to pass options. Allow for a complete replacement
of the built-in compiler support options by specifying '-'
as the first option.
Task-number: PYSIDE-1477
Change-Id: Ibcb107e5d0c4dedb56ab07e83af4203f0f682850
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the string map in the CommandLineArguments struct by a
QVariantMap, which can store strings and string lists.
A number of list split and join operations can then
be removed.
Replace the path splitter by QDir::listSeparator().
Task-number: PYSIDE-1477
Change-Id: I70b798e531787d4932605ed5121b523fff5c1110
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Use a std::optional<CommandLineArguments> as return value.
An error can then be distinguished from an empty map.
Add error handling for failing to open a project file which
was previously ignored.
Task-number: PYSIDE-1477
Change-Id: I69fa5e149818c8186755810c013232aa40d03dd9
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
For key/value pairs specified without space after '=',
the key would be truncated.
Pick-to: 6.0
Pick-to: 5.15
Change-Id: I154b1685ca8aab2f13fb916290cde17bc972afea
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
| |
Task-number: PYSIDE-1477
Change-Id: I9d5734c96824ff40360d6a4197ed8bb69c09cb0b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit c3fc507d3b2a502273bd92472e1e7aa459c2d13e.
29be13664858cdb7ed7cbc02d6ad496bf57a9bbd moves this handling
to the coin scripts, where it belongs.
Some functionality was already removed by
e44e21f14d8b10b1832c5db5459bf26f287ab6e8.
Task-number: PYSIDE-431
Change-Id: I7474ea17230e484a53019eb7575d3dd9839e9263
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function should initially not allow deleting Q*Application
with a shiboken.delete() function, but unfortunately some
competitor can do that, so we will as well.
Deletion of qApp needs knowledge about qApp.
We add a hook function that calls the pyside function
`destroyQCoreApplication`.
A special problem was testing interactively.
See the error description for the days long journey :)
Change-Id: I34862425c2cb2cc80d6cafc22d25a867f96f3e0a
Fixes: PYSIDE-1470
Pick-to: 6.0
Pick-to: 5.15
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
| |
The libraries were empty on Linux, causing the Designer plugin to not
load due to missing python dependencies.
Task-number: PYSIDE-1455
Change-Id: I4ccc7513bf45396fedc4e019eb425d2a956d0dfa
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Pick-to: 6.0
Change-Id: I6c1063cf94ec790ad34d8edaee8d524b8fb28ed8
Reviewed-by: Simo Fält <simo.falt@qt.io>
|
|
|
|
|
|
|
|
|
| |
This should be the last patch related the usage of f-strings
from the 'sources' directory.
Pick-to: 6.0
Change-Id: I0288d720dc4930dee088ca3396a66d1b3ba18f76
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PySide 6 suddenly has problems with feature switching during
subtype initialization.
We introduce an enable function that can temporarily suppress
switching. This problem is solved so far.
It is the question whether this will break again in another
constellation. It might be considerable for the future to have
something like Python's PyType_Ready function.
Right now this is too much effort.
Change-Id: If0ed786d4761cf2356f01f7478e4a0d750e88d3c
Fixes: PYSIDE-1463
Pick-to: 6.0
Pick-to: 5.15
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
It cannot entirely be avoided in the case of the scriptable
application example. Generate code checking on the global
variable.
Pick-to: 6.0
Task-number: PYSIDE-487
Change-Id: I12bcd9df37c39f78f1d7edc63e16b3c6a9525011
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After simplifying qApp so much, it is no longer necessary to treat
Q*Application special. We now can allow garbage collection for
all objects which simplifies the code quite much.
Then it was easy to shrink the implementation to a single function
`MakeQAppWrapper`, which made the whole "qapp_macro" files no
longer necessary.
This cosmetic change will probably not be back-ported to 5.15 .
Task-number: PYSIDE-1447
Change-Id: I8ae3c5575e62bd7b5d6bac65c25775c712bb178f
Pick-to: 6.0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an old problem that was solved for Python 2.7.
From Python 3.8 on, the behavior is the same with Python 3.
The fix finally was to extend a Python 2.7 patch to Python 3
as well. See the Jira issue for details.
Other little changes:
This patch includes also a small patch that was mentioned as
necessary for Python 3.9: Python issue 40217. I have seen no
effect of this change yet but applied the patch, anyway.
When searching for a solution of this problem, a lot of time
was spent debugging qapp_macro.cpp, although it was error-free.
As a side effect for better understanding, the variables were
renamed to more common style.
These more independent changes could have got their own check-in,
but the complication of a pick-to and the small code size wasn't
worth the effort.
Change-Id: I7638f1a711315b4678af6b7389265b905c6404a1
Fixes: PYSIDE-1447
Pick-to: 5.15
Pick-to: 6.0
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
| |
Break out of the loop when dirname() returns the identical string.
Fixes: PYSIDE-1460
Pick-to: 6.0 5.15
Change-Id: I31a53946bb302758acb196f47a9ad605edfdd667
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
It is only used for the "target" attribute of
PrimitiveTypeEntry, all other overridden methods
return some Java-ish name.
Make it a settable property and remove the overridden methods.
Pick-to: 6.0
Change-Id: I34dd3c7a2cb3ea4f6968dc8c8d1a70aad9fbf5ed
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
- Rename CPython types to cPy*
- Use them where applicable
Change-Id: Iea05f7d7de5402b9de6d8a614da899b0b67811dc
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
Add the missing overloads of AbstractMetaClass::findClass()
and adapt some types.
Pick-to: 6.0
Change-Id: I65851248b4b6a2e1d4f57fc58ecaf75fb4c00b29
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Separate the generators from ApiExtractor by introducing
a class ApiExtractorResult storing the results of an ApiExtractor run.
Move some query functions there.
With that, some generator functions can already be made static by
passing the ApiExtractorResult and OverloadData can be decoupled from
the generator.
Pick-to: 6.0
Change-Id: Iaba3ebff4aecb722eec4a606423738260983d905
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Pick-to: 6.0
Change-Id: I53f4b9634568a5626d972e50cc67f4bec8fe92fc
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The list of classes was first sorted topologically, then
alphabetically in the AbstractMetaBuilder and finally again
topologically in the CppGenerator with an additional dependency
QObiect/QMetaObject.
Move the sort functionality taking the QObiect/QMetaObject
dependency into account from the generator to the AbstractMetaBuilder.
Move all sorting functionality to helper sortLists().
The classesTopologicalSorted() helper is then no longer needed by
the generators and can be removed from the ApiExtractor.
Pick-to: 6.0
Change-Id: I03c799118296393bdd0f3de84427b50ab29153b0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AbstractMetaClass has a list of base class names and a list
of AbstractMetaClass* base instances.
AbstractMetaBuilder populates the instance list from the
names in setupInheritance() and sets a flag.
In a few places in AbstractMetaBuilder, the base class
instances are needed before this has been completed.
For this purpose, the helper
AbstractMetaBuilder::getBaseClasses() is needed.
Replace the set of classes m_setupInheritanceDone
by a flag on AbstractMetaClass. This allows for adding
an assert to AbstractMetaClass::baseClasses() ensuring
setupInheritance() has been called and taking a shortcut
in AbstractMetaBuilder::getBaseClasses().
In addition, classesTopologicalSorted() can use
AbstractMetaClass::baseClasses() instead of searching with
AbstractMetaBuilder::getBaseClasses() and can thus be
made static.
Pick-to: 6.0
Change-Id: Iaf8209b6f6534ad91a96970a56c1e86cce054922
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Search for target lang name if there is a dot present
and do not search for unqualified names if there is a "::"
in the name.
Use iterators to prepare for the use of different container types.
Pick-to: 6.0
Change-Id: I4722cfacb4173c84035038c667ec1aaeb049c713
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function searching for the instantiations of smart pointers
was not checking for the smart pointer type entry,
so, QSharedPointer<int> was hiding std::shared_ptr<int>.
Check for the type entry as well.
Rearrange the code a bit.
Task-numnber: PYSIDE-454
Pick-to: 6.0
Pick-to: 5.15
Change-Id: Ib7a0385ce2c0f8de84b644168b0164f13f3332ad
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the Graph used for dependency sorting from a graph
using integer node numbers to a template taking the Node value,
relying on operator==() (and its qDebug() operators).
The mapping of node to indexes can then be removed from the client code,
leading to a significant simplification.
As a side effect, this fixes undefined behavior of the overload
sorter in conjunction with reverse binary operators. It was not handling
overloads of the same decisor argument type correctly, leading to
graphs with duplicated node types for them.
Rewrite the toposort test to be data driven.
Change-Id: Idbe896dc81d7272099db6dab3d2673643fc17401
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
overload ids
Insert the missing break; statement into the switch on
overload id.
Fixes: PYSIDE-1448
Pick-to: 6.0
Pick-to: 5.15
Change-Id: I1990c7fbf66e9945c520759b40b8dfb4453a5dd8
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Output signature of reference function, indicate
whether it is a reverse operator. Output other functions
only when present.
Change-Id: I188b4c53e9b488863fad64c42608f2f819d77ac0
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our parser regex handled everything but no single quotes.
In Qt6, single quotes appeared with a backslash escape.
Errors will no longer give a warning but raise a SystemError
from now on, because syntax errors in the parser are not
tolerable.
Task-number: PYSIDE-510
Change-Id: I6790d4aa73b507160b0c3107c2aa665fe6aae49d
Pick-to: 6.0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename the test to qtxmltosphinx, move it
into its own subdirectory and rewrite it
as a data-driven test.
Skip one failing test.
It can be extended in the future to test other
functionality of QtXmlToSphinx.
Pick-to: 6.0
Change-Id: Ib732e659952e39a37d7e5b556a951cecbee248be
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To enable testing, decouple QtXmlToSphinx from the doc generator
by introducing a parameter struct QtXmlToSphinxParameters
and an interface QtXmlToSphinxDocGeneratorInterface.
Move the messages back into qtxmltosphinx.cpp and move the helper
function convertToRst to the doc generator since it uses FileOut.
Pick-to: 6.0
Change-Id: I176888dcbd65003856ea8797a5629949598801d5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Pick-to: 6.0
Change-Id: I0dbf8ac3b5cd7c6135ac6a4564a6cfe288c327b7
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
| |
Pick-to: 6.0
Change-Id: I395d87a75abe0c744369e6d3e31fff990c620e7b
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extend the _FunctionModelItem function type enumeration
by operator types and determine them by name or from clang.
Split the bitwise operators into shift and other bitwise operators
for stresm operator detection.
Similarly, add operator type values to
AbstractMetaFunction::FunctionType and replace the isOperator()
checks accordingly. Remove the unused isOtherOperator() function.
Rename AbstractMetaFunction::isNormal() to needsReturnType()
for clarity.
Rewrite the binary operator search in AbstractMetaBuilder by
checks based on enumeration value and rewrite traverseOperatorFunction
to return a bool so that shift operators are found when stream
operator is not applicable.
Rewrite the function query functions of AbstractMetaClass to also
use the enumeration values.
Pick-to: 6.0
Change-Id: I06cc2deefcd8a158f83c95513a7962de467f7f2a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For functions like
QDataStream &operator>>(QDataStream &, [enum] QCborSimpleType &),
the QCborSimpleType argument was treated like an object.
Add a check to treat it like a value.
Pick-to: 6.0
Change-Id: Ic2bb8a806b7fe941d8eab3543f21afa0577dd1a0
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
They are basically the same thing. The complicated regular
expression in isConversionOperator() apparently dates
back to the old C++ parser; with clang's canonical
function names, a check for startsWith("operator ")
is sufficient.
Pick-to: 6.0
Change-Id: Ife948695619d36904d124e204bc91490704fd4bf
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
It has no use since member functions and global functions are
stored in separate lists anyways.
Pick-to: 6.0
Change-Id: Ib64f53f7f043ea70f7e995d14515385dfb9fbc03
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
AbstractMetaClass
This makes it possible to use them in cppgenerator without
converting to uint.
Pick-to: 6.0
Change-Id: Ice31487d0d053446988f896b4967fa83c656a0d3
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* Updating versions,
* Removing references to 5.x
* Remove unavailable modules for Qt 6.0.0
* Comment unusable tutorials from the documentation
Change-Id: I924953f97406ab8c5c04005a2d42dfbc03fdf7fa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
| |
It is causing problems with libclang on macOS.
Change-Id: I5d55810b3ea3e2eb4028f09d2ce6e97ba93d48a9
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|