| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The option is a workaround for an old LLVM bug and is no longer needed.
Worse, it causes parse errors in code that declares throw().
Task-number: PYSIDE-62
Change-Id: Ib72b14cc704c04ae3b4197fd2af718276e3fe788
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Extend the check introduced by 4725008aeea407ae55cfd66de802dd9e06412efc
to CentOS.
Task-number: PYSIDE-733
Change-Id: Iaaf2b8af0fa03684d4a3cbd5c5e70e141d125139
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A brew build environment sets up a clang shim (fake clang ruby script
that sets up additional compiler flags), which passes all
brew formula dependency include paths as system include paths
(via -isystem). This also includes the Qt dependency.
Because our clang parser currently ignores system headers
(see Builder::visitLocation in clangbuilder.cpp) and
because Qt include statements inside header files would resolve
to the system header location, this would result in no Qt classes
being recognized by the API extractor, and thus fail the build.
Fix this by checking for an environment variable that brew sets
inside its build environment, to filter out the unnecessary
-isystem flags.
This way the Qt include path would be passed as a non-system include
path from CMake, and thus correctly complete the build.
Task-number: PYSIDE-731
Change-Id: I9b543eddc85270f1e8a90d9f30194b2a862e80d7
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alberto Sottile <alby128@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Check the cursor availability to detect deleted functions. This fixes
the build of the Qt 5.12 API, which for the first time has a
Q_DISABLE(QCBorStreamReader) in a public section, causing a copy
constructor to be reported.
Task-number: PYSIDE-487
Change-Id: I31ba0103cf612a4238c0e282ffcfeeab29df97d1
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the enumeration to the scope stack only if it actually has values.
This occurs for the first time in Qt 5.12, which introduces a forward
declaration of enum class QCborSimpleType at
src/corelib/kernel/qmetatype.h:65.
Task-number: PYSIDE-487
Change-Id: I5798eb8e47bcd4d21dc554dc5cdd257c7163ca90
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
This improves the readability.
Task-number: PYSIDE-672
Change-Id: I936ef46fb30af6163b8337adbf9cf585e68f3424
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pre-dating the Clang-parser, there is code that tries
to fix template parameter in template class declarations, for
example copy constructors like:
"QList(const QList &)" -> "QList(const QList<T> &)"
The code no longer triggers since Clang always provides
the parameters, so, remove it.
Task-number: PYSIDE-672
Change-Id: I15949d71fa4391e7088fe0e29a1821487ced2105
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
| |
Change-Id: I88c4148000acba2ba1e2013fe587e7f5fbe6c2ca
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The C++ language level was previously hard-coded in the default options.
This is potentially problematic for projects using shiboken and also
fell apart with Qt 5.12, where the experimental level "c++1z" used for
MSVC2017/Clang 4 no longer works due to not being able to handle
enumerator value deprecation attributes.
Introduce an enumeration to represent the level and add functions
to convert back to and forth to the respective Clang option.
Add an option to shiboken.
Add a function returning a default value for the emulated compiler,
returning C++ 14 or C++1Z for the CMSVC2017/Clang 4 case.
Task-number: PYSIDE-724
Change-Id: Ie7e19bf7f099a34e6cdaad4b462157a9a3ee8797
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
Replace the search executed at build time by CMake by
a run time search in shiboken since the location at build time
typically won't match any more for the deployment case.
Task-number: PYSIDE-693
Change-Id: Ib15fbba5d8c3fecf30aaae7195b88a648a7ed0fe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Refactor class HeaderPath to contain an enumeration for the type
instead of the boolean framework flag and add handling.
Task-number: PYSIDE-693
Change-Id: I60a62b831ddd5ce7519a066135854ff723db2fc6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
| |
Add some handling in case an argument type cannot be parsed.
Change-Id: Ib901d023ed60f74fe82a06d8c08fd704f1350a7a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
The signature is passed through TypeDatabase::normalizedSignature()
which calls QMetaObject::normalizedSignature().
Keep the original signature and output it in the error message.
Change-Id: Ibd1ddd0dee17d828710caf4bf6d674c35776b4c2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace struct TypeParser::Info by TypeInfo and remove
TypeParser::Info. Move method
TypeParser::Info::instantiationName() to TypeInfo
for this purpose.
Change TypeParser::parse() to return TypeInfo.
Task-number: QTBUG-672
Change-Id: I123d5bf378ad146867b571e47e31ae08a92b2504
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The qualified name was obtained by splitting by "::", which would
result in
"std::list<std::string>" -> ("std", "list<std", string>").
Fix by splitting up to first '<' or '(' only.
Task-number: PYSIDE-672
Change-Id: I9d790535e877da251a5b6c352dc550e4077877bd
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove bool *ok-parameter from AbstractMetaBuilderPrivate::translateType()
It was only used to handle the special case of void return values of
functions where translateType() returned nullptr/ok = true.
Add a check TypeInfo::isVoid for this purpose and move this handling
to traverseFunction instead. For all other cases, translateType()
returning nullptr means failure.
- Remove the code triggered by the bool resolveScope parameter
of AbstractMetaBuilderPrivate::translateType(). It has been
observed to not find any matches, likely due to the types
being fully qualified by Clang.
- Remove function AbstractMetaBuilderPrivate::decideUsagePattern()
which was a one-liner calling AbstractMetaType::decideUsagePattern()
Task-number: PYSIDE-672
Change-Id: I0336896917cb914d4d622eefa0a21e6e319efa0f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The XQuery used to obtain the function description can fail due to
argument type mismatches (typedefs or blank formatting).
In that case, repeat the query restricting the search
the argument count. If exactly one match is found, use that
with a warning. Output the matches otherwise.
Split out functions for the function queries and and helper
function for creating the XQuery with flags.
Task-number: PYSIDE-363
Change-Id: I83aaa53511896ee78a25f39a769ca907d0ac10bb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Introduce an attribute for added methods and exclude them
from the documentation generation.
Task-number: PYSIDE-363
Change-Id: I06d3f468bcec4d0480012d29e26dabadae51634b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
QVariant::Type is a primitive type, yet the fully qualified
name should be used. Remove check for primitive types and
always use the qualified name for building the doc XQuery.
Change-Id: I8d12cf7d3095ce9e7baa2b6436cc90385bdedc22
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
If a -qmlmodule.webxml file exists, insert a link to the
Qt online documentation.
Task-number: PYSIDE-363
Change-Id: I49a46ed097e8f7136b39f38e2206a2229dd08e41
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Add a warning explaining that a rejected abstract function
will cause compilation errors later on.
Change-Id: Ibcad7d79df719b0ffbaf59a0ef9eec6f22aea2ed
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First encountered in:
QtScxmlEvent::setEventType(const EventType &);
The metatype was wrongly detected as NativePointerPattern
in AbstractMetaType::determineUsagePattern().
Introduce a helper for detecting plain const-ref and use
that consistently.
Change-Id: I6b105bc99ae63e4737c5d628e79f23b7acbcca3d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Changed a few old references and links.
Ran aspell on the rst files.
Task-number: PYSIDE-622
Change-Id: I3e096df96bfe80ead53afa8568b7de42e8a25766
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Including intersphinx extension allow us to link
the documentation from ApiExtractor to shiboken's.
ApiExtractor doc need to be build first, so we can
use the inventory that sphinx create, to link it
to shiboken's configuration.
All the harcoded references were replaced by dynamic
references. Also new labels were included to properly
cross reference topics.
Checked the spell on many rst files too.
Task-number: PYSIDE-363
Change-Id: I11a50b1f9eee48a00a3de6f957942eb0823eba47
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example for:
void QWebEnginePage::findText(const QString &subString, FindFlags options = FindFlags(), const QWebEngineCallback<bool> &resultCallback = QWebEngineCallback<bool>())
the resultCallback will be removed and a binding for
void QWebEnginePage::findText(const QString &subString, FindFlags options)
generated.
Task-number: PYSIDE-487
Change-Id: I6299d1735ad6c00e257daecb64d8f2f235140a98
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changed the target name because there was a conflict,
and now is possible to `make doc_apiextractor` inside
the *_build/shiboken2/ApiExtractor/ directory.
Task-number: PYSIDE-363
Task-number: PYSIDE-221
Change-Id: I0f330166a89ba25b616b9d665a4a1fcfb2d90241
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove a lot of ugly value parsing code in favor of
clang_getEnumConstantDeclValue() and
clang_getEnumConstantDeclUnsignedValue() depending on the
type.
Introduce a class EnumValue containing a union of qint64 and quint64 values
to represent signed/unsigned values correctly and use that in the code model
and meta language classes.
Change-Id: If2efb7cfd560237907678b8f6fdfb0bc689c0c93
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix "page" to "module" to match:
<WebXML>
<document>
<module name="QtCore"
<description...
Task-number: PYSIDE-363
Change-Id: Ifcb6182af7e119356fcc5d937a0f1beda6c5fe47
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Add rudimentary formatting for container arguments
like QVector<int>.
Task-number: PYSIDE-363
Change-Id: I71d2175938da9ddb7ede0e70df3214eb323b5aca
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Clang function clang_EnumDecl_isScoped() tells whether an enum is a class,
so, there is no need to specify that in the typesystem.
Use that information to pass it up to the metalang classes and revert the
parts of 44cb6c51e6c3b43376f284941454dc8c13b81c3f that added it to the
type system.
Task-number: PYSIDE-487
Change-Id: Ie10885f74168821d0307e91b6f1f7f3f30dd074b
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
| |
This makes it easier to use it from other functions.
Change-Id: I6f8c5ef8900c72d09bface011c36370e9210fba3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Change TypeSystemEntry::m_version from double to
QVersionNumber.
- Determine version at the beginning of the start element
processing of the parser and use that.
- Remove AddedFunction::m_version which is not needed.
- Remove unused parameter double vr from
AbstractMetaBuilderPrivate::translateType().
Change-Id: I2941667ba565f8c11aa0c14446ec7d6934da99dc
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cannot be found
In PySide2, there is one XSL-based documentation modification which QXmlQuery
can handle.
However, due to QTBUG-66925, it is not a full replacement, since the
issue (XPATH specifying the number of the element to match) might be
useful for documentation modification.
Add QtXmlPatterns as fallback and modify the test accordingly.
Task-number: PYSIDE-363
Change-Id: I969fbe210725bb748d76028c6f542bae6b471a76
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce enumeration for the type to EnumTypeEntry which can be specified
by the boolean "class" attribute. For the enum classes, the value names
need to be qualified by the enum name to match the C++ API.
For the C++ generator, add an overload to
Shiboken::createScopedEnumItem() that takes a PyTypeObject and add the enum
items to the enum so that the name is in the enum scope.
Change-Id: Ia0e469d13b08c196b9ddd965b9cf3cc62a38630b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
| |
Remove class struct EnumValueRedirection and add explanatory
comment to EnumValueTypeEntry.
Change-Id: Ic4665436f301943805c7985188bc41c4ad3e8336
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
| |
Turn it into a static helper and use QString::compare()
to avoid the call to toLower().
Change-Id: Ifc10a7e8b5df4df80ee23135e32aea34ed72d295
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
| |
Avoid QString allocations for them.
Change-Id: Ia55fba30f790a938900e7b5217daeaa6098beaf6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add helper AbstractMetaEnum::findEnumValue() which
finds unqualified as well as qualified enum values.
- Remove unused function bstractMetaClass::findEnumForValue(QString).
- Remove 2nd parameter from
AbstractMetaClass::findEnumValue(QString, AbstractMetaEnum *).
The comment claimed that it is excluded from the search, but the
condition was the reverse. Just removing it apparently does not do
harm.
Task-number: PYSIDE-487
Change-Id: I32b036045ea335b805fba79df327cc42d787f18c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove
- html_add_permalinks: the key has been changed to str and has a default.
- html_use_smartypants: Replaced by smartquotes and defaults to true.
Fixes warnings:
WARNING: The config value `html_add_permalinks' has type `bool', defaults to `str'.
WARNING: html_use_smartypants option is deprecated. Smart quotes are on by default; if you want to disable them, use the smartquotes option.
Task-number: PYSIDE-363
Change-Id: I85092597a860f58cc012220edbf0c03749326432
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Running shiboken on a custom XML file (like the scriptableapplication
example) would show tons of warnings about not being able to find
certain types or enums or other things inside Qt modules.
For scriptableapplication that was the case, because the
wrappedclasses.h file would only include the <QMainWindow> header
file, and not the rest of QtWidgets / QtGui headers, which means
that shiboken found types declared in XML files, but could not find
the actual declarations inside the preprocessed header file.
This change adds some additional conditions so that warnings are not
printed when a typesystem file is loaded with the generate="no"
attribute, because no C++ code will actually be generated for types
defined inside such a typesystem file.
Task-number: PYSIDE-587
Change-Id: I1f166483c2f343796e08d3142e5e296c4ee43f27
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use a QTextStream for better readability
- Extract a helper function to format the function parameter type query:
- Fix the function parameter type attribute ("left"->"type")
- Fully qualify enumeration and other non-primitive types
Task-number: PYSIDE-363
Change-Id: I529e839fb737f30bd9b70d10a48fcfb0c9141f8f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Trim the strings returned by the XPath queries and warn about
failing queries.
Task-number: PYSIDE-363
Change-Id: Ia0233d490497597cb78aa16b0908fe226270705c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move code from shouldSkip() helper of the doc generator
into the doc parser and use that for the qdoc/doxygen parsers.
The additional checks (most importantly the check for
declaringClass != ownerClass excluding the virtual functions
added by AbstractMetaClass::fixFunctions() to derived classes)
avoid running unneeded XPATH queries.
Task-number: PYSIDE-363
Change-Id: Ib1141a348c96b269a50c63dd94fe93931c12d1ec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
- Unused variables
- Mixing const/non-const iterators
- Signedness
- Missing const ref in range-based for
- Uninitialized variable
Change-Id: I02e6d4c5b0416aa8462f7b9d567b562a702a5740
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
| |
Fix clazy warnings about possibly detaching containers.
Change-Id: I3c3a229de5e0c71f17c1f26273e1b0be3b0d7e81
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Mixing const/non-const iterators
- Do not use operator[] on temporaries of type QVector
- Remove unused nontrivial variables
- Add Q_FALLTHROUGH()
- Potential detach in range-based for
Change-Id: I89391fdda616f119eadd7de529eb6cee69343f85
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order for GL types like GLint64 to be available on macOS, the
macOS-specific system header "gltypes.h" has to be parsed by libclang.
Before this change, shiboken skipped parsing system headers (except
for gl.h) because there are issues when trying to parse C++ std headers
(ostream for example).
The file "gltypes.h" contains the typedef declarations for GL numeric
types. A few other system headers like "cstdint" are also needed
(which contain the actual typedefs from int32_t to int for example).
A few different system headers are also needed on Linux (also for
GL -> numeric typedefs).
This system header exclusion mechanism is far from a clean solution,
but it seems like current versions of libclang do not provide enough
preprocessor information to be able to limit the parsing to specific
chunks of code (for example everything included by gltypes.h), thus
we need to limit ourselves to exclusion by file paths.
Change-Id: I58c151e2cb083e16f7cafb3dc9df2d757442bb59
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|