| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
qtbase/969337bcfd6af6d91b988e4b412703274a0b5877
changed QHostAddress to use enum values from QAbstractSocket which
appear as fields. This caused a crash in the module initialization
since QAbstractSocket was not initialized when creating the field
entries. Consider this in the dependency calculation.
Change-Id: Ie07dd39a373695cd604d0ebcf233be34a004c8bc
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit 2ac1870053370e017567ae53e62cd1155a01c88f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
| |
"Qt::WindowFlags flags = {}" was mistakenly changed to
"Qt::WindowFlags flags = Qt::{}"
Change-Id: Ic160a220db56645f0f554863c0a0d5e92b1307dd
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit d80794d374f6da0fc0ac11408d29417819b43045)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_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.
Change-Id: Iaba3ebff4aecb722eec4a606423738260983d905
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit b9286bd08a4e7bf8f603e274c80cbd86cb9c1a4a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Change-Id: I03c799118296393bdd0f3de84427b50ab29153b0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 638bc0e5e8f0400411c6ba0fb40ddcde6d3a7c40)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Change-Id: Iaf8209b6f6534ad91a96970a56c1e86cce054922
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit e99ac18b134469854dff05fd3bb61158f9d9ccf9)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
(cherry picked from commit 7626f04ac855a56d4b364eac7b8350bdd561fef0)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Change-Id: I06cc2deefcd8a158f83c95513a7962de467f7f2a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 6a1a08cfaf11ad38612e59cb1d56160160504ec8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
| |
It has no use since member functions and global functions are
stored in separate lists anyways.
Change-Id: Ib64f53f7f043ea70f7e995d14515385dfb9fbc03
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 48fbcdd4da141c639daafa8b92d42ab12a3af66f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
AbstractMetaClass
This makes it possible to use them in cppgenerator without
converting to uint.
Change-Id: Ice31487d0d053446988f896b4967fa83c656a0d3
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit fe8959651d8d58c41f65d893f2db3e6c3cc59b00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add a snake case attribute to type system, complex type entry,
function type entry as well as to function and field modifications.
Add a function definitionNames() to AbstractMetaFunction/Field
returning the names under which the function/field will be registered.
Change the code writing the registration accordingly.
Fixes: PYSIDE-1441
Change-Id: I178390bb80fa25aad9f8a56e99e4cc70064178eb
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
| |
For reasons of consistency and header hygiene.
As a drive by, remove unused argument modification replace-value.
Change-Id: I44d0a244c89f2bf10242544111d23e072df3b480
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The meaning of the TypeSystem::Language enumeration value
on the remove elements was unclear; and it is only
ever used with 'all'. Replace it by a boolean value
and simplify the code accordingly.
Adapt the documentation.
Change-Id: I82d082e6d551403642936294a11abbac09d723dd
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Decouple class FieldModification from the base class
Modification since it does not need its attributes
and turn in into a value class using QSharedDataPointer
for consistency with FunctionModification.
Remove some unused code and simplify removed handling.
Change-Id: I9997559acd529bd070df5ff84610fe75c74a71a5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The logic was only partially present, neither removal
of getter/setter nor renaming had any effect.
Rewrite the code to resemble that of AbstractMetaFunction
(adding function applyFieldModifications())
Move some check functions from the generators to
AbstractMetaField/Type.
Add tests in libsample.
Change-Id: Ib29d4e37db51f122b46702cb5d96b13da6d0f224
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
| |
Change-Id: Iccee5cab96362250997daf39a354ddc7e8ab2909
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Store the list functions (global / class member) as a
QList<QSharedPointer<const AbstractMetaFunction> instead of a raw
pointer list. This makes passing around function lists easier and
solves the memory leaks caused by mixing cloned and unmodified
functions while collecting the overload lists in the generators.
- Change the function signatures accordingly
- Add a qSharedPointerConstCast() for non-const access.
- Restructure the traversing of added functions
in the AbstractMetaBuilder
- Remove some unused typedefs and functions unearthed by
the change
Change-Id: I08a6c5243750e3eb3813bc3f7172899ad2b13e22
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change AbstractMetaClass::templateArguments()
to return TypeEntries (const TypeEntry *) instead
non-const.
Remove redundant typedef OverloadData::MetaFunctionList.
Use existing typedefs in some places.
Add new typedefs for MetaObjectBuilder::EnumValues and
AbstractMetaFunctionCList.
Change-Id: Ia241b5fbe54d60ea57175fb1f6c844604e066a3d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
qtbase/612a01be6513894ab1ec5a36b699a2142ba7f35c deprecates
QScopedPointer::take(), making it useless for the factory
pattern.
As a drive-by, fix the include order of abstractmetabuilder.cpp.
Change-Id: I378f45d1c693fcd0423b4e2c96949d7e3be5d747
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
| |
Use standard messages where applicable.
Move some messages over to messages.cpp and add a location.
Remove some messages that cannot be triggered any more.
Change-Id: I7fc821e4360b06af7ef6e5db7e30de0f1e8ed5ca
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
| |
If a type entry is available, use that to search rather
than by name, which has issues with qualified names.
Task-number: PYSIDE-1417
Pick-to: 5.15
Change-Id: I9d9bc1d85481c366d6d7c84879ec2caa9458ac77
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
A lot of query functions depend on
AbstractMetaFunction::modifications(AbstractMetaClass*) which
goes on a search through the classes on each invocation,
depending on the class passed in. Cache the result in a flat list
of classes (which will typically contain
declaring/implementing/owner class or 0 for free functions).
Return modifications by const-ref and remove variables.
Change-Id: I8512b25d8c39f9dea5fc9141575902f89b4ad597
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The code was relying on class search by string and searched
the default super class as specified in the typesystem on each
invocation.
Make the default super class a member of AbstractMetaClass
that is set by the meta builder and move the functions to
AbstractMetaClass.
Change-Id: I15e4f193067d09f00e7dc17aef07c14c0e969884
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
| |
Remove its invalid state.
Remove a few checks that apparently originated from the old
code where AbstractMetaType * = 0 meant void.
Change-Id: Ifc938c011f07f4b5316f708f6cce1e98bcaa8125
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
| |
For caching in AbstractMetaFunction, they should be lightweight
to copy around.
Change-Id: Ic54293fcaf25ffe05f6930111870b2546f907d17
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
| |
Prepare it for caching the lists of function modifications.
Change-Id: Icbe19be760a49278ed4af75534bc73d36f4b1a96
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
| |
Change the client code to store it by value. Use a
std::optional to replace the pointer.
Replace the pointer QPropertySpec* stored in AbstractMetaFunction
by a the index of the property in the enclosing class.
Change-Id: Iffca9e0a6f311534ba001dc2b34bbf5ff7c01813
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
| |
Change the client code to store it by value. For the various find()
and traverseEnum() functions, use a std::optional to replace the pointer.
Change-Id: Ie4e671bf95e569741fa3c9a399bfe239ceac0dec
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
| |
Fold AbstractMetaVariable into AbstractMetaField and use a
QSharedDataPointer for it. Change the client code to store it by value.
For the find() and traverseField() functions, use a std::optional to
replace the pointer.
Change-Id: Ibaa301b9aaae8851fcaa077327235cc5aaad7342
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the data members of the TypeEntry classes to private classes,
using convenience macros modeled after Qt's Q_D macro.
The main motivation here is header hygiene and decoupling;
typesystem.h was including a lot of classes.
This requires moving some code around:
- Move the debug formatting helpers of the TypeEntry
classes from typedatabase.cpp to typesystem.cpp.
- Move struct TypeRejection to typedatabase.h
- Reorder typesystem.cpp in order of declaration.
Change-Id: I24fe501d98940afd44caf75057cd6131cfbd6b6e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
562edc619787d83b2d4418fa7a69c597a7b6945c changing
AbstractMetaClass::fields() to return const-ref
introduced a bug causing inherited fields of the same name
to be rejected since they were added to the list.
Take a copy of the field list to fix this,
similar to d72f0e35f22f3f9460d12e40f8f5676bf5a7f0d1
for functions.
Change-Id: I4c7c4938dc4b3515a51ed0a161b4fc8c95d4f141
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AddedFunction::TypeInfo was a stripped-down version of the
code model's TypeInfo with its own, simplified parser.
Replacing it by TypeInfo allows for removing the parser
code and the entire
AbstractMetaBuilderPrivate::translateType(AddedFunction::TypeInfo)
branch. The more powerful TypeParser from the code model
can then be used, allowing for more complex types in <add-function>
or <declare-function>.
As a drive by, replace the AddedFunction constructor by a static
factory function, allowing to pass up parse errors.
Change-Id: I33ad19e9b5ed30bd27898afe771401ddc98c8c73
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
562edc619787d83b2d4418fa7a69c597a7b6945c changing
AbstractMetaClass::functions() to return const-ref
introduced a bug causing inherited functions of the same name
to be rejected since they were added to the list.
Take a copy of the functions list to fix this.
Change-Id: I2f6182f45b13589f3495b1a4445c8004aadb4b95
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
| |
Split out enums, fields and functions. Only
AbstractMetaClass remains in abstractmetalang.h.
Change-Id: I49846f92fafc5969d83aa4a1767eb4ac23f39d1c
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
| |
AddedFunction::Argument
It does not really belong into the type. This makes it easier to merge
CodeModel's TypeInfo and AddedFunction::TypeInfo.
Change-Id: I38c947839e4dc785aad70e8636838db020f031d4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
This is the first step towards using it in AddedFunction
as well, replacing AddedFunction::TypeInfo.
Change list accessors to return const-ref on this occasion.
Change-Id: I78a7be0b3cb738b859519b7fbff8ed024fb46106
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the same functionality that is used for argument type parsing of
functions from the code model, which has a more powerful type search.
This will for example enable specifying class template arguments
(like QList::append(T)).
Move the error handling from translateTypeStatic(TypeInfo,...)
to the findTypeEntries() function, extracting a helper
for the search, and use this in
translateType(AddedFunction::TypeInfo,...).
Task-number: PYSIDE-904
Task-number: PYSIDE-1339
Change-Id: I34428d76e811c3b1444a4d2ded0606e67c4dcf57
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
Adapt CMake files, build scripts, tests and examples.
Task-number: PYSIDE-904
Change-Id: I4cb5ee4c8df539546014b08202a7b1e98ed3ff07
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|