| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Prepend virtual methods when creating function groups
so that overriding method the most-derived class is seen first.
Task-number: PYSIDE-570
Change-Id: I791e3da09783c4c31ac293060aed8bb2bc8472d5
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Replace .cpp by .py and try to find the snippet. Fall back to .cpp.
Task-number: PYSIDE-363
Change-Id: I82b23df9894e626c97b44dc5a841f5fa70ae1d57
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The available constructors for QByteArray are now:
bytes, bytearray, and QByteArray, unicode is not
accepted anymore.
Also the concatenation is now possible between QByteArrays.
Even though is not possible to initialize a QByteArray
with an unicode, we include the possibility to compare it with
one (Compatibility with PyQt).
The __repr__ and __str__ are now properly working.
There seemed to be a confusion regarding data types between
Shiboken, Python2 and Python3 related to bytes,
so now the structure is based on the flag SBK_BYTES_NAME,
which is define as "bytes" for Python3 and "str" for Python2.
Many tests were modified to properly handle string,
using the `py3kcompat` module.
Task-number: PYSIDE-232
Change-Id: I8b671f367c60a0870c72dcbe5662106b3225037d
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>
|
|
|
|
|
|
|
| |
Output line and column.
Change-Id: Ide890b93c47ef0fc9ebe3209356da100e0cbde4e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Introduce a simple [] notation for target directories.
Task-number: PYSIDE-363
Change-Id: I3a0cd255faf84f564a64992cba88244ae14c2452
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function would fail for a QFlags type defined in a dependent
typesystem file with errors like:
Can't write the C++ to Python conversion function for container type
'QPair': Could not find type '::QFlags<QAccessible::RelationFlag>' for
use in 'toPython' conversion.
for example caused by QAccessibleWidget::relation() where the flag is
defined in class QAccessible in QtGui.
The underlying reason is that there is no type entry for the class
QFlags. To work around this, detect it by looking at the instantiated
types and create a flags type accordingly.
Task-number: PYSIDE-487
Change-Id: Ib3c962aeedf8deb1a6b11976bd91316d39738310
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Add an errorMessage parameter to
ShibokenGenerator::buildAbstractMetaTypeFromString()
and output the message in
ShibokenGenerator::replaceConverterTypeSystemVariable().
Change-Id: I249778b3efe89c265590a7d4977cf2a4e76063f9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Forward declare QtXmlToSphinx::LinkContext as a public struct
and move the definition to the source file.
Replace the linkTag/linkTagEnding strings by an enumeration for the
type and flags for storing the bold/italic state.
Move the formatting to an operator<<(QTextStream,LinkContext)
for clarity.
Streamline the code checking the link text against the reference
in handleLinkText(), avoiding some unnecessary tests.
Add an 'External' type for external pages which do not have a role
keyword.
This fixes:
- Undoes a breakage introduced by c5582d3120249a902681454b2319df765ffa2cd8
converting all link refs to RST labels, clobbering the '~' used for some
function references. This is now limited to page type links.
- Broken handling of links within italic/bold: The assignment
to the linkTag variable by type would clobber the previously assigned
italic/bold markers
- Enable external links without role
Task-number: PYSIDE-363
Change-Id: I2e9a8cd80df93a77f3c6c9f8593243b35eeeb56e
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>
|
|
|
|
|
|
|
|
|
| |
Add support for <target> and <page> elements for the additional
documentation sections.
Task-number: PYSIDE-363
Change-Id: I0b04106fbe6ae1779625de333368e18bbc31b962
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Add utility functions to remove invalid characters and a helper
for streaming
Task-number: PYSIDE-363
Change-Id: I45eb33ed60deed82912262a99551436c538eee22
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Add an option taking a list of files under the webxml directory
that are run though the Sphinx converter to create .rst files.
This can be used for tutorials and example descriptions.
Task-number: PYSIDE-363
Change-Id: Ifa6df32517a2b336cd3f755523947d70c5c24f2e
Reviewed-by: Alexandru Croitor <alexandru.croitor@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>
|
|
|
|
|
|
|
|
|
|
|
| |
Relative file names cause Clang not to find them since they
are included by a temporary header file.
Check and convert to an absolute path via QFileInfo.
Change-Id: Ie87b4d2a6fcf5d98062a8a40a3eccbbb9513c62e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Introduce an enumeration for the list type and handle
ordered lists like bullet lists with a different separator.
Task-number: PYSIDE-640
Change-Id: I2e770f2dd56958627e423822b8f4b1c23fdd4e16
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reimplementing a class must respect the closest
base class instead of falling back to QObject.
By adding a default-superclass argument one can
verify that field first when shiboken is getting
the base classes.
This problem was found by reimplementing
QGraphicsObject including methods from one of its parent
classes, QGraphicsItem.
With this change, the generated wrapper will list all the
base classes in `Sbk_QGraphicsObject_Type_bases` leaving
QObject at the end, because if not, it will match
inmediately.
A test case was included.
This change doesn't affect other existing tests.
Task-number: PYSIDE-86
Change-Id: I6b9a220497b12c8085302a502f8581cc2d3fb11b
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
smart-pointer-type is a special type for making getter method
and type known to shiboken. It should not be documented.
Fixes a lot of warnings when trying to generate documentation
for QtQuick.QSharedPointer.
Task-number: PYSIDE-363
Change-Id: Icb26fa3e16cd74ae5115cdd1cbe32cb48ab5445b
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>
|
|
|
|
|
|
|
|
|
| |
Print option descriptions indented by 8 below the option
instead of beside the option at column 38 and add some newlines
to avoid wrapping.
Change-Id: I63295a40aaac588f761c5964b68dbaff8d013c95
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
| |
Limit the number of added cells to the rowcount.
Task-number: PYSIDE-363
Change-Id: I2b05ce97962d56650112b66fe99de0f5ea693abb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
|
|
|
|
|
|
| |
Change-Id: Ic4ee9c0e36bb727225bccfa7a72bee38a63d17c2
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
| |
Change-Id: If7464f643fca74aa06099ca4b9905b34bd077193
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rst ::image elements do not work inline, they require a line
each.
Work around as recommended by using rst substitution references
instead, using a tag enclosed in '|' and defining it below.
Split out a separate inline image handler and store the references
to be written out later.
Fixes warnings like:
WARNING: image file not readable: PySide2/QtCore/images/cursor-cross.pngAcrosshaircursor,typicallyusedtohelptheuseraccuratelyselectapointonthescreen.
Task-number: PYSIDE-363
Change-Id: I860875957688885ca48038aa3aa96bd9c38da709
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Fix several warnings:
Inline literal start-string without end-string.
Task-number: PYSIDE-363
Change-Id: Iadd753d9e8c46b6f00e915e494b01f763e6ce035
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Fixing numerous warnings:
WARNING: Could not import class '...' specified for inheritance diagram
Task-number: PYSIDE-363
Task-number: PYSIDE-617
Change-Id: I84013d8be442c43212f0726a141ce0dc9b51c92c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using C++11 enum classes, enum values need to be fully qualified.
Add the enum name where the values are written and handle it
in the various resolve() functions.
Split out ShibokenGenerator::guessScopeForDefaultFlagsValue()
from ShibokenGenerator::guessScopeForDefaultValue() for clarity.
Task-number: PYSIDE-487
Change-Id: Idf8d627ab88111ad67734bee8b4d130ef53e038d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
Wrap value in int(), which is required for enum classes.
Add a compile test to libsample.
Task-number: PYSIDE-487
Change-Id: I78f07ae66da64caad1f75722308256e40e91eded
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"See also" links may appear in the qdoc WebXML output as nested links:
<see-also>QAbstractXmlReceiver<link raw="isValid()" href="qxmlquery.html#isValid" type="function">isValid()</link>
which was handled in handleLinkTag(), or as direct text:
<see-also>rootIsDecorated()</see-also>
which was not handled, causing numerous warnings:
.../QAbstractXmlNodeModel.rst:448: WARNING: Content block expected for the "seealso" directive; none found.
Refactor and split QtXmlToSphinx::handleLinkTag() into several functions
to operate on a struct LinkContext and keep 2 instances for
nested link tags and directly embedded links.
Task-number: PYSIDE-363
Change-Id: I734884267209f3621bfc5db4bf4347b838eb0de6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Fix warnings:
Content block expected for the "container" directive; none found
Task-number: PYSIDE-363
Change-Id: Ie855ac355478060c0d280413a31dffcb03cf3935
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix warnings like:
warning: Undefined substitution referenced: "Constant |Description"
on tables like:
*amplitude**period* +-------------------------+-----------+
|Constant |Description|
+=========================+===========+
|QEasingCurve.InOutElastic| |
+-------------------------+-----------+
Task-number: PYSIDE-363
Change-Id: I56cd9b73dacbfd84260c059a8916db5540029816
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Fix sphinx warnings:
warning: Explicit markup ends without a blank line; unexpected unindent
Task-number: PYSIDE-363
Change-Id: Iec9d8b35317dc9c1009db468284cb7b7a88104a0
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>
|
|
|
|
|
|
|
|
|
|
| |
Introduce a streamable class that does the escaping and some
helpers for QString/QStringRef.
Task-number: PYSIDE-363
Change-Id: Ica6d8a2ab43eeb597b4e9080330dc2ce700e0ed2
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
| |
Change-Id: I4bbaa7d46bab2526906655c5f03bbd25a142bbc4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Fix a warning about a malformed table (qcursor.cpp) whose
last row has too few columns.
Task-number: PYSIDE-363
Change-Id: I5eec88226e48064ee54e3abe1247d9dc06dc1d82
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
| |
Use splitRef() where applicable or rewrite.
Task-number: PYSIDE-363
Change-Id: I08dcafbba82327f6ff4c02f582341083b4b48755
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Add a streamable Pad class for these purposes or use
the corresponding QString constructor.
Task-number: PYSIDE-363
Change-Id: I7e58ae19d2b0f2e1e14c0a235a5ab311350174c2
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Remove removed constructors and move constructors first
before writing out documentation.
Task-number: PYSIDE-363
Change-Id: I8dbe3e96ccc8f293253eb52e00c384d3ff458dcc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Empty snippets may actually be valid in case a single
closing bracket in C++ is turned into an empty line
in Python (customstyle.cpp[1]). Differentiate between
those by using QString::isNull() for the fallback
mechanism. Always output snippet identifier in messages.
Amends 45f3126a04cd5493323b689c85a48106d0f8367e.
Task-number: PYSIDE-363
Change-Id: I0391b18fafacbd4c57c4017adb08126a5e2c7c7e
Reviewed-by: Christian Tismer <tismer@stackless.com>
|
|
|
|
|
|
|
|
|
|
| |
be found
Use the "path" attribute.
Task-number: PYSIDE-363
Change-Id: I27adc86cfb58d20a90f411842c2f78de9dbe1a60
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Split out the code path for empty identifier
and port to QRegularExpression.
Task-number: PYSIDE-363
Change-Id: I6c0eeba1d62762e475de12d503fdc1a9d495d349
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
| |
Rewrite to use QStringRef and add some checks preventing
overflow should the text contain empty lines.
Task-number: PYSIDE-363
Change-Id: I850221bc6e7a6b88fc3b6078cf2cb2e01663ab15
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|