aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator
Commit message (Collapse)AuthorAgeFilesLines
* Generate fully Qualified Names for FlagsChristian Tismer2018-07-161-2/+7
| | | | | | | | | 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>
* shiboken: Remove unused code from the generatorsFriedemann Kleint2018-06-286-186/+15
| | | | | Change-Id: I88c4148000acba2ba1e2013fe587e7f5fbe6c2ca Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: No longer hard-code the C++ language levelFriedemann Kleint2018-06-271-0/+30
| | | | | | | | | | | | | | | | | | | 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>
* Fix index() method of QAbstractItemModel-derived classesFriedemann Kleint2018-06-251-2/+12
| | | | | | | | | 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>
* shiboken: Add command line options for system include pathsFriedemann Kleint2018-06-221-18/+32
| | | | | | | | | 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>
* shiboken/doc generator: Search snippets with to suffix "py" firstFriedemann Kleint2018-06-221-1/+7
| | | | | | | | | 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>
* Improve the QByteArray implementationBoxiang Sun2018-06-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* PEP 384-squash: Implement PEP 384Christian Tismer2018-05-302-250/+213
| | | | | | | | | | 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>
* QtXmlToSphinx::transform(): Improve XML error messageFriedemann Kleint2018-05-181-2/+4
| | | | | | | Output line and column. Change-Id: Ide890b93c47ef0fc9ebe3209356da100e0cbde4e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Make it possible to specify a target directory for additional documentationFriedemann Kleint2018-05-161-27/+44
| | | | | | | | | 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>
* ShibokenGenerator::buildAbstractMetaTypeFromString(): Handle QFlagsFriedemann Kleint2018-05-141-3/+23
| | | | | | | | | | | | | | | | | | | | 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>
* Improve error handling when writing type conversion functionsFriedemann Kleint2018-05-142-22/+48
| | | | | | | | | | 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>
* QtXmlToSphinx: Refactor link handlingFriedemann Kleint2018-05-072-46/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Change license from all the filesCristian Maureira-Fredes2018-05-0313-13/+13
| | | | | | | | | | | | | | | | | 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>
* QtXmlToSphinx: Add support for more elementsFriedemann Kleint2018-05-022-2/+41
| | | | | | | | | 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>
* QtXmlToSphinx: Refactor label handlingFriedemann Kleint2018-05-022-6/+38
| | | | | | | | | | 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 option to create additional documentationFriedemann Kleint2018-05-022-4/+101
| | | | | | | | | | 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>
* Rename PySide references to Qt for PythonCristian Maureira-Fredes2018-04-2713-13/+13
| | | | | | | | | 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>
* shiboken: Accept relative file name as C++ headerFriedemann Kleint2018-04-271-1/+7
| | | | | | | | | | | 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>
* QtXmlToSphinx: Handle ordered listsFriedemann Kleint2018-04-241-7/+25
| | | | | | | | | | 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>
* Check default superclass when getting baseClassesCristian Maureira-Fredes2018-04-191-1/+7
| | | | | | | | | | | | | | | | | | | | | | | 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>
* shiboken: Use enum values from ClangFriedemann Kleint2018-04-191-1/+1
| | | | | | | | | | | | | | 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>
* shiboken: Exclude smart-pointer-type from documentationFriedemann Kleint2018-04-192-0/+8
| | | | | | | | | | | | 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>
* shiboken: Detect class enums by Clang entirelyFriedemann Kleint2018-04-191-4/+4
| | | | | | | | | | | | | | 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>
* shiboken: Reformat helpFriedemann Kleint2018-04-193-14/+26
| | | | | | | | | 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>
* QtXmlToSphinx::Table: Fix crash when having a rowspan > 1 in the last rowFriedemann Kleint2018-03-211-4/+5
| | | | | | | | | 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>
* shiboken/docgenerator: Add missing overrideFriedemann Kleint2018-03-211-8/+8
| | | | | | Change-Id: Ic4ee9c0e36bb727225bccfa7a72bee38a63d17c2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken: Rename Generator::fileNamePrefix() to fileNameSuffix()Friedemann Kleint2018-03-217-13/+13
| | | | | | Change-Id: If7464f643fca74aa06099ca4b9905b34bd077193 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* siboken/Typesystem: Replace double used for versions by QVersionNumberFriedemann Kleint2018-03-201-7/+11
| | | | | | | | | | | | | - 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>
* Type system: Add attribute indicating C++ 11 enum classesFriedemann Kleint2018-02-281-6/+23
| | | | | | | | | | | | | 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>
* shiboken/qtdocgenerator: Fix inline imagesFriedemann Kleint2018-02-282-14/+57
| | | | | | | | | | | | | | | | | | 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>
* shiboken/qtdocgenerator: Escape more charactersFriedemann Kleint2018-02-271-1/+6
| | | | | | | | | | 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>
* shiboken/qtdocgenerator: Pass full name for inheritance diagramFriedemann Kleint2018-02-271-1/+1
| | | | | | | | | | | 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>
* shiboken: Fully qualify enum valuesFriedemann Kleint2018-02-263-71/+115
| | | | | | | | | | | | | | 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>
* shiboken: Fix generated initialization code for enum classesFriedemann Kleint2018-02-261-1/+2
| | | | | | | | | | 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>
* QtDocGenerator/QtXmlToSphinx: Fix see-also linksFriedemann Kleint2018-02-222-93/+166
| | | | | | | | | | | | | | | | | "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>
* QtDocGenerator: Indent the function list containerFriedemann Kleint2018-02-211-1/+1
| | | | | | | | | 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>
* QtDocGenerator: Ensure newline before tablesFriedemann Kleint2018-02-211-4/+19
| | | | | | | | | | | | | | | | | 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>
* QtDocGenerator: Add newline before Synopsis/Detailed DescriptionFriedemann Kleint2018-02-211-3/+5
| | | | | | | | | 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>
* DocParser: Add helper function to create list of documentable functionsFriedemann Kleint2018-02-211-27/+26
| | | | | | | | | | | | | | 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>
* shiboken/docgenerator: Refactor code doing the escapes for rstFriedemann Kleint2018-02-201-18/+39
| | | | | | | | | | 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>
* shiboken/docgenerator: Remove unneeed QStringRef::toString() callsFriedemann Kleint2018-02-201-5/+5
| | | | | | Change-Id: I4bbaa7d46bab2526906655c5f03bbd25a142bbc4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken/docgenerator: Pad table rows up to header column countFriedemann Kleint2018-02-201-3/+7
| | | | | | | | | | 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>
* shiboken/docgenerator: Refactor code using split()Friedemann Kleint2018-02-201-48/+38
| | | | | | | | Use splitRef() where applicable or rewrite. Task-number: PYSIDE-363 Change-Id: I08dcafbba82327f6ff4c02f582341083b4b48755 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken/docgenerator: Remove helper createRepeatedChar()Friedemann Kleint2018-02-201-10/+23
| | | | | | | | | | 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>
* shiboken: Fix loops in QtDocGenerator::writeConstructors()Friedemann Kleint2018-02-191-6/+7
| | | | | | | | | 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>
* shiboken/docgenerator: Handle empty snippetsFriedemann Kleint2018-02-151-10/+13
| | | | | | | | | | | | | 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>
* shiboken/docgenerator: Fall back to C++ snippet when Python snippet cannot ↵Friedemann Kleint2018-02-151-13/+70
| | | | | | | | | | be found Use the "path" attribute. Task-number: PYSIDE-363 Change-Id: I27adc86cfb58d20a90f411842c2f78de9dbe1a60 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Refactor QtXmlToSphinx::readFromLocation()Friedemann Kleint2018-02-131-9/+15
| | | | | | | | | 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>
* Refactor QtDocGenerator::writeFormattedText()Friedemann Kleint2018-02-131-8/+15
| | | | | | | | | 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>