| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Typedefs of template parameters like
template <class T> class QList
{
using reference = T&;
are reported as "type-parameter-0-0" by clang. Resolve that to the
proper name of the template parameter in the clang builder. Also,
these typeinfo results must not be cached since the same CXType is
used for parameters of unrelated templates. Rename the
createTypeInfoHelper() function to createTypeInfoUncached() for
clarity and introduce a cacheable parameter.
Change-Id: I2b21a4dfdd8d86cf36497832837c21f37cb86518
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |\
| |
| |
| | |
Change-Id: Id0fc76666bbdb254a833eeb6909a0874b2611bf3
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
They were ignored in the code parser. Take them into
account and add a test.
Task-number: PYSIDE-1224
Change-Id: I3baca95556129d695db294fdcc1ad92fc831672d
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
As a drive by, adapt to changed values of QMetaObject::Call.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: Ic55a5da910c9ef022af3dedf749f80153f519ebf
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QStringRef will be replaced by QStringView. Remove
most usages or use auto. This will require a 2nd cleanup
removing its usages from the QXmlStreamReader code once
this has landed in qtbase.
Task-number: QTBUG-84319
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: I2885df70d5f883bcad7bb3a31618fc1d63116df5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |\|
| |
| |
| | |
Change-Id: I5c6913b4eea9d6e11415011753e556eca18c5532
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
std::string_view::iterator is not char *, apparently.
Amends 1bfd77c92d78c3861d0c09068e6c353020a510f4.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: I5946bca2e71b82e1b30cdbfaff3bdfee875e60ca
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Raise compatibility to the latest MSVC 2019 (fixing
a parser error related to constexpr QStringView) and
add -fdelayed-template-parsing for speed.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: Ia1216d36ef65ee752af89a365c8b1d7c008ed801
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: I509b55363c29639cd29bfbc012c4bda3a4d008e5
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Following how qdoc does it, define Q_PROPERTY as a static assert
with the stringified macro content in a ','-operator and parse
it with clang.
Task-number: PYSIDE-1019
Change-Id: Idcf53f1cd1c1cb29f4320444f446e9abad33d251
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
throw() has been removed in C++17, causing testmodifyfunction to fail
for Qt 6.
noexcept(false) should be used instead. noexcept() takes a
constexpr value, which we cannot easily compute. Add handling for
the simple true, false cases by checking the code snippet.
Task-number: PYSIDE-904
Change-Id: Icb9f8770d2de2b9f218bfa72e516e360c0cd65aa
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |/
|
|
|
|
|
|
| |
std: :string_view was added in C++ 17 and fits the purpose.
Remove some outdated code for Clang < 5 on this occasion.
Change-Id: I787f736679421c9080a6cabdef1616efb2c512e9
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code snippets resulting from macro expansion have a 0 range.
Detect this first thing and return an empty snippet before
starting to convert file names and reading files.
For that purpose, use a CXFile instead of a QString
in SourceLocation. For all other cases, output a verbose warning.
Provide a function to obtain the file name from a CXFile
with caching in the builder.
Task-number: PYSIDE-1339
Task-number: PYSIDE-904
Change-Id: Ie30563f5b25d0d21b3a1ceb0c9da37cfc8d808dd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
| |
Add a resolve function.
Change-Id: If85c1de402f212e4c16b18e2ec8ad97075ac3cff
Fixes: PYSIDE-1327
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
| |
template parameters
Clear the instantiations in case clang parsing failed
Task-number: PYSIDE-1296
Change-Id: Ia1e07d633f45338fc8f35efa46c752a62a51ad76
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In Qt 6 as of May 2020, this is used to alias QList to QVector:
template<typename T> using QList = QVector<T>
which shiboken needs to handle. Introduce a new code model
item for this and add it to the resolver.
Task-number: PYSIDE-904
Change-Id: I9e558635e843b60d44c0ceaaaa68b09b50c25c9f
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
| |
Task-number: PYSIDE-904
Change-Id: I4e85dd8706f5fbe708fca7c797e0225b5bac9377
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
Remove deprecated std function base classes which are no longer
available in higher language levels.
Adapt to changed hash type in Qt 6.
Task-number: PYSIDE-904
Change-Id: I858b4386fa0e974650721c11aa940e77cf14deb2
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Extend the <system-include> element for a trailing slash to indicate
an absolute path against which a file is matched.
Change-Id: I9557e26b941a7d5d5cab575cd978c158c6859b97
Fixes: PYSIDE-1267
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |\
| |
| |
| | |
Change-Id: Id9d77dcbb396227a670e4455031ce074488c9e17
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adapt the version check of the internal include directory to parse the
entire directory (typically named like 9.0.0) as version number
instead of just checking the first digit.
Change-Id: I7e09c36fd523328e962c7f2acbc8385787e94998
Fixes: PYSIDE-1259
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: I827c17bc77d4da46abc6db2a91a8cc9296b4c0e0
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Treat "typedef enum {} Name" as "enum Name". Clang
actually provides type information for these cases, use it
(taking care not to break real anonynous enumerations) and
skip the repetitive definition of the elaborated type.
Fixes: PYSIDE-1228
Change-Id: Icaf0450f3fea3ba9f06737e351b56e6e5df0749a
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| | |
| |
| |
| |
| |
| | |
Task-number: PYSIDE-454
Change-Id: I9302cf74544315875a65bc09b75741c7fe6399e8
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |/
|
|
|
|
|
|
|
| |
Check the attribute as returned by the clang parser and add it
to the handling of the visible attribute of namespaces.
Fixes: PYSIDE-990
Change-Id: I3428b59d6d9a5d60dd95db5fc0640772bd3985c8
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
- Use cstring and prefix by std
- Split the functions into base name and comparison functions
- Use a non-type template to pass the size for startsWith()
- Split out visitHeader() for clarity
Task-number: PYSIDE-454
Change-Id: I48e2a9ae5fead892c20d9729cb90d61ff5d7fb0a
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
| |
Turn off clang check:
STL1000: Unexpected compiler version, expected Clang 7 or newer
Change-Id: I30e962174dfe468d570fae56c0e1b883c622a6a0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Avoid copying complex types by using const ref
- Use isEmpty() to check for container emptyness
- Use range-based for
- Use Q_DISABLE_COPY in 'public:' area
- Fix spelling error
- Use '= default' for trivial constructors/destructors
- Remove non-null checks before deletion
- Fix misleading indentation
- Fix else after return
- Simplify boolean expressions
- Fix unused parameters, streamline code
Change-Id: I8c6cadd8653e220ba8e5bdb4dd55524d13a81768
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
| |
Apply Fixits by Qt Creator with some amendments.
Remove iterator types by using auto instead.
Change-Id: I8a75323da6ae5cdcc6b67af8be9376408953986b
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
| |
Apply Fixits by Qt Creator with some amendments.
Change-Id: Ib2be1012ef7e8a2ad0e6cd130371bf1e941c4264
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
| |
Use member initialization, use default bodies for constructors.
Initialize missing members as reported by clang.
Change-Id: Ibc51e46a37b310912ec8f274543092dfdda78e1b
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While building on macOS the detection of the compiler
properly works, but at the time of getting the header libraries
we rely on the command:
<compiler> -E -x c++ - -v
The problem is that since CMake resolves the full path of the compiler
we do not properly get the includes that we should, calling the
compiler directly via an absolute path (and not via the /usr/bin/clang
shim) does not include the default SDK sysroot path.
Here is an extract of both executions:
* /Library/Developer/CommandLineTools/usr/bin/c++ -E -x c++ - -v
#include <...> search starts here:
/Library/Developer/CommandLineTools/usr/include/c++/v1
/usr/local/include
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include
/Library/Developer/CommandLineTools/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
* c++ -E -x c++ - -v
#include <...> search starts here:
/usr/local/include
/Library/Developer/CommandLineTools/usr/include/c++/v1
/Library/Developer/CommandLineTools/usr/lib/clang/10.0.1/include
/Library/Developer/CommandLineTools/usr/include
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks (framework directory)
End of search list.
Change-Id: Iff300b3b543f5fb3a43f9ce1ea8986f9bc172323
Fixes: PYSIDE-1032
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
- Check for the OS name case-insensitively
- Use the compiler from cmake via a define
- Add sysroot header directory to internal include paths
- Extend centOS version to 6.10
Change-Id: Ia3977f3331d51f9bc530accb8defa5fcb648bdfe
Fixes: PYSIDE-1012
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Qt has some modules, where functions and classes are added to
namespaces of other modules. For example, QtGui adds the free
functions mightBeRichText() and convertFromPlainText() to the "Qt"
namespace and Qt3DQuick adds a namespace "Quick" to the namespace
"Qt3DCore" started in Qt3DCore. Shiboken was unable to handle this
since the name of the index constant was derived from the namespace
name and would thus clash. Also, all code model items from the base
module would be re-generated into the extended namespace.
To fix this:
- No longer join namespace code model items in clang builder.
- Search for pre-existing namespaces in traverseNamespace() before
creating a new one, continuing populating it.
- Add a "files" attribute taking a regular expression to match header
names to the namespace type entry, making it possible to restrict
code model items by files when extending namespaces (as otherwise,
all base items are again added).
- Add "extends" attribute specifying the package name of the namespace
to extend, which will be used as base type in CPython.
- Disambiguate the SBK indexes of namespaces and the init_ functions
by adding the module name.
Change-Id: Ib552e878911942fa4d52d2bb0c6695e5b2c4c341
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Query llvm-config for the lib dir instead of constructing the path
from the prefix in case the Clang location is obtained via
llvm-config. Assume a standard build in case the Clang location is
obtained via environment variables.
Change-Id: I7628d90706100a61f8a605e931bd023b27f1f442
Fixes: PYSIDE-867
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Add missing include, fixing:
sources/shiboken2/ApiExtractor/clangparser/clangutils.h:91:17: error: field 'childMessages' has incomplete type 'QStringList'
appearing in Qt 5.13 due to some header rearrangements.
Change-Id: Iab22538af8688ebb3dcbaf0e1042b1198bde5800
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Change boolean 'noexcept' flag into an enumeration
that indicates whether a function throws, is 'noexcept'
or the behavior is unknown.
This makes it easier to implement an 'auto' mode
for exception handling.
Task-number: PYSIDE-62
Change-Id: I4e5405863e5af2a54f3528ba5eb5c51d3929703d
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QAbstractRayCaster is the first class in Qt to use type aliases:
using Hits = QVector<QRayCasterHit>;
Treat them as typedefs if a canonical type can be obtained for
them. This requires adding some simplification of the canonical types
obtained for standard containers.
Task-number: PYSIDE-751
Change-Id: I521a8b02d3c8cb89e4f72a817fbacc5955041570
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |
|
|
|
|
|
|
|
| |
For exception handling, calls into C++ might need to wrapped
in try/catch. Detect noexcept functions for which this can be omitted.
Task-number: PYSIDE-62
Change-Id: I37aced91ace184edf211a457a60c131d516a4037
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |\
| |
| |
| | |
Change-Id: Ie90b31ed1b88f1353261fc4040db2d788df279e6
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 'else if' after return/break/continue
- Use const ref for complex arguments passed by value where possible
- Fix 'if (foo) delete foo' to 'delete foo'
- Use container.isEmpty() instead of container.size() in checks
- Use ' = default' for trivial constructors/destructors
- Use range based for where possible
- Complete constructor initializer lists
- Fix invocations of static methods
- Replace some reinterpret_cast by static_cast
- Remove unused variables/fields
- Use initializer lists for return types
Change-Id: Id5b44a2f9d429f66ef069d532a1cd31df796d38e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a cache containing the TypeInfo for the CXType structs.
Task-number: PYSIDE-672
Change-Id: Ibd0b5bb3f01fa507a65ded8f121c12a10aa7c401
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |\|
| |
| |
| | |
Change-Id: I85c005419736d5abf65077ff259509610853af4e
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Obtain the template arguments from Clang and fall back to parsing
the type name where this is not possible (which may be the case
inside a template declaration).
The string-based formatting and re-parsing of the type in
AbstractMetaBuilder::translateType() can then be removed, opening
the way to passing up more complex types from Clang into the
MetaBuilder.
Task-number: PYSIDE-672
Change-Id: I43ff285c5f3720319bf40c65b1c27302ef1b934e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use new enum in code.
- Rewrite the Clang type parsing to make use of it.
- Adapt some typesystem files.
This enables the distinction between "int *" and "int *const"
and fixes the signatures from "int const &" to the more common "const int&".
Task-number: PYSIDE-672
Change-Id: Ic1bff0015188c32f53d0e6f347b1523254cb7e4f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|